/** * Sets the window manager of this window. * <p> * Note that this method is used by <code>WindowManager</code> to maintain * a backpointer. Clients must not call the method directly. * </p> * * @param manager * the window manager, or <code>null</code> if none */ public void setWindowManager(WindowManager manager) { windowManager = manager; // Code to detect invalid usage if (manager != null) { Window[] windows = manager.getWindows(); for (Window window : windows) { if (window == this) { return; } } manager.add(this); } }
/** * Sets the window manager of this window. * <p> * Note that this method is used by <code>WindowManager</code> to maintain * a backpointer. Clients must not call the method directly. * </p> * * @param manager * the window manager, or <code>null</code> if none */ public void setWindowManager(WindowManager manager) { windowManager = manager; // Code to detect invalid usage if (manager != null) { Window[] windows = manager.getWindows(); for (int i = 0; i < windows.length; i++) { if (windows[i] == this) { return; } } manager.add(this); } }
/** * Sets the window manager of this window. * <p> * Note that this method is used by <code>WindowManager</code> to maintain * a backpointer. Clients must not call the method directly. * </p> * * @param manager * the window manager, or <code>null</code> if none */ public void setWindowManager(WindowManager manager) { windowManager = manager; // Code to detect invalid usage if (manager != null) { Window[] windows = manager.getWindows(); for (int i = 0; i < windows.length; i++) { if (windows[i] == this) { return; } } manager.add(this); } }