Package java.awt

Examples of java.awt.KeyboardFocusManager.addPropertyChangeListener()


    if (editorRemover == null)
    {
      final KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
      editorRemover = new CellEditorRemover(fm);
      fm.addPropertyChangeListener("permanentFocusOwner", editorRemover); // NON-NLS
    }

    this.editorComponent = editorComponent;

    final float zoomFactor = getRenderContext().getZoomModel().getZoomAsPercentage();
View Full Code Here


   * Creates a new focus-tracker and registers it on the permanent-focus-owner property.
   */
  protected FocusTracker()
  {
    final KeyboardFocusManager currentManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
    currentManager.addPropertyChangeListener(PERMANENT_FOCUS_OWNER, new FocusManagerChangeHandler());
  }

  /**
   * A notifier method that is called whenever the permanentFocusOwner property changed.
   *
 
View Full Code Here

    };

    KeyboardFocusManager focusManager = KeyboardFocusManager
        .getCurrentKeyboardFocusManager();
    focusManager.addPropertyChangeListener(new PropertyChangeListener() {

      /*
       * (non-Javadoc)
       */
      public void propertyChange(PropertyChangeEvent e) {
View Full Code Here

            return false;
       
        if(editorRemover == null) {
            KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
            editorRemover = new CellEditorRemover(fm);
            fm.addPropertyChangeListener("permanentFocusOwner", editorRemover);
        }
       
        if(editor != null && editor.isCellEditable(e)) {
            editorComp = prepareEditor(index);
            if(editorComp == null) {
View Full Code Here

    if (editorRemover == null)
    {
      final KeyboardFocusManager fm = KeyboardFocusManager.getCurrentKeyboardFocusManager();
      editorRemover = new CellEditorRemover(fm);
      fm.addPropertyChangeListener("permanentFocusOwner", editorRemover); // NON-NLS
    }

    this.editorComponent = editorComponent;

    final float zoomFactor = getRenderContext().getZoomModel().getZoomAsPercentage();
View Full Code Here

    //This code based on Java DnD tutorial
    public TransferActionListener() {
      KeyboardFocusManager manager = KeyboardFocusManager.
      getCurrentKeyboardFocusManager();
      manager.addPropertyChangeListener("permanentFocusOwner", this);
    }

    @Override
    public void propertyChange(PropertyChangeEvent e) {
      Object o = e.getNewValue();
View Full Code Here

            public void run() {
                DockbarTracker tracker = new DockbarTracker();
                // register a propertyChangeListener to update the 'currrent'
                // DockbarManager each time the focused window changes
                KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
                focusManager.addPropertyChangeListener(tracker);

                // register an AWTEventListener to handle low-level mouse events
                long evtType = AWTEvent.MOUSE_MOTION_EVENT_MASK | AWTEvent.MOUSE_EVENT_MASK;
                Toolkit.getDefaultToolkit().addAWTEventListener(tracker, evtType);
            }
View Full Code Here

        PROP_EVENTS.add(ACTIVE_WINDOW);

        EventQueue.invokeLater(new Runnable() {
                public void run() {
                    KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
                    focusManager.addPropertyChangeListener(SINGLETON);
                }
            });

        Toolkit.getDefaultToolkit().addAWTEventListener(SINGLETON, AWTEvent.MOUSE_EVENT_MASK);
    }
View Full Code Here

       
        contentScrollPane.getHorizontalScrollBar().setCursor(Cursor.getDefaultCursor());
        contentScrollPane.getVerticalScrollBar().setCursor(Cursor.getDefaultCursor());
       
        KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.addPropertyChangeListener("permanentFocusOwner", focusChangeListener);
    }
   
    /**
     * Removes the focus change listener that is installed by this editor.
     */
 
View Full Code Here

    /**
     * Install a listener for focus events to handle focusing the editing sections.
     */   
    public void addFocusListener() {
        KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.addPropertyChangeListener("focusOwner", focusListener);
    }

    /**
     * Removes the focus listener installed by the editor panel. This must be called
     * when the editor panel is disposed off, otherwise it will leak a focus listener.
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.