boolean enableMe = true;
if (selectedId == null || selectedId.equals("")) {
enableMe = false;
}
CardLayout layout = (CardLayout) getLayout();
PropertyEditorUI newSelected = idToEditorMap.get(selectedId);
if (newSelected == null) {
// we'll have to make a new window.
if (selectedId == null || selectedId.equals("")) {
JPanel jp = new JPanel();
this.add(selectedId, jp);
} else {
SwingPropertyEditor spe = createEditorPane(selectedId);
// save reference to new pane in hash table
idToEditorMap.put(selectedId, spe);
editors.add(spe);
if (enableMe && isEditorEnabled()) {
spe.removeDisableMask(this);
} else {
spe.addDisableMask(this);
}
this.add(selectedId, spe);
}
}
layout.show(this, selectedId);
currentKeyValue = selectedId;
}