public class SwingWidgetBuilder extends Object implements WidgetBuilder<JComponent,SwingMetawidget>, SwingValuePropertyProvider
Creates native Swing JComponents, such as JTextField and
JComboBox, to suit the inspected fields.
| Constructor and Description |
|---|
SwingWidgetBuilder() |
SwingWidgetBuilder(SwingWidgetBuilderConfig config) |
| Modifier and Type | Method and Description |
|---|---|
JComponent |
buildWidget(String elementName,
Map<String,String> attributes,
SwingMetawidget metawidget)
Builds the most appropriate widget for this business field.
|
protected JComponent |
createTable(String elementName,
Map<String,String> attributes,
SwingMetawidget metawidget) |
String |
getValueProperty(Component component)
Returns the property used to get/set the value of the component.
|
public SwingWidgetBuilder()
public SwingWidgetBuilder(SwingWidgetBuilderConfig config)
public String getValueProperty(Component component)
SwingValuePropertyProvider
If the component is not known, returns null.
getValueProperty in interface SwingValuePropertyProviderpublic JComponent buildWidget(String elementName, Map<String,String> attributes, SwingMetawidget metawidget)
WidgetBuilderbuildWidget in interface WidgetBuilder<JComponent,SwingMetawidget>elementName - XML node name of the business field. Typically 'entity', 'property' or 'action'.
Never nullattributes - attributes of the business field to build a widget for. Never null. This Map is
modifiable - changes will be passed to subsequent WidgetBuilders, WidgetProcessors
and Layoutsmetawidget - the parent Metawidget. Never nullprotected JComponent createTable(String elementName, Map<String,String> attributes, SwingMetawidget metawidget)
Copyright © 2015. All Rights Reserved.