public void displayElement(XMLElement el) {
XMLPanel previousPanel = getViewPanel();
XMLElement previousElement = getActiveElement();
if (previousPanel instanceof XMLTabbedPanel && previousElement != null) {
XMLTabbedPanel tp = (XMLTabbedPanel) previousPanel;
Class ec = previousElement.getClass();
int activeTab = tp.getActiveTab();
lastActiveTabs.put(ec, new Integer(activeTab));
}
// MUST BE SET BEFORE GENERATING NEW PANEL BECAUSE PANELGENERATOR
// CAN SET THIS FLAG TO TRUE
isModified = false;
XMLPanel p;
if (el != null) {
p = this.panelGenerator.getPanel(el);
} else {
p = new XMLBasicPanel();
}
setViewPanel(p);
if (p instanceof XMLTabbedPanel) {
Integer at = (Integer) lastActiveTabs.get(el.getClass());
if (at != null) {
int atno = at.intValue();
XMLTabbedPanel tp = (XMLTabbedPanel) p;
if (tp.getTabCount() <= at.intValue()) {
atno = tp.getTabCount() - 1;
lastActiveTabs.put(el.getClass(), new Integer(atno));
}
tp.setActiveTab(atno);
}
}
getPanelSettings().adjustActions();
// enableApplyAction(isModified);
// enableRevertAction(isModified);