void restoreGeometry(TreePanel panel) { String pTitle = panel.getRootPath().toString(); pTitle = pStr2Key(pTitle); if (pTitle.equals("Control_Panel")) pTitle = "Control_Panel.@Main"; if (IJ.debugMode) IJ.log("CP.restoreGeometry: "+pTitle); String geom = Prefs.get(pTitle, null); if (geom!=null) { int[] coords = s2ints(geom); if (coords!=null && coords.length==4) panel.setBounds(coords[0],coords[1],coords[2],coords[3]); else { Point pnt = panel.getDefaultLocation(); if (pnt!=null) panel.getFrame().setLocation((int)pnt.getX(),(int)pnt.getY()); } } }
void restoreGeometry(TreePanel panel) { String pTitle = panel.getRootPath().toString(); pTitle = pStr2Key(pTitle); if (pTitle.equals("Control_Panel")) pTitle = "Control_Panel.@Main"; if (IJ.debugMode) IJ.log("CP.restoreGeometry: "+pTitle); String geom = Prefs.get(pTitle, null); if (geom!=null) { int[] coords = s2ints(geom); if (coords!=null && coords.length==4) panel.setBounds(coords[0],coords[1],coords[2],coords[3]); else { Point pnt = panel.getDefaultLocation(); if (pnt!=null) panel.getFrame().setLocation((int)pnt.getX(),(int)pnt.getY()); } } }