コード例 #1
0
  private JInternalFrame _startJFXImpuestosCRUD() {
    frame = new JInternalFrame("Administrador de impuestos");
    final JFXPanel fxPanel = new JFXPanel();

    frame.setClosable(true);
    frame.add(fxPanel);
    frame.setVisible(true);

    Herramientas.panelCatalogo(frame);
    Principal.getEscritorio().getPanelEscritorio().add(frame);
    frame.setSize(706, 518);
    frame.setPreferredSize(new Dimension(706, 518));
    frame.setResizable(true);
    frame.setVisible(true);
    Herramientas.centrarVentana(frame);
    Herramientas.iconificable(frame);
    frame.toFront();

    Platform.runLater(
        new Runnable() {
          @Override
          public void run() {
            Scene scene = null;
            try {
              scene = initImpuestosCRUD();
              scene.setFill(null);
              fxPanel.setScene(scene);
            } catch (IOException e) {

            }
          }
        });

    return frame;
  }
コード例 #2
0
ファイル: AppWindow.java プロジェクト: Sciss/Meloncillo
 public void toFront() {
   // if( lala ) {
   //	System.out.println( "toFront" );
   //	new Exception().printStackTrace();
   // }
   //
   if (w != null) {
     w.toFront();
   } else if (jif != null) {
     jif.toFront();
     try {
       jif.setSelected(true);
     } catch (PropertyVetoException e) {
       /* ignored */
     }
   } else {
     throw new IllegalStateException();
   }
 }
コード例 #3
0
 /**
  * Open the internal frame for the given {@link BuildOutput} (or bring it to the front, if it is
  * already open)
  *
  * @param buildOutput The {@link BuildOutput}
  */
 private void openBuildOutputFrame(BuildOutput buildOutput) {
   JInternalFrame buildOutputFrame = openedBuildOutputFrames.get(buildOutput);
   if (buildOutputFrame != null) {
     buildOutputFrame.toFront();
     return;
   }
   buildOutputFrame = new JInternalFrame(buildOutput.getProjectName(), true, true, true, true);
   openedBuildOutputFrames.put(buildOutput, buildOutputFrame);
   buildOutputFrame.addInternalFrameListener(
       new InternalFrameAdapter() {
         @Override
         public void internalFrameClosed(InternalFrameEvent e) {
           openedBuildOutputFrames.remove(buildOutput);
         }
       });
   buildOutputFrame.getContentPane().add(new BuildOutputPanel(buildOutput));
   desktopPane.add(buildOutputFrame);
   buildOutputFrame.setLocation(0, 0);
   buildOutputFrame.setSize(desktopPane.getSize());
   buildOutputFrame.setVisible(true);
 }
コード例 #4
0
  /**
   * MouseListener implementation. Shows an internal frame with the picture of the player whose
   * label was clicked.
   */
  public void mouseClicked(MouseEvent evt) {
    Object source = evt.getSource();

    if ((source == whiteLabel) || (source == blackLabel)) {
      String name = (source == whiteLabel ? getGame().getWhiteName() : getGame().getBlackName());
      URL url;
      try {
        url = new URL("http://www.chessclub.com/mugshots/" + name + ".jpg");
      } catch (MalformedURLException e) {
        e.printStackTrace();
        return;
      }

      JInternalFrame frame = new UserImageInternalFrame(url, name);
      frame.setLocation(0, 0);
      JDesktopPane desktop = boardManager.getPluginContext().getMainFrame().getDesktop();
      desktop.add(frame, JLayeredPane.PALETTE_LAYER);
      frame.setSize(frame.getPreferredSize());
      frame.setVisible(true);
      frame.toFront();
    }
  }