new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW),
FormFactory.RELATED_GAP_COLSPEC,
new ColumnSpec(ColumnSpec.LEFT, Sizes.MINIMUM, FormSpec.NO_GROW)},
new RowSpec[]{new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW)});
}
JPanel editor = new PanelWithValidationComponent(layout)
{
private static final long serialVersionUID = 534852878664152460L;
@Override
public void setEnabled(boolean enabled)
{
super.setEnabled(enabled);
getKeyComponent().setEnabled(enabled);
getDataEditorCommand().setEnabled(enabled);
}
@Override
public JComponent getValidationComponent()
{
return getKeyComponent();
}
@Override
public synchronized void addVetoableChangeListener(VetoableChangeListener listener)
{
AbstractLookupBinding.this.propertyChangeMonitor.addVetoableChangeListener(listener);
}
@Override
public boolean requestFocusInWindow()
{
return getKeyComponent().requestFocusInWindow();
}
};
CellConstraints cc = new CellConstraints();
editor.add(getKeyComponent(), cc.xy(1, 1));
editor.add(getDataEditorButton(), cc.xy(3, 1));
if (isEnableViewCommand())
{
AbstractButton viewButton = referableDataEditorViewCommand.createButton();
viewButton.setFocusable(false);
editor.add(viewButton, cc.xy(5, 1));
}
valueModelChanged(getValue());
return editor;
}