/** * Get the currently shown panel. */ public IAbstractViewerPanel getCurrentPanel() { IAbstractViewerPanel ret = null; Object key = ocl.getCurrentKey(); if(key!=null) { ret = (IAbstractViewerPanel)panels.get(key); } return ret; }
/** * Get the currently shown panel. */ public IAbstractViewerPanel getCurrentPanel() { IAbstractViewerPanel ret = null; Object key = ocl.getCurrentKey(); if(key!=null) { ret = (IAbstractViewerPanel)panels.get(key); } return ret; }
/** * Remove a panel. */ public void removePanel(Object key) { IAbstractViewerPanel panel = (IAbstractViewerPanel)panels.remove(key); if(panel!=null) { centerp.remove(panel.getComponent()); panel.shutdown(); boolean found = false; for(int i=0; !found && i<selcb.getModel().getSize(); i++) { if(selcb.getModel().getElementAt(i).equals(ocl.getCurrentKey())) { found = true; selcb.setSelectedItem(ocl.getCurrentKey()); } } } }
/** * Remove a panel. */ public void removePanel(Object key) { IAbstractViewerPanel panel = (IAbstractViewerPanel)panels.remove(key); if(panel!=null) { centerp.remove(panel.getComponent()); panel.shutdown(); boolean found = false; for(int i=0; !found && i<selcb.getModel().getSize(); i++) { if(selcb.getModel().getElementAt(i).equals(ocl.getCurrentKey())) { found = true; selcb.setSelectedItem(ocl.getCurrentKey()); } } } }
Object old = cards.getCurrentKey(); if(old!=null)