Examples of KeyListener


Examples of java.awt.event.KeyListener

     * Return a JTextField usable in a CellEditor.
     */
    public JTextField getJTextField() {
        _textField = new RestorableJTextField();

        KeyListener keyListener = getKeyListener(_textField);
        if (keyListener != null) {
            // special handling of operations while editing this data type
            _textField.addKeyListener(keyListener);
        }
       
View Full Code Here

Examples of java.awt.event.KeyListener

  protected void testKeyListener(Component c)
  {
    KeyListener[] listeners = c.getKeyListeners();
    if (listeners.length > 0)
    {
      KeyListener listener = listeners[0];
      KeyEvent e = new KeyEvent(c, -1, 1111111111l, -1, -1, (char) KeyEvent.VK_ENTER);
      // Test for bug 1541154 (ArrayIndexOutOfBoundsException in DataTypeDouble)
      listener.keyTyped(e);
    }
  }
View Full Code Here

Examples of java.awt.event.KeyListener

    }
  }
 
 
  private void initHotKeyListener() {
    addNewDownloadsTable.addKeyListener( new KeyListener() {
     
      @Override
      public void keyTyped(KeyEvent e) {
        // Nothing to do
      }
View Full Code Here

Examples of java.awt.event.KeyListener

   
    addNewUploadsTable.addMouseListener(new TablePopupMenuMouseListener());
  }
 
  private void initHotKeyListener() {
    addNewUploadsTable.addKeyListener( new KeyListener() {
     
      @Override
      public void keyTyped(KeyEvent e) {
        // Nothing to do
      }
View Full Code Here

Examples of java.awt.event.KeyListener

    }
   
    showToolTipComponentAt(toolTipPropertiesPanel, x, y);
    // Add a key listener that redispatches events to tool tip text fields
    // (don't give focus to tool tip window otherwise plan component window will lose focus)
    this.toolTipKeyListener = new KeyListener() {
        private int focusedTextFieldIndex;
        private JTextComponent focusedTextField;
 
        {
          // Simulate focus on first text field
View Full Code Here

Examples of java.awt.event.KeyListener

                               JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,
                               JScrollPane.HORIZONTAL_SCROLLBAR_AS_NEEDED);

      tfCmd = new JTextField();

      final KeyListener keyL = new KeyAdapter() {
          public void keyPressed(KeyEvent ev) {
            if(ev.getKeyCode() == KeyEvent.VK_UP) {
              if(historyPos > 0) {
                String line = (String)history.elementAt(historyPos-1);
                historyPos--;
View Full Code Here

Examples of java.awt.event.KeyListener

     * Game log
     */
    gameLog = new KTextEdit();
    gameLog.setPreferredSize(new Dimension(getWidth(), 171));

    final KeyListener keyListener = new GameKeyHandler();

    // add a key input system (defined below) to our canvas so we can
    // respond to key pressed
    chatText.addKeyListener(keyListener);
    screen.addKeyListener(keyListener);
View Full Code Here

Examples of java.awt.event.KeyListener

                Component opposite = e.getOppositeComponent();
                if (opposite == null || !hasOverlayFor(opposite))
                    updateOnMainThread(instance()._focus, null);
            }
        });
        _textComp.addKeyListener(new KeyListener() {
            void post (Key key, boolean pressed, char typed) {
                // no need to hop threads here, the JavaKeyboard does that
                ((JavaKeyboard)PlayN.keyboard()).post(key, pressed, typed);
            }
            @Override public void keyTyped (KeyEvent e) {
View Full Code Here

Examples of java.awt.event.KeyListener

public class Listener {

  public static void addKeyListener(final FBEdit fbedit) {
    final JTextPane2 pane2 = fbedit.getJTextPane();
   
    pane2.addKeyListener(new KeyListener() {

      public void keyTyped(KeyEvent keyevent) {
      }

      public void keyPressed(KeyEvent keyevent) {
View Full Code Here

Examples of java.awt.event.KeyListener

            } else {
                // this should not happen ever
                javaPathText.setBackground(Color.RED);
            }

            javaPathText.addKeyListener(new KeyListener() {
                @Override
                public void keyTyped (KeyEvent e) {
                }

                @Override
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.