use of com.revolsys.swing.field.Field in project com.revolsys.open by revolsys.
the class Form method addNewField.
@SuppressWarnings("unchecked")
public <F> F addNewField(final String fieldName, final DataType dataType) {
final Field field = newField(fieldName, dataType);
addField(field);
return (F) field;
}
use of com.revolsys.swing.field.Field in project com.revolsys.open by revolsys.
the class Form method newPanelTitledLabelledFields.
public BasePanel newPanelTitledLabelledFields(final String title, final Field... fields) {
final BasePanel panel = BasePanel.newPanelTitled(title);
for (final Field field : fields) {
final String fieldName = field.getFieldName();
final Component component = field.getComponent();
panel.addWithLabel(fieldName, component);
}
GroupLayouts.makeColumns(panel, 2, true, true);
return panel;
}
use of com.revolsys.swing.field.Field in project com.revolsys.open by revolsys.
the class ValueField method save.
private void save(final Container container) {
final Component[] components = container.getComponents();
for (final Component component : components) {
if (component instanceof ValueField) {
final ValueField valuePanel = (ValueField) component;
valuePanel.save();
} else if (component instanceof Field) {
final Field field = (Field) component;
field.updateFieldValue();
} else if (component instanceof Container) {
final Container childContainer = (Container) component;
save(childContainer);
}
}
this.saved = true;
}
Aggregations