public static void positionFrameOnScreen(Window frame, double horizontalPercent, double verticalPercent) { Rectangle maximumWindowBounds = RefineryUtilities.getMaximumWindowBounds(); Dimension size = ((Component) frame).getSize(); int num1 = Math.max((int) (maximumWindowBounds.width - size.width), 0); int num2 = Math.max((int) (maximumWindowBounds.height - size.height), 0); int num3 = ByteCodeHelper.d2i(horizontalPercent * (double) num1) + maximumWindowBounds.x; int num4 = ByteCodeHelper.d2i(verticalPercent * (double) num2) + maximumWindowBounds.y; frame.setBounds(num3, num4, (int) size.width, (int) size.height); }
/// <summary> /// Constructs a new invisible window with the specified /// window as its owner and a /// <code>GraphicsConfiguration</code> of a screen device. /// </summary> public Window(Window @owner, GraphicsConfiguration @gc) { }
/// <summary> /// Constructs a new invisible window with the specified /// <code>Window</code> as its owner. /// </summary> public Window(Window @owner) { }
/// <summary> /// Constructs a <code>WindowEvent</code> object. /// </summary> public WindowEvent(Window @source, int @id, Window @opposite, int @oldState, int @newState) : base(source, id) { }
/// <summary> /// Constructs a <code>WindowEvent</code> object. /// </summary> public WindowEvent(Window @source, int @id) : base(source, id) { }
public static void positionFrameRandomly(Window frame) { RefineryUtilities.positionFrameOnScreen(frame, Math.random(), Math.random()); }
public static void centerFrameOnScreen(Window frame) { RefineryUtilities.positionFrameOnScreen(frame, 0.5, 0.5); }
/// <summary> /// Enter full-screen mode, or return to windowed mode. /// </summary> public void setFullScreenWindow(Window @w) { }
/// <summary> /// Returns the Component that should receive the focus when a Window is /// made visible for the first time. /// </summary> public Component getInitialComponent(Window @window) { return default(Component); }