Java Gui Builder
You are here: Home   >   Documentation   >   JGB Elements Documentation

JGB Elements Documentation Index

Elements by type

Controls

Elements that declare controls to be added to the window.

button, check, combo, control, glue, label, list, panel, radio, sheet, strut, tab, table, textfield.
Document root

The root element of all JGB XML description files.

window.
Event-Handling

Elements that describe event-handling.

register.
Layout control

Elements that control and constrain control layout.

border, constraints, controls, gridbag, layout.
Menu & items

Elements that declare and layout menus.

item, menu, menuBar, popupmenu, separator.
Property & method calls

Elements which control object creation, property management and method calling.

constant, constructor, methodCall, null, object, parameter, property, ref, return, value.

Elements by name

border

border elements add borders to the container in which they are declared. The only possible border type at the moment is a titled border, using the default BorderFactory.createTitledBorder(String title).

button

Adds a standard push button the window.

check

Adds a checkbox control to the window.

combo

Allows selection of a single value in a list of values without using too much screen real estate.

constant

Puts a constant on the stack ready for consumption by a methodCall, property or return element. The constant's value will be put on the JGB stack, and not the constant's name.

constraints

constraints elements describe constraints used when adding components to a container. When constraints elements are encountered, JGB saves the constraints' value ( ref, constant, value, return or gridbag) until such a time it will add a component.

constructor

constructor elements describe the constructor that will be called to instantiate objects of the enclosing object element.

control

The mother of all controls. This element adds a new control to the parent container, using the currently defined constraints.

controls

Marks the beginning of the declaration of the window contents.

glue

glue elements are controls which can expand or contract depending on the amount of space available.

gridbag

gridbag refers to GridBagConstraints objects. The act of using gridbag instantiates (or reuses) a GridBagConstraints object that will be used subsequently as a constraint when adding controls.

item

Adds a new item to the enclosing menu.

label

Adds a label to the current container.

layout

Sets a new layout manager on the current container. Constraints may then be specified using constraints elements.

list

Declares that a JList control be added to the window.

menu

Declares a new menu inside a menuBar element.

menuBar

Declares a menu bar that will be added to the enclosing window.

methodCall

methodCall allows arbitrary methods to be called on objects. The referenced object can be specified so the method call does not need to occur on the enclosing object.

null

Puts a null on the stack ready for consumption by a methodCall, property or return element.

object

object elements describe the act of instantiating objects. Any class of object may be instantiated through the object tag. Even the layout and control tags are just extensions of the object.

panel

Declares a new panel in which other controls can be added.

parameter

Describes a parameter to a method call or a constructor. The parameter's class is derived from the child used.

popupmenu

Declares a new popup menu.

property

property elements are used to set bean properties. The property name will be used to find a corresponding method on the referenced object. The corresponding method name will be found by concatenating "set" and the value of the name attribute, with the first character of the name attribute's value uppercased.

radio

Adds a radio button to the window.

ref

References an existing object from the builder's context. It is possible to view ID attributes as meaning variable names. In this case, ref acts as the right-hand side of expressions. Instantiation would then be the left-hand side of expressions.

register

Registers an event handler for a specific event.

return

return acts just like ref, constant and value elements. It makes the return value of a methodCall element accessible to enclosing elements by putting the method's return value on the JGB stack.

separator

Adds a separator bar to the parent menu or item.

sheet

Declares that a sheet control be added to the window.

strut

Struts are fixed width or height (or both) controls which are invisible, but use a fixed amount of space. These can be used to separate groups of controls.

tab

Declares that a tab should be added to the enclosing sheet.

table

Declares a control of type JTable to be added to the window.

textfield

Adds a text field or area to the window. The difference between a field and an area is that the area is multiline. Therefore it is more adapted to long runs of text.

value

Declares a value that will be passed to an enclosing property, methodCall or parameter element.

window

The window tag describes one window. Windows extends java.awt.Window. JGB only uses javax.swing.JDialog and javax.swing.JFrame. It would be a simple matter to add support for java.awt.Dialog and java.awt.Frame.

Back to top
SourceForge Logo
Hosted on SourceForge.net
Valid XHTML 1.0!
Valid XHTML 1.0 !
Valid CSS!
Valid CSS !
Code Coverage by Clover
Code Coverage provided by Clover
 |  Home |  License |  Downloads |  Documentation |  Developers |  Mailing Lists |  Dependencies |  Links |  Privacy Policy |  SF Project Home |