Package javax.swing.plaf

Examples of javax.swing.plaf.ComponentInputMapUIResource


        if (m != 0) {
            InputMap map = SwingUtilities.getUIInputMap(
                    b, JComponent.WHEN_IN_FOCUSED_WINDOW);

            if (map == null) {
                map = new ComponentInputMapUIResource(b);
                SwingUtilities.replaceUIInputMap(b,
                        JComponent.WHEN_IN_FOCUSED_WINDOW, map);
            }
            map.clear();
            map.put(KeyStroke.getKeyStroke(m, JideSwingUtilities.getFocusAcceleratorKeyMask(), false),
View Full Code Here


        InputMap map = SwingUtilities.getUIInputMap(c,
                JComponent.WHEN_IN_FOCUSED_WINDOW);
       
        if (m != 0) {
            if (map == null) {
                map = new ComponentInputMapUIResource(c);
                SwingUtilities.replaceUIInputMap(c,
                        JComponent.WHEN_IN_FOCUSED_WINDOW, map);
            }
           
            map.clear();
View Full Code Here

            comp.setFont(UIManager.getFont(fontName));
        }
    }

    public static ComponentInputMap makeComponentInputMap(final JComponent comp, final Object[] keys) {
        ComponentInputMapUIResource result = new ComponentInputMapUIResource(comp);
        loadKeyBindings(result, keys);

        return result;
    }
View Full Code Here

  if(m != 0) {
      InputMap map = SwingUtilities.getUIInputMap(
                                b, JComponent.WHEN_IN_FOCUSED_WINDOW);

            if (map == null) {
    map = new ComponentInputMapUIResource(b);
    SwingUtilities.replaceUIInputMap(b,
             JComponent.WHEN_IN_FOCUSED_WINDOW, map);
      }
            map.clear();
            map.put(KeyStroke.getKeyStroke(m, InputEvent.ALT_MASK, false),
View Full Code Here

        if (needToAdd) {
            if (needToRemove && wasInputMap) {
                im.remove(KeyStroke.getKeyStroke(lastFocusAccelerator,
                                                 InputEvent.ALT_DOWN_MASK));
            } else if (!wasInputMap) {
                im = new ComponentInputMapUIResource(component);
                im.put(KeyStroke.getKeyStroke(accelerator,
                                              InputEvent.ALT_DOWN_MASK),
                       FOCUS_ACTION_NAME);
                if (!wasInputMap) {
                    SwingUtilities.replaceUIInputMap(component,
View Full Code Here

        if(m != 0) {
            InputMap map = SwingUtilities.getUIInputMap(
                                b, JComponent.WHEN_IN_FOCUSED_WINDOW);

            if (map == null) {
                map = new ComponentInputMapUIResource(b);
                SwingUtilities.replaceUIInputMap(b,
                               JComponent.WHEN_IN_FOCUSED_WINDOW, map);
            }
            map.clear();
            map.put(KeyStroke.getKeyStroke(m, BasicLookAndFeel.getFocusAcceleratorKeyMask(), false),
View Full Code Here

        if (m != 0) {
            InputMap map = SwingUtilities.getUIInputMap(
                    b, JComponent.WHEN_IN_FOCUSED_WINDOW);

            if (map == null) {
                map = new ComponentInputMapUIResource(b);
                SwingUtilities.replaceUIInputMap(b,
                        JComponent.WHEN_IN_FOCUSED_WINDOW, map);
            }
            map.clear();
            map.put(KeyStroke.getKeyStroke(m, InputEvent.ALT_MASK, false),
View Full Code Here

        if (needToAdd) {
            if (needToRemove && wasInputMap) {
                im.remove(KeyStroke.getKeyStroke(lastFocusAccelerator,
                                                 InputEvent.ALT_DOWN_MASK));
            } else if (!wasInputMap) {
                im = new ComponentInputMapUIResource(component);
                im.put(KeyStroke.getKeyStroke(accelerator,
                                              InputEvent.ALT_DOWN_MASK),
                       FOCUS_ACTION_NAME);
                if (!wasInputMap) {
                    SwingUtilities.replaceUIInputMap(component,
View Full Code Here

        if (needToAdd) {
            if (needToRemove && wasInputMap) {
                im.remove(KeyStroke.getKeyStroke(lastFocusAccelerator,
                                                 InputEvent.ALT_DOWN_MASK));
            } else if (!wasInputMap) {
                im = new ComponentInputMapUIResource(component);
                im.put(KeyStroke.getKeyStroke(accelerator,
                                              InputEvent.ALT_DOWN_MASK),
                       FOCUS_ACTION_NAME);
                if (!wasInputMap) {
                    SwingUtilities.replaceUIInputMap(component,
View Full Code Here

            comp.setFont(UIManager.getFont(fontName));
        }
    }

    public static ComponentInputMap makeComponentInputMap(final JComponent comp, final Object[] keys) {
        ComponentInputMapUIResource result = new ComponentInputMapUIResource(comp);
        loadKeyBindings(result, keys);

        return result;
    }
View Full Code Here

TOP

Related Classes of javax.swing.plaf.ComponentInputMapUIResource

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.