@Signature(@Arg("value")) public Memory __setMaximized(Environment env, Memory... args) { if (args[0].toBoolean()) { frame.setExtendedState(frame.getExtendedState() | Frame.MAXIMIZED_BOTH); } else { frame.setExtendedState(Frame.NORMAL); } return Memory.NULL; }
@Signature protected Memory __getMaximized(Environment env, Memory... args) { return (frame.getExtendedState() & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH ? Memory.TRUE : Memory.FALSE; }
@Override public Component getContentComponent() { return frame.getContentPane(); }
@Signature(@Arg("action")) public Memory setDefaultCloseOperation(Environment env, Memory... args) { frame.setDefaultCloseOperation(args[0].toInteger()); return Memory.NULL; }
@Override protected void onInit(Environment env, Memory... args) { frame = new JFrameX(); frame.setLayout(new XYLayout()); }