Package java.awt

Examples of java.awt.KeyboardFocusManager


        initializePanel();
        initializeMenu();

        addMouseListener(mMouseListener);
        addWindowListener(mWindowListener);
        KeyboardFocusManager keyboardFocusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        keyboardFocusManager.addKeyEventDispatcher(mKeyEventDispatcher);

        pack();
        setImage(null);
    }
View Full Code Here


        contentPanel.setLayout(new BoxLayout(contentPanel, BoxLayout.Y_AXIS));
       
        contentScrollPane.getHorizontalScrollBar().setCursor(Cursor.getDefaultCursor());
        contentScrollPane.getVerticalScrollBar().setCursor(Cursor.getDefaultCursor());
       
        KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.addPropertyChangeListener("permanentFocusOwner", focusChangeListener);
    }
View Full Code Here

   
    /**
     * Removes the focus change listener that is installed by this editor.
     */
    private void removeFocusListener() {
        KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.removePropertyChangeListener("permanentFocusOwner", focusChangeListener);
    }
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);
    }
View Full Code Here

    /**
     * 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.
     */
    private void removeFocusListener() {
        KeyboardFocusManager focusManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.removePropertyChangeListener("focusOwner", focusListener);       
    }
View Full Code Here

        logger = ClientContext.getBootLogger();
        chart = (Chart) owner;
        logger.debug("ChartMediator constractor");
       
        fpcl = new FocusPropertyChangeListener();
        KeyboardFocusManager focusManager =
                KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.addPropertyChangeListener(fpcl);
       
        undoManager = new UndoManager();
    }
View Full Code Here

    }
   
    public void dispose() {
//pns   logger.debug("ChartMediator dispose");
//      logger.info("ChartMediator: dispose");
        KeyboardFocusManager focusManager =
                KeyboardFocusManager.getCurrentKeyboardFocusManager();
        focusManager.removePropertyChangeListener(fpcl);
//        ActionMap actions = getActions();
//        Object[] keys = actions.keys();
//        for ( Object o : keys) {
//            Action a = actions.get(o);
//            if (a instanceof ReflectAction) {
View Full Code Here

public class TransferActionListener implements ActionListener,
                                              PropertyChangeListener {
    private JComponent focusOwner;
   
    public TransferActionListener() {
        KeyboardFocusManager manager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        manager.addPropertyChangeListener("permanentFocusOwner", this);
    }
View Full Code Here

        KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new DefaultFocusTraversalPolicy());
        focusManagerEnabled = false;
    }

    public static FocusManager getCurrentManager() {
        KeyboardFocusManager currentManager = KeyboardFocusManager.getCurrentKeyboardFocusManager();
        if (currentManager instanceof FocusManager) {
            return (FocusManager)currentManager;
        }
        return null;
    }
View Full Code Here

    f.setBackground(backgroundColor);
    f.setForeground(textColor);
    f.setFont(fonte);
    f.getContentPane().setBackground(backgroundColor);
    f.getContentPane().setFont(fonte);
    KeyboardFocusManager manager = KeyboardFocusManager
        .getCurrentKeyboardFocusManager();
    manager.addKeyEventDispatcher((KeyEventDispatcher) f.getContentPane());

    FontMetrics fonteM = f.getFontMetrics(f.getFont());
    int ascent = fonteM.getMaxAscent();
    int descent = fonteM.getMaxDescent();
    int advance = fonteM.getMaxAdvance();
View Full Code Here

TOP

Related Classes of java.awt.KeyboardFocusManager

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.