Summary of Available Functions
- The builder comes up with an empty layout-grid: the toolbar at the top of the layout builder window provides the actions available (inserting/deleting/manipulating all description elements). The action happens at the anchor-cell or on the selected elements. Editing is done within the input tabs on the right, default properties of rows/columns to be inserted can be set in "Defaults" tab. F3 toggles focus between layout table and input tabs.
- A constraint representing a later-to-be-created component is shown by a grey area in the grid.
- A constraint/group of selected constraints can be moved around (as long as it does not hit other constraints or the borders of the grid).
- A constraint/group of selected constraints can be extended/shrinked (as long as it does not hit other constraints or the borders of the grid).
- A constraint must be typed: it's a generic type that's mapped to a concrete type by the UIFactory at the moment of component creation
- A constraint should have an name (= property "componentID" of Constraint) - the name is meant to be the glue across all aspects of gui-building.
- The properties of rows/columns can be edited - you can choose one of the available styles from the "Type" comboBox or have to provide a valid encodedString for rowSpec/columnSpec.
- The rows/columns can belong to a group to ensure the same height/width.
- A preview of the layout can be shown after clicking on - alas... - preview/F5.
- On updating the preview, the FormLayoutInfo is dumped onto the DebugInfo tab.
- The presentation builder window is the place to edit/insert/remove PresentationDescriptions for the components - the rows are loosely coupled to the constraints of the layout builder, using the componentID as glue. The name column in the presentation table is not editable if a constraint with the same name exists. The columns are the presentation attributes.
- The descriptions can be saved/loaded, the given filename is used as description ID for both LayoutDescription and Presentation
All tooltips show a keyboard shortcut, if available. So the easiest way to find out about them if by moving the mouse around :-)
For inserting/deleting layout elements the Insert/Delete keys are used, the modifier determines the target type:
For navigation of anchor/constraint in the layout grid the normal cursor keys are used, the modifier determines the target object and the action:
There are some runtime properties which allow you to configure the Builder
- By default, the builder comes up with the LookAndFeel as choosen by the JGoodies strategy. To change, set the property "swing.defaultlaf" as a runtime property. Note: the settings in swing.properties are not respected.
- ComponentTypeMap, CustomizerMap, IOHandlerMap, StyleMap are pluggable. To make custom implementations available to the builder, you have to set the appropriate system property ("swingempire.componentmap", "swingempire.customizermap", "swingempire.iohandlermap", "swingempire.stylemap", respectively) to the fully qualified name of your custom class. You can do so either as a commandline option or in a file "resources/forms.properties". Runtime settings will take precedence over file settings.