Examples of requestFocusInWindow()


Examples of javax.swing.JEditorPane.requestFocusInWindow()

      private static final long serialVersionUID = 1L;

      //set initial focus to textArea
      @Override
      public void selectInitialValue() {
        textArea.requestFocusInWindow();
      }
    };
    final JDialog edit = editPane.createDialog(null, TextUtils.getText("plugins/latex/LatexNodeHook.editorTitle"));
    edit.setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE);
    // set content and rendering for textArea
View Full Code Here

Examples of javax.swing.JMenuBar.requestFocusInWindow()

                @Override
                public void run() {
                    JFrame frame = window.getFrame();
                    JMenuBar menuBar = frame.getJMenuBar();
                    if (menuBar != null) {
                        menuBar.requestFocusInWindow();
                    }
                }
            });
        }
    }
View Full Code Here

Examples of javax.swing.JPasswordField.requestFocusInWindow()

            {
                Timer timer = new Timer(50, new ActionListener()
                {
                    public void actionPerformed(ActionEvent ev)
                    {
                       passwordField.requestFocusInWindow();
                    }
                });
                timer.setRepeats(false);
                timer.start();
            }
View Full Code Here

Examples of javax.swing.JRadioButton.requestFocusInWindow()

     * Gives focus to the currently selected button. If no button is selected, focus is given to the
     * first button.
     */
    public void requestFocus() {
        JRadioButton b = getButtonToFocus();
        b.requestFocusInWindow();
    }

    private JRadioButton getButtonToFocus() {
        JRadioButton b = buttons.getSelectedButton();
        if (b == null) {
View Full Code Here

Examples of javax.swing.JSpinner.requestFocusInWindow()

      @Override
      public void menuKeyPressed(MenuKeyEvent e) {
        if (e.getKeyCode() == KeyEvent.VK_RIGHT && menu.isSelected()) {
          spinner.setVisible(true);
          spinner.requestFocusInWindow();
          ((NumberEditor) spinner.getEditor()).requestFocusInWindow();
          myTextField.selectAll();
        }
      }
View Full Code Here

Examples of javax.swing.JTable.requestFocusInWindow()

            if (aph != null){
                JTable table = (JTable)aph.getObject();
                // TF:27/9/07:Row and columns will be 1-based, and we need them to be 0-based
                int row = ((ParameterHolder)ev.getParameter("row")).getInt()-1
                int col = ((ParameterHolder)ev.getParameter("column")).getInt()-1
                table.requestFocusInWindow();
                if (table.getCellEditor()!= null)
                    table.getCellEditor().cancelCellEditing();
                table.changeSelection(row, col,  false, false);
                //FormattedCellEditor ed = (FormattedCellEditor)table.getCellEditor(row, col);
                table.editCellAt(row, col);
View Full Code Here

Examples of javax.swing.JTable.requestFocusInWindow()

            if (aph != null){
                JTable table = (JTable)aph.getObject();
                // TF:27/9/07:Row and columns will be 1-based, and we need them to be 0-based
                int row = ((ParameterHolder)ev.getParameter("row")).getInt()-1
                int col = ((ParameterHolder)ev.getParameter("column")).getInt()-1
                table.requestFocusInWindow();
                if (table.getCellEditor()!= null)
                    table.getCellEditor().cancelCellEditing();
                table.changeSelection(row, col,  false, false);
                //FormattedCellEditor ed = (FormattedCellEditor)table.getCellEditor(row, col);
                table.editCellAt(row, col);
View Full Code Here

Examples of javax.swing.JTable.requestFocusInWindow()

            if (aph != null){
                JTable table = (JTable)aph.getObject();
                // TF:27/9/07:Row and columns will be 1-based, and we need them to be 0-based
                int row = ((ParameterHolder)ev.getParameter("row")).getInt()-1
                int col = ((ParameterHolder)ev.getParameter("column")).getInt()-1
                table.requestFocusInWindow();
                if (table.getCellEditor()!= null)
                    table.getCellEditor().cancelCellEditing();
                table.changeSelection(row, col,  false, false);
                //FormattedCellEditor ed = (FormattedCellEditor)table.getCellEditor(row, col);
                table.editCellAt(row, col);
View Full Code Here

Examples of javax.swing.JTextArea.requestFocusInWindow()

        testIsGuardedButton.addActionListener(new ActionListener() {

            @Override
            public void actionPerformed(ActionEvent e) {
                System.out.println("isGuarded() = " + guard.isGuarded(text.getCaretPosition()));
                text.requestFocusInWindow();
            }
        });
        JFrame frame = new JFrame("DocumentSectionGuardTest");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        frame.add(new JScrollPane(text), BorderLayout.CENTER);
View Full Code Here

Examples of javax.swing.JTextField.requestFocusInWindow()

   
    while (true) {
      field.selectAll();
      dlog.pack();
      dlog.setVisible(true);
      field.requestFocusInWindow();
      Object action = pane.getValue();
      if (action == null || !(action instanceof Integer)
          || ((Integer) action).intValue() != JOptionPane.OK_OPTION) {
        return null;
      }
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.