Package java.awt.event

Examples of java.awt.event.FocusListener


      cmHolder.add(m_cost_ba);
      cmHolder.add(m_cost_bb);
      cmHolder.add(m_cost_actualB);
      costPanel.add(cmHolder, BorderLayout.CENTER);
     
      FocusListener fl = new FocusListener() {
        public void focusGained(FocusEvent e) {
         
        }
       
        public void focusLost(FocusEvent e) {
View Full Code Here


        _tfValue.addActionListener(new ActionListener(){
            @Override
            public void actionPerformed(ActionEvent e) {
                readText();
            }});
        _tfValue.addFocusListener(new FocusListener(){
            @Override
            public void focusLost(FocusEvent e) {
                readText();
            }
            @Override
View Full Code Here

        addActionListener(new ActionListener(){
            @Override
            public void actionPerformed(ActionEvent e) {
                readText();
            }});
        addFocusListener(new FocusListener(){
            @Override
            public void focusLost(FocusEvent e) {
                readText();
            }
            @Override
View Full Code Here

  private final JabRefPreferences prefs;

  public GroupsPrefsTab(JabRefPreferences prefs) {
    this.prefs = prefs;
   
    keywordSeparator.addFocusListener(new FocusListener() {
      public void focusGained(FocusEvent e) {
        keywordSeparator.selectAll();
      }
      public void focusLost(FocusEvent e) {
        // deselection is automatic
View Full Code Here

        UIUtil.jGridBagAdd(namePanel, new JLabel("Name:"), gBC2, GridBagConstraints.REMAINDER);

        UIUtil.jGridBagAdd(namePanel, fontName = new JTextField(10), gBC2, GridBagConstraints.REMAINDER);

        fontName.addFocusListener(new FocusListener() {

            public void focusGained(FocusEvent e) {

                fontName.selectAll();
View Full Code Here

                if (SwingUtilities.isRightMouseButton(evt)) {
                    showPopup(evt.getX(), evt.getY());
                }
            }
        });
        addFocusListener(new FocusListener() {
            public void focusGained(FocusEvent evt) {
                XTextField.this.selectAll();
            }

            public void focusLost(FocusEvent evt) {
View Full Code Here

      feedbackComponent = (JComponent)component.getParent().getParent();
    } else {
      feedbackComponent = component;
    }
    feedbackComponent.setBorder(unfocusedViewBorder);
    component.addFocusListener(new FocusListener() {
        public void focusLost(FocusEvent ev) {
          if (feedbackComponent.getBorder() == focusedViewBorder) {
            feedbackComponent.setBorder(unfocusedViewBorder);
          }
        }
View Full Code Here

            }
         })
       
        buttonPanel.add(close);
        frame.setSize(500,400);
        output.addFocusListener(new FocusListener () {
            public void focusGained (FocusEvent fe){
            }
            public void focusLost (FocusEvent fe){
                frame.setVisible(false);
                frame.dispose();
View Full Code Here

        public void removeUpdate(DocumentEvent ev) {
          changedUpdate(ev);
        }
      };
    this.headerFormatTextField.getDocument().addDocumentListener(documentListener);
    FocusListener textFieldFocusListener = new FocusListener() {
        public void focusGained(FocusEvent ev) {
          ActionMap actionMap = getActionMap();
          for (HomePrintableComponent.Variable field : HomePrintableComponent.Variable.values()) {
            actionMap.get(field).setEnabled(true);
          }
View Full Code Here

    chatText.addKeyListener(tabcompletion);

    /*
     * Always redirect focus to chat field
     */
    screen.addFocusListener(new FocusListener() {
      public void focusGained(final FocusEvent e) {
        chatText.getPlayerChatText().requestFocus();
      }

      public void focusLost(final FocusEvent e) {
View Full Code Here

TOP

Related Classes of java.awt.event.FocusListener

Copyright © 2018 www.massapicom. 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.