public void setViewPort(int id) { if (id >= nviews || id < 0) return; String key; String value; vpId = id; for (Enumeration e = tp_paneInfo[id].keys(); e.hasMoreElements(); ) { key = (String) e.nextElement(); value = (String) tp_paneInfo[id].get(key); if (value.equals("yes")) { JComponent comp = (JComponent) panes.get(key); if (comp instanceof VToolPanel) { ((VToolPanel) comp).setViewPort(id); } else { if (comp instanceof PushpinIF) comp = ((PushpinIF) comp).getPinObj(); if (comp instanceof XMLToolPanel) ((XMLToolPanel) comp).setViewPort(id); } } } }