|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecteu.beesoft.gaia.util.ObjectBuilderFactory
eu.beesoft.gaia.swing.builder.SwingBuilderFactory
public class SwingBuilderFactory
The builder factory dedicated to create Swing related builders and objects.
See documentation to ObjectBuilderFactory
for explanation how builder
factory and builders work.
This class supports resource bundles and has methods to obtain builders to create list models and "form" actions.
It creates relationships between some tags and builders, that are implemented
in package eu.beesoft.gaia.swing.builder
. The tags complies with
standard Swing class names. Here is the list of accepted tags and prepared
builders:
ActionBuilder
, creates an instance
of SwingClientAction
ButtonBuilder
, creates an instance
of JButtonCellConstraintsBuilder
, creates an
instance ofCheckBoxBuilder
, creates an
instance of JCheckBoxCheckBoxMenuItemBuilder
,
creates an instance of JCheckBoxMenuItemTableColumnBuilder
, creates an
instance of TableColumnComboBoxBuilder
, creates an
instance of JComboBoxWithSeparatorDateFieldBuilder
, creates an
instance of JDateField
DialogBuilder
, creates an instance
of JDialogFillerBuilder
, creates an empty
JLabel to fill spaceFormBuilder
, creates an instance of
Form
FrameBuilder
, creates an instance of
JFrameGridBagConstraintsBuilder
, creates an
instance of GridBagConstraintsLabelBuilder
, creates an instance of
JLabelLinkBuilder
, creates an instance of
JLink
ListBuilder
, creates an instance of
JListListModelBuilder
, creates an
instance of DefaultListModel or DefaultComboBoxModelMenuBuilder
, creates an instance of
JMenuMenuBarBuilder
, creates an instance
of JMenuBarMenuItemBuilder
, creates an
instance of JMenuItemPanelBuilder
, creates an instance of
JPanelPasswordFieldBuilder
, creates
an instance of JPasswordFieldRadioButtonMenuItemBuilder
, creates an instance of
JRadioButtonMenuItemScrollPaneBuilder
, creates an
instance of JScrollPaneSectionBuilder
, creates an
instance of JSectionSeparatorBuilder
, creates an
instance of JSeparatorSplitPaneBuilder
, creates an
instance of JSplitPaneTabbedPaneBuilder
, creates an
instance of JCloseableTabbedPane
TableBuilder
, creates an instance of
JZebraTable
TableColumnBuilder
, creates an
instance of TableColumnTextAreaBuilder
, creates an
instance of JTextAreaTextFieldBuilder
, creates an
instance of JTextFieldToolBarBuilder
, creates an instance
of JToolBarTreeBuilder
, creates an instance of
JZebraTree
TreeTableBuilder
, creates an
instance of JTreeTable
Of course, you can freely complete another {tag : builder} pairs or change
the existing - by calling
ObjectBuilderFactory.registerBuilderClass(String, Class)
method.
Constructor Summary | |
---|---|
SwingBuilderFactory()
Create a new instance of the swing builder factory. |
Method Summary | |
---|---|
java.util.List<SwingBuilder<javax.swing.Action>> |
getActionBuilders(SwingBuilder<?> builder)
Returns a collection of all SwingBuilder instances that are creating an javax.swing.Action instances under the given builder. |
java.util.List<javax.swing.Action> |
getActions(SwingBuilder<?> builder)
Returns a collection of all javax.swing.Action instances
created by builders under the given builder. |
java.util.List<ListModelBuilder> |
getListModelBuilders()
Returns a collection of all instances of ListModelBuilder created
by this factory. |
java.util.List<ListModelBuilder> |
getListModelBuilders(SwingBuilder<?> builder)
Returns a collection of all instances of ListModelBuilder created
by this factory under the given builder. |
java.lang.String |
getPropertyFromResourceBundle(java.lang.String objectId,
java.lang.String objectProperty)
Combines given objectId and objectProperty to
key to the resource bundle and returns value from it. |
java.lang.String |
getResourceBundle()
Returns resource bundle bound to this factory. |
void |
setResourceBundle(java.lang.String resourceBundle)
Sets resource bundle for this factory. |
Methods inherited from class eu.beesoft.gaia.util.ObjectBuilderFactory |
---|
build, getBuilder, getBuilderByIdMap, getBuilderByTagMap, getRootBuilder, registerBuilderClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SwingBuilderFactory()
Method Detail |
---|
public java.lang.String getResourceBundle()
public void setResourceBundle(java.lang.String resourceBundle)
resourceBundle
- - the resourceBundle to setpublic java.lang.String getPropertyFromResourceBundle(java.lang.String objectId, java.lang.String objectProperty)
objectId
and objectProperty
to
key to the resource bundle and returns value from it. It returns null if
both given arguments are null or no resource bundle was set with method
setResourceBundle(String)
. This method is invoked from
SwingBuilder.getPropertyFromResourceBundle(String)
and objectId
is the builder id
property in this case.
objectId
- - first part of the key in resource bundleobjectProperty
- - last part of the key in resource bundle
public java.util.List<javax.swing.Action> getActions(SwingBuilder<?> builder)
javax.swing.Action
instances
created by builders under the given builder. From this lookup are
excluded all builders and their children that produce instances of
javax.swing.AbstractButton
and
javax.swing.JPopupMenu
.
builder
- - a root builder for the action lookup
javax.swing.Action
public java.util.List<SwingBuilder<javax.swing.Action>> getActionBuilders(SwingBuilder<?> builder)
javax.swing.Action
instances under the given builder.
builder
- - a root builder for the action builders lookup
SwingBuilder<Action>
public java.util.List<ListModelBuilder> getListModelBuilders()
ListModelBuilder
created
by this factory.
ListModelBuilder
public java.util.List<ListModelBuilder> getListModelBuilders(SwingBuilder<?> builder)
ListModelBuilder
created
by this factory under the given builder.
builder
- - a root builder for the list model builders lookup
ListModelBuilder
|
JavaGantt 2011.1 API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |