/** * public void setCurrentLayout(int newId) { * * <p>if(newId >= nviews || vpId >= nviews) return; * * <p>String key; String newValue; String currValue; * * <p>for(int i=0; i<keys.size(); i++) { key = (String)keys.get(i); newValue = * (String)tp_paneInfo[newId].get(key); currValue = (String)tp_paneInfo[vpId].get(key); JComponent * obj = (JComponent)panes.get(key); if(newValue.equals("yes")) { if * (tabbedPane.indexOfComponent((Component)obj) < 0) tabbedPane.addTab(key, null, obj, ""); if * (obj instanceof PushpinIF) ((PushpinIF) obj).setAvailable(true); } else * if(newValue.equals("no")) { if (tabbedPane.indexOfComponent((Component)obj) >= 0) * tabbedPane.remove(obj); if (obj instanceof PushpinIF) ((PushpinIF) obj).setAvailable(false); } * } * * <p>tabbedToolPanel.removeAll(); if(tabbedPane.getTabCount() > 0) { if(tabbedPane.getTabCount() * == 1) { tabbedToolPanel.add(tabbedPane.getComponentAt(0)); } else if(tabbedPane.getTabCount() > * 1) { tabbedToolPanel.add(tabbedPane); } pinPanel.setStatus("open"); } else { * pinPanel.setStatus("close"); setVisible(false); } validate(); repaint(); } */ public void initPanel() { if (panes == null || panes.size() <= 0) return; setCurrentLayout(); String key; for (Enumeration e = panes.keys(); e.hasMoreElements(); ) { key = (String) e.nextElement(); JComponent comp = (JComponent) panes.get(key); if (comp instanceof VToolPanel) ((VToolPanel) comp).initPanel(); else { if (comp instanceof PushpinIF) comp = ((PushpinIF) comp).getPinObj(); if (comp instanceof XMLToolPanel) ((XMLToolPanel) comp).buildPanel(); } /** * ** if(comp instanceof XMLToolPanel) { ((XMLToolPanel)comp).buildPanel(); } else if(comp * instanceof VToolPanel) { ((VToolPanel)comp).initPanel(); } ** */ } if (pinPanel.isOpen()) { if (!pinPanel.isVisible()) pinPanel.setVisible(true); } else pinPanel.setVisible(false); }