public JComponent appendSometimesReadOnly(DefaultFormBuilder builder, String fieldId) {
return appendField(builder,fieldId,ComponentFactory.SOMETIMES_READ_ONLY);
}
public JComponent appendField(DefaultFormBuilder builder, String fieldId, int flag) {
Field field = Configuration.getFieldFromId(fieldId);
if (field == null)
return null;
JComponent component = getComponent(fieldId, flag);
if (component instanceof JCheckBox) // checkboxes already have a label to the right
builder.append(component);
else
builder.append(getLabel(fieldId)+":",component);
String fieldDoc = field.getHelp();
if (fieldDoc != null)
HelpUtil.addDocHelp(component,fieldDoc);
return component;
}