gbc.weightx = 1.0;
gbc.gridx = 0;
if (attrName.equalsIgnoreCase(
ServerConstants.OBJECTCLASS_ATTRIBUTE_TYPE_NAME))
{
final ObjectClassCellPanel ocCellPanel = new ObjectClassCellPanel();
Schema schema = getInfo().getServerDescriptor().getSchema();
final ObjectClassValue ocDescriptor;
if (schema != null)
{
ocDescriptor = getObjectClassDescriptor(values, schema);
ocCellPanel.setValue(ocDescriptor);
}
else
{
ocDescriptor = null;
}
ocCellPanel.addEditActionListener(new ActionListener()
{
private ObjectClassValue newValue;
/**
* {@inheritDoc}
*/
public void actionPerformed(ActionEvent ev)
{
if (editOcDlg == null)
{
editOcPanel = new ObjectClassEditorPanel();
editOcPanel.setInfo(getInfo());
editOcDlg = new GenericDialog(
null,
editOcPanel);
editOcDlg.setModal(true);
Utilities.centerGoldenMean(editOcDlg,
Utilities.getParentDialog(SimplifiedViewEntryPanel.this));
}
if ((newValue == null) && (ocDescriptor != null))
{
editOcPanel.setValue(ocDescriptor);
}
else
{
editOcPanel.setValue(newValue);
}
editOcDlg.setVisible(true);
if (editOcPanel.valueChanged())
{
newValue = editOcPanel.getObjectClassValue();
ocCellPanel.setValue(newValue);
updatePanel(newValue);
}
}
});
panel = ocCellPanel;