GUI Commands User GuideVersion 2.1 |
||
Programmatic ConfigurationLike ActionCommands, CommandGroups can be created from scratch programmatically as anonymous groups. Anonymous groups have the same constraints as anonymous ActionCommands in that:
Adding members programmatically is covered in detail in the Group Builders section. Adding faces is covered in Creating Faces Programmatically. The following is an example of creating an anonymous group and configuring it programmatically: // create an anonymous group CommandGroup group = new CommandGroup(); // configure the default face group.getDefaultFace(true).setText("My Group"); // get a builder and add some commands. GroupBuilder builder = group.getBuilder(); builder.add(aCommand); builder.add(anotherGroup); builder.applyChanges(); |
||