Package java.awt

Examples of java.awt.Component.addFocusListener()


        if (currentEditor != null) currentEditor.transferFocus();

        Component editor = row.getEditor(parent);
        if (editor instanceof JComboBox) {
          ((JComboBox) editor).addActionListener(this);
          editor.addFocusListener(this);
        } else if (editor instanceof JInputComponent) {
          JInputComponent input = (JInputComponent) editor;
          MyDialog dlog;
          Window parent = AttrTable.this.parent;
          if (parent instanceof Frame) {
View Full Code Here


                Strings.get("attributeChangeInvalidTitle"),
                JOptionPane.WARNING_MESSAGE);
          }
          editor = new JLabel(row.getValue());
        } else {
          editor.addFocusListener(this);
        }
        currentRow = row;
        currentEditor = editor;
        return editor;
      }
View Full Code Here

  }
  public Component getTableCellEditorComponent(JTable arg0, Object arg1, boolean arg2, int arg3, int arg4) {
    final Component result = myProxiedEditor.getTableCellEditorComponent(arg0, arg1,arg2, arg3, arg4);
    if (result instanceof JTextComponent) {
      ((JTextComponent)result).selectAll();
      result.addFocusListener(new FocusAdapter() {
        public void focusGained(FocusEvent arg0) {
          super.focusGained(arg0);
          ((JTextComponent)result).selectAll();
          result.removeFocusListener(this);
        }
View Full Code Here

        {
            ce.stopCellEditing();
        }
        else if(editor != null)
        {
            editor.addFocusListener(this);
        }
        this.firePropertyChange();
    }

    private class AddListener implements ActionListener
View Full Code Here

        comp.setFont(f);
      }
      comp.setBounds(bounds);
      comp.doLayout();
      glassPlane.add(comp);
      comp.addFocusListener(this);
      glassPlane.validate();
      glassPlane.repaint();
      comp.repaint();
      iEditor.setFocus();
      currentEditor = new EditorAdapter(adapter, iEditor);
View Full Code Here

        if (UIManager.getBoolean("ScrollPane.useChildTextComponentFocus")) {
            viewportViewFocusHandler = new ViewportViewFocusHandler();
            c.getViewport().addContainerListener(viewportViewFocusHandler);
            Component view = c.getViewport().getView();
            if (view instanceof JTextComponent) {
                view.addFocusListener(viewportViewFocusHandler);
            }
        }
    }

    protected void uninstallListeners(JComponent c) {
View Full Code Here

        {
            ce.stopCellEditing();
        }
        else if(editor != null)
        {
            editor.addFocusListener(this);
        }
        this.firePropertyChange();
    }

    private class AddListener implements ActionListener
View Full Code Here

        {
            ce.stopCellEditing();
        }
        else if(editor != null)
        {
            editor.addFocusListener(this);
        }
        this.firePropertyChange();
    }

    private class AddListener implements ActionListener
View Full Code Here

        {
            ce.stopCellEditing();
        }
        else if(editor != null)
        {
            editor.addFocusListener(this);
        }
        this.firePropertyChange();
    }

    private class AddListener implements ActionListener
View Full Code Here

  private void startEditingAfterSelect(final NodeModel newNode) {
    final Component component = Controller.getCurrentController().getMapViewManager().getComponent(newNode);
    if(component == null)
      return;
    component.addFocusListener(new FocusListener() {
      public void focusLost(FocusEvent e) {
      }

      public void focusGained(FocusEvent e) {
        e.getComponent().removeFocusListener(this);
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.