Package javax.swing.text

Examples of javax.swing.text.JTextComponent.selectAll()


            super(Messages.getString("ErrorDialog.9")); //$NON-NLS-1$
        }

        public void actionPerformed( ActionEvent evt ) {
            JTextComponent text = (JTextComponent)extErrorText;
            text.selectAll();
            text.copy();
            text.setCaretPosition(0);
        }
    }
View Full Code Here


            super(Messages.getString("ErrorDialog.9")); //$NON-NLS-1$
        }

        public void actionPerformed( ActionEvent evt ) {
            JTextComponent text = (JTextComponent)extErrorText;
            text.selectAll();
            text.copy();
            text.setCaretPosition(0);
        }
    }
View Full Code Here

            super(Messages.getString("ErrorDialog.9")); //$NON-NLS-1$
        }

        public void actionPerformed( ActionEvent evt ) {
            JTextComponent text = (JTextComponent)extErrorText;
            text.selectAll();
            text.copy();
            text.setCaretPosition(0);
        }
    }
View Full Code Here

        if (notesTable.editCellAt(row, 1))
        {
          final JTextComponent textEditor = (JTextComponent)
            ((JScrollPane) notesTable.getEditorComponent()).getViewport().getView();
          textEditor.requestFocusInWindow();
          textEditor.selectAll();
        }
      }
    });
  }
View Full Code Here

    // this depends on who has the focus right now.
    final Component owner = FocusManager.getCurrentManager().getPermanentFocusOwner();
    if (owner instanceof JTextComponent)
    {
      final JTextComponent textComponent = (JTextComponent) owner;
      textComponent.selectAll();
    }
    else if (owner instanceof TextComponent)
    {
      final TextComponent textComponent = (TextComponent) owner;
      textComponent.selectAll();
View Full Code Here

      textComponent.selectAll();
    }
    else if (owner instanceof TextComponent)
    {
      final TextComponent textComponent = (TextComponent) owner;
      textComponent.selectAll();
    }
    else if (owner instanceof JTable)
    {
      final JTable table = (JTable) owner;
      table.selectAll();
View Full Code Here

        int i = text.indexOf("${}");
        if (i != -1) {
            textField.setCaretPosition(i + 2);
        } else {
            textField.selectAll();
        }
    }

    public String getInitialEditValue() {
        return initialEditValue;
View Full Code Here

        int i = text.indexOf("${}");
        if (i != -1) {
            textField.setCaretPosition(i + 2);
        } else {
            textField.selectAll();
        }
    }

    public String getInitialEditValue() {
        return initialEditValue;
View Full Code Here

    int i = text.indexOf("${}");
    if (i != -1)
      textField.setCaretPosition(i + 2);
    else
      textField.selectAll();
  }

  /**
   * @return
   */
 
View Full Code Here

     * @param e  the focus event.
     */
    public void focusGained(final FocusEvent e) {
        if (e.getSource() instanceof JTextComponent) {
            final JTextComponent tex = (JTextComponent) e.getSource();
            tex.selectAll();
        }
    }

    /**
     * Deselects the text when a field loses the focus.
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.