Exemple #1
0
  @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;
  }
Exemple #2
0
 @Signature
 protected Memory __getMaximized(Environment env, Memory... args) {
   return (frame.getExtendedState() & Frame.MAXIMIZED_BOTH) == Frame.MAXIMIZED_BOTH
       ? Memory.TRUE
       : Memory.FALSE;
 }
Exemple #3
0
 @Override
 public Component getContentComponent() {
   return frame.getContentPane();
 }
Exemple #4
0
 @Signature(@Arg("action"))
 public Memory setDefaultCloseOperation(Environment env, Memory... args) {
   frame.setDefaultCloseOperation(args[0].toInteger());
   return Memory.NULL;
 }
Exemple #5
0
 @Override
 protected void onInit(Environment env, Memory... args) {
   frame = new JFrameX();
   frame.setLayout(new XYLayout());
 }