public Object[] allKeys() { loadIfNecessary(); return super.allKeys(); }
public void put(Action action) { put(action.getValue(Action.NAME), action); }
/** * Returns an ActionMap that will be populated by invoking the * <code>loadActionMap</code> method on the specified Class * when necessary. * <p> * This should be used if the ActionMap can be shared. * * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for * existing map and what resulting Map will be registered on. */ static ActionMap getActionMap(Class loaderClass, String defaultsKey) { ActionMap map = (ActionMap)UIManager.get(defaultsKey); if (map == null) { map = new LazyActionMap(loaderClass); UIManager.getLookAndFeelDefaults().put(defaultsKey, map); } return map; }
/** * Registers the keyboard bindings on the <code>JList</code> that the * <code>BasicXListUI</code> is associated with. This method is called at * installUI() time. * * @see #installUI */ protected void installKeyboardActions() { InputMap inputMap = getInputMap(JComponent.WHEN_FOCUSED); SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, inputMap); LazyActionMap.installLazyActionMap(list, BasicXListUI.class, "XList.actionMap"); }
/** * Returns an ActionMap that will be populated by invoking the * <code>loadActionMap</code> method on the specified Class * when necessary. * <p> * This should be used if the ActionMap can be shared. * * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for * existing map and what resulting Map will be registered on. */ static ActionMap getActionMap(Class loaderClass, String defaultsKey) { ActionMap map = (ActionMap)UIManager.get(defaultsKey); if (map == null) { map = new LazyActionMap(loaderClass); UIManager.getLookAndFeelDefaults().put(defaultsKey, map); } return map; }
/** * Registers the keyboard bindings on the <code>JList</code> that the * <code>BasicXListUI</code> is associated with. This method is called at * installUI() time. * * @see #installUI */ protected void installKeyboardActions() { InputMap inputMap = getInputMap(JComponent.WHEN_FOCUSED); SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, inputMap); LazyActionMap.installLazyActionMap(list, BasicXListUI.class, "XList.actionMap"); }
public Object[] allKeys() { loadIfNecessary(); return super.allKeys(); }
public void put(Action action) { put(action.getValue(Action.NAME), action); }
/** * Returns an ActionMap that will be populated by invoking the * <code>loadActionMap</code> method on the specified Class * when necessary. * <p> * This should be used if the ActionMap can be shared. * * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for * existing map and what resulting Map will be registered on. */ static ActionMap getActionMap(Class loaderClass, String defaultsKey) { ActionMap map = (ActionMap)UIManager.get(defaultsKey); if (map == null) { map = new LazyActionMap(loaderClass); UIManager.getLookAndFeelDefaults().put(defaultsKey, map); } return map; }
/** * Registers the keyboard bindings on the <code>JList</code> that the * <code>BasicXListUI</code> is associated with. This method is called at * installUI() time. * * @see #installUI */ protected void installKeyboardActions() { InputMap inputMap = getInputMap(JComponent.WHEN_FOCUSED); SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, inputMap); LazyActionMap.installLazyActionMap(list, BasicXListUI.class, "XList.actionMap"); }
public void setParent(ActionMap map) { loadIfNecessary(); super.setParent(map); }
public void put(Action action) { put(action.getValue(Action.NAME), action); }
/** * Returns an ActionMap that will be populated by invoking the * <code>loadActionMap</code> method on the specified Class * when necessary. * <p> * This should be used if the ActionMap can be shared. * * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for * existing map and what resulting Map will be registered on. */ static ActionMap getActionMap(Class loaderClass, String defaultsKey) { ActionMap map = (ActionMap)UIManager.get(defaultsKey); if (map == null) { map = new LazyActionMap(loaderClass); UIManager.getLookAndFeelDefaults().put(defaultsKey, map); } return map; }
/** * Registers the keyboard bindings on the <code>JList</code> that the * <code>BasicXListUI</code> is associated with. This method is called at * installUI() time. * * @see #installUI */ protected void installKeyboardActions() { InputMap inputMap = getInputMap(JComponent.WHEN_FOCUSED); SwingUtilities.replaceUIInputMap(list, JComponent.WHEN_FOCUSED, inputMap); LazyActionMap.installLazyActionMap(list, BasicXListUI.class, "XList.actionMap"); }
public Action get(Object key) { loadIfNecessary(); return super.get(key); }
public void put(Action action) { put(action.getValue(Action.NAME), action); }
/** * Installs an ActionMap that will be populated by invoking the * <code>loadActionMap</code> method on the specified Class * when necessary. * <p> * This should be used if the ActionMap can be shared. * * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for * existing map and what resulting Map will be registered on. */ public static void installLazyActionMap(JComponent c, Class loaderClass, String defaultsKey) { ActionMap map = (ActionMap)UIManager.get(defaultsKey); if (map == null) { map = new LazyActionMap(loaderClass); UIManager.getLookAndFeelDefaults().put(defaultsKey, map); } SwingUtilities.replaceUIActionMap(c, map); }
public void clear() { loadIfNecessary(); super.clear(); }
public static void loadActionMap(LazyActionMap map) { map.put(new Actions(Actions.SELECT_PREVIOUS_COLUMN)); map.put(new Actions(Actions.SELECT_PREVIOUS_COLUMN_EXTEND)); map.put(new Actions(Actions.SELECT_PREVIOUS_COLUMN_CHANGE_LEAD)); map.put(new Actions(Actions.SELECT_NEXT_COLUMN)); map.put(new Actions(Actions.SELECT_NEXT_COLUMN_EXTEND)); map.put(new Actions(Actions.SELECT_NEXT_COLUMN_CHANGE_LEAD)); map.put(new Actions(Actions.SELECT_PREVIOUS_ROW)); map.put(new Actions(Actions.SELECT_PREVIOUS_ROW_EXTEND)); map.put(new Actions(Actions.SELECT_PREVIOUS_ROW_CHANGE_LEAD)); map.put(new Actions(Actions.SELECT_NEXT_ROW)); map.put(new Actions(Actions.SELECT_NEXT_ROW_EXTEND)); map.put(new Actions(Actions.SELECT_NEXT_ROW_CHANGE_LEAD)); map.put(new Actions(Actions.SELECT_FIRST_ROW)); map.put(new Actions(Actions.SELECT_FIRST_ROW_EXTEND)); map.put(new Actions(Actions.SELECT_FIRST_ROW_CHANGE_LEAD)); map.put(new Actions(Actions.SELECT_LAST_ROW)); map.put(new Actions(Actions.SELECT_LAST_ROW_EXTEND)); map.put(new Actions(Actions.SELECT_LAST_ROW_CHANGE_LEAD)); map.put(new Actions(Actions.SCROLL_UP)); map.put(new Actions(Actions.SCROLL_UP_EXTEND)); map.put(new Actions(Actions.SCROLL_UP_CHANGE_LEAD)); map.put(new Actions(Actions.SCROLL_DOWN)); map.put(new Actions(Actions.SCROLL_DOWN_EXTEND)); map.put(new Actions(Actions.SCROLL_DOWN_CHANGE_LEAD)); map.put(new Actions(Actions.SELECT_ALL)); map.put(new Actions(Actions.CLEAR_SELECTION)); map.put(new Actions(Actions.ADD_TO_SELECTION)); map.put(new Actions(Actions.TOGGLE_AND_ANCHOR)); map.put(new Actions(Actions.EXTEND_TO));
/** * Installs an ActionMap that will be populated by invoking the * <code>loadActionMap</code> method on the specified Class * when necessary. * <p> * This should be used if the ActionMap can be shared. * * @param c JComponent to install the ActionMap on. * @param loaderClass Class object that gets loadActionMap invoked * on. * @param defaultsKey Key to use to defaults table to check for * existing map and what resulting Map will be registered on. */ public static void installLazyActionMap(JComponent c, Class loaderClass, String defaultsKey) { ActionMap map = (ActionMap)UIManager.get(defaultsKey); if (map == null) { map = new LazyActionMap(loaderClass); UIManager.getLookAndFeelDefaults().put(defaultsKey, map); } SwingUtilities.replaceUIActionMap(c, map); }