public void updateTreeUI() {
    super.updateTreeUI();

    if (this._btnHelpSource_ != null) {
      if (!isAncestorOf(this._btnHelpSource_))
        javax.swing.SwingUtilities.updateComponentTreeUI(this._btnHelpSource_);
    }

    if (this._btnHelpTrack_ != null) {
      if (!isAncestorOf(this._btnHelpTrack_))
        javax.swing.SwingUtilities.updateComponentTreeUI(this._btnHelpTrack_);
    }

    if (this._btnHelpOnlineHome_ != null) {
      if (!isAncestorOf(this._btnHelpOnlineHome_))
        javax.swing.SwingUtilities.updateComponentTreeUI(this._btnHelpOnlineHome_);
    }

    if (this._btnAboutAppli_ != null) {
      if (!isAncestorOf(this._btnAboutAppli_))
        javax.swing.SwingUtilities.updateComponentTreeUI(this._btnAboutAppli_);
    }

    if (this._btnExit_ != null) {
      if (!isAncestorOf(this._btnExit_)) // NOTE: should always be the case
      javax.swing.SwingUtilities.updateComponentTreeUI(this._btnExit_);
    }
  }
Example #2
0
 /** *********************************************************************** */
 public static void main(String[] args) { // called when the program starts
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() { // Start the createAndShowGUI method in a separate thread
         public void run() {
           createAndShowGUI();
         }
       });
 }
Example #3
0
 /* Run the game. */
 public static void main(String[] args) {
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           createAndShowGUI();
         }
       });
 }
Example #4
0
 // --------------------------------main---------------------------------------
 public static void main(String[] args) {
   // Schedule a job for the event-dispatching thread:
   // creating and showing this application's GUI.
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           createAndShowGUI();
         }
       });
 }
Example #5
0
  public static void main(String[] args) {
    EpubUtils.EPUB = new File(args[0]);
    EpubUtils.EPUB_FOLDER = args[1];
    EpubUtils.prepare("splitter", "split");

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            createAndShowGUI();
          }
        });
  }
Example #6
0
  @Override
  public void mouseDragged(MouseEvent e) {
    if (javax.swing.SwingUtilities.isRightMouseButton(e)) {
      transX += (double) (e.getX() - preMousePoint.getX()) / scale;
      transY += (double) (e.getY() - preMousePoint.getY()) / scale;

      preMousePoint = e.getPoint();
      updateAffineTransform();
      repaint();
    } else if (javax.swing.SwingUtilities.isLeftMouseButton(e)) {
      rotateAngle += ((double) e.getX() - preMousePoint.getX()) / 100.0;
      preMousePoint = e.getPoint();
      updateAffineTransform();
      repaint();
    }

    // Gets the value of the current logical coordinates of the mouse
    try {
      affineTransform.inverseTransform(e.getPoint(), currentMousePointLogic);
    } catch (Exception ex) {
    }
  }
Example #7
0
 private void initColumnWidths(final JTable table) {
   javax.swing.SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           table.getColumnModel().getColumn(0).setMaxWidth(100);
           table.getColumnModel().getColumn(1).setPreferredWidth(150);
           //                table.getColumnModel().getColumn(2).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(3).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(4).setPreferredWidth(5);
           //                table.getColumnModel().getColumn(5).setPreferredWidth(5);
           table.getColumnModel().getColumn(7).setPreferredWidth(175);
         }
       });
 }
Example #8
0
  public static void main(String[] args) {
    // Schedule a job for the event-dispatching thread:
    // creating and showing this application's GUI.

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            BearSweeper frame = new BearSweeper();
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            frame.pack();
            frame.setVisible(true);
          }
        });
  }
Example #9
0
  public YarharMain() {
    super("YarHar!");
    int screenX = 1024;
    int screenY = 800;
    this.setSize(screenX, screenY);
    this.setJMenuBar(new YarharMenuBar(this));

    this.addWindowListener(this);
    this.addWindowFocusListener(this);

    this.add(borderPanel);

    toolsPanel = new ToolsPanel(this);
    //    borderPanel.add(toolsPanel, BorderLayout.NORTH);

    spriteLibPanel = new SpriteLibraryPanel(this);
    layersPanel = new LayersPanel(this);
    editorPanel = new EditorPanel(this);
    sidePane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, layersPanel, spriteLibPanel);
    sidePane.setContinuousLayout(true);
    sidePane.setResizeWeight(0.5);

    splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, sidePane, editorPanel);
    splitPane.setContinuousLayout(true);
    splitPane.setResizeWeight(0.0);

    borderPanel.add(splitPane, BorderLayout.CENTER);

    footer = new StatusFooterPanel(this);
    borderPanel.add(footer, BorderLayout.SOUTH);

    // finishing touches on Game window
    this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    this.setVisible(true);

    config = YarharConfig.load();

    System.err.println("Game Window successfully created!!!");

    editorPanel.start();

    // Swing can't correctly place divider locations on startup. So we must
    // set their locations later when everything else is initialized.
    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            setDividerLocations();
          }
        });
  }
Example #10
0
 private static void javabughack() throws InterruptedException {
   /* Work around a stupid deadlock bug in AWT. */
   try {
     javax.swing.SwingUtilities.invokeAndWait(
         new Runnable() {
           public void run() {
             PrintStream bitbucket = new PrintStream(new ByteArrayOutputStream());
             bitbucket.print(LoginScreen.textf);
             bitbucket.print(LoginScreen.textfs);
           }
         });
   } catch (java.lang.reflect.InvocationTargetException e) {
     /* Oh, how I love Swing! */
     throw (new Error(e));
   }
   /* Work around another deadl bug in Sun's JNLP client. */
   javax.imageio.spi.IIORegistry.getDefaultInstance();
   try {
     netxsurgery();
   } catch (Exception e) {
   }
 }
Example #11
0
  public static void main(String[] arguments) {
    // Schedule a job for the event dispatch thread:
    // creating and showing this application's GUI.

    try {
      UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
    } catch (UnsupportedLookAndFeelException ex) {
      ex.printStackTrace();
    } catch (IllegalAccessException ex) {
      ex.printStackTrace();
    } catch (InstantiationException ex) {
      ex.printStackTrace();
    } catch (ClassNotFoundException ex) {
      ex.printStackTrace();
    }

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            createAndShowGUI();
          }
        });
  }
  public static void main(String[] args) {
    String clientSettingFile = "";
    GetOpt getopt = new GetOpt(args, "f:");
    try {
      int c;
      while ((c = getopt.getNextOption()) != -1) {
        switch (c) {
          case 'f':
            clientSettingFile = getopt.getOptionArg();
            break;
        }
      }
    } catch (Exception e1) {
      e1.printStackTrace();
    }
    final DHTInteractiveClient dhtClient = new DHTInteractiveClient(clientSettingFile);

    javax.swing.SwingUtilities.invokeLater(
        new Runnable() {
          public void run() {
            dhtClient.createAndShowGUI();
          }
        });
  }