private String sessionFilename(Window window) { if (window == null) { return null; } else { String name = window.getName(); return (name == null) ? null : name + ".session.xml"; } }
private String sessionFilename(Window window) { if (window == null) { return null; } else { String name = window.getName(); return (name == null) ? null : name + ".session.xml"; } }
public static Vector<Window> getTopContainers(String name) { Vector<Window> containers = new Vector<Window>(); Frame frames[] = Frame.getFrames(); for (Frame frame : frames) { Window[] windows = frame.getOwnedWindows(); for (Window window : windows) { if (window.getName() != null && window.getName().equals(name)) containers.add(window); } if (!containers.contains(frame)) { containers.add(frame); } } return containers; }
public void run() { // If the window was shown again since we queued this action, // it will have removed the window from the transientFiltered // set, and we shouldn't filter. if (transientFiltered.containsKey(w)) { setFiltered(w, true); Log.debug("window " + w.getName() + " filtered"); } else { Log.debug("cancel dispose of " + w.getName()); } } }
private void store(Window w) { String bounds = (String)ConverterRegistry.instance().convert( String.class, w.getBounds()); node().node("Windows").put(w.getName() + ".bounds", bounds); } };
/** * Tries to determine the title of the given window. * * @param aWindow * the window to determine the title for, cannot be <code>null</code> * . * @return a title, can be <code>null</code>. */ public static final String getTitle( final Window aWindow ) { if ( aWindow instanceof Frame ) { return ( ( Frame )aWindow ).getTitle(); } else if ( aWindow instanceof Dialog ) { return ( ( Dialog )aWindow ).getTitle(); } return aWindow.getName(); }
/** * Restores the window size, position and state if possible. Tracks the * window size, position and state. * * @param window */ public static void track(Window window) { Preferences prefs = node().node("Windows"); String bounds = prefs.get(window.getName() + ".bounds", null); if (bounds != null) { Rectangle rect = (Rectangle)ConverterRegistry.instance().convert( Rectangle.class, bounds); window.setBounds(rect); } window.addComponentListener(windowDimension); }
public void show() { dockableFrame.setKey(owner.getName() + "." + getTitle()); dockManager.addFrame(dockableFrame); dockableFrame.setVisible(true); }
if (size.height > screenSize.height - 20 || size.width > screenSize.width - 20) { if (w.getName().equals("RobocodeFrame")) { int shrink = size.width - screenSize.width + 20;
&& e.getSource() instanceof Window)) { Window w = (Window)e.getSource(); Log.debug("window " + w.getName() + " open/shown"); if (transientFiltered.containsKey(w)) { Log.debug("un-filter window " + w.getName()); setFiltered(w, false); Log.debug("Parent is filtered, filter " + w.getName()); setFiltered(w, true); Log.debug("queueing dispose of " + w.getName()); SwingUtilities.invokeLater(new DisposeAction(w));
idAndPosition = ScreenUtil.getGraphicsDeviceAt(point) + ":" + position; } else { idAndPosition = parent.getName() + ":" + position;