Examples of requestFocus()


Examples of javafx.scene.shape.Rectangle.requestFocus()

    this.screenHeight = screenHeight;

    Rectangle inputCapture = new Rectangle();
    inputCapture.setFill(Color.TRANSPARENT);
    inputCapture.setFocusTraversable(true);
    inputCapture.requestFocus();

    // capture keyboard events
    inputCapture.setOnKeyPressed(new EventHandler<KeyEvent>() {
      @Override
      public void handle(KeyEvent ke) {
View Full Code Here

Examples of javafx.stage.Stage.requestFocus()

      p = n.localToScreen(p);
      proposalStage.setX(p.getX());
      proposalStage.setY(p.getY()+height);
      proposalStage.show();
      Stage s = (Stage) contentAssistSubjectControlAdapter.getControl().getScene().getWindow();
      s.requestFocus();
//      s.setFocused(true);
      contentAssistSubjectControlAdapter.getControl().requestFocus();
    }
  }
 
View Full Code Here

Examples of javax.media.opengl.GLCanvas.requestFocus()

    add(canvas,BorderLayout.CENTER);
    canvas.addGLEventListener(renderer);       
    canvas.addKeyListener(renderer);
    //canvas.addMouseMotionListener(renderer);
    //canvas.addMouseListener(renderer);
    canvas.requestFocus();     
  }   
 
  public static void main(String[] args) {
    new Frame().setVisible(true);
  }
View Full Code Here

Examples of javax.swing.JButton.requestFocus()

    // add view button
    JButton viewButton = new JButton("View");
    // viewButton.setToolTipText( "View results of already processed data");
    viewButton.setDefaultCapable(true);
    viewButton.setRequestFocusEnabled(true);
    viewButton.requestFocus();
    viewButton.addFocusListener(tlf);

    // copy into the mediator
    prefsMed.setDocButtons(runButton, interButton, viewButton);
    // Add the run button to another panel
View Full Code Here

Examples of javax.swing.JComponent.requestFocus()

//        mainPage.setFocusTraversalPolicy(customPolicy);
        tabbedPane.addFocusListener(new FocusAdapter() {
            boolean isFirstTime = true;
            public void focusGained(FocusEvent e) {
                if (isFirstTime) {
                    mainPage.requestFocus();
                    isFirstTime = false;
                }
                super.focusGained(e);
            }
           
View Full Code Here

Examples of javax.swing.JDesktopPane.requestFocus()

        if (parent != null) {
            parent.remove(child);
        }
        removeIcon(frame);
        if (parent.getAllFrames().length == 0) {
          parent.requestFocus();
        }
    }
   
    private void selectNextFrame(JInternalFrame frame) {
      if (frame.isSelected()) {
View Full Code Here

Examples of javax.swing.JDialog.requestFocus()

    //aboutDialog.pack(); tata ei saa laittaa paalle, sellainen on getAboutDialog():ssa!
    Point loc = getJFrame().getLocation();
    loc.translate(20, 20);
    dialog.setLocation(loc);
    dialog.setVisible(true);
    dialog.requestFocus();
 
  }
 
  /**
   * saves property values into user home values
View Full Code Here

Examples of javax.swing.JEditorPane.requestFocus()

          catch (Exception ex)
          {
            ex.printStackTrace();
          }

          editorPane.requestFocus();
          editorPane.select(start, ende);
        }
        else
        {
          mxIGraphModel model = graphComponent.getGraph().getModel();
View Full Code Here

Examples of javax.swing.JFormattedTextField.requestFocus()

   
    if (component instanceof JTextComponent) {
        if ( component instanceof JFormattedTextField ){
        try {
          JFormattedTextField field = ((JFormattedTextField)component);
          field.requestFocus();
          field.setText(value);
          //launch an exception for invalid input
          field.commitEdit();
          //lose focus to format the value
          forceToLooseFocus(component);
View Full Code Here

Examples of javax.swing.JFrame.requestFocus()

    fenetreRender.setVisible(true);
    fenetreRender.pack();
    fenetreRender.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    fenetreRender.setFocusable(true);
    fenetreRender.setResizable(false);
    fenetreRender.requestFocus();
    fenetreRender.addKeyListener(clavier);
   
    this.fenetreCtrl = new JFrame("Driver Simulator");
    this.visuRoute = new PanelVisuRoute();
    this.fenetreCtrl.add(visuRoute);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.