public class ReadOnlyWidgetBuilder extends Object implements WidgetBuilder<JComponent,SwingMetawidget>, SwingValuePropertyProvider
Creates native Swing read-only JComponents
, such as JLabels
, to suit
the inspected fields.
Constructor and Description |
---|
ReadOnlyWidgetBuilder() |
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.
|
String |
getValueProperty(Component component)
Returns the property used to get/set the value of the component.
|
public String getValueProperty(Component component)
SwingValuePropertyProvider
If the component is not known, returns null
.
getValueProperty
in interface SwingValuePropertyProvider
public JComponent buildWidget(String elementName, Map<String,String> attributes, SwingMetawidget metawidget)
WidgetBuilder
buildWidget
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 nullCopyright © 2015. All Rights Reserved.