Package org.pushingpixels.substance.api.inputmaps

Examples of org.pushingpixels.substance.api.inputmaps.SubstanceInputMap


  public SubstanceInputMap getTextAreaFocusInputMap() {
    return this.getMultilineTextComponentFocusInputMap();
  }

  public SubstanceInputMap getTextFieldFocusInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ctrl C", DefaultEditorKit.copyAction);
    result.put("ctrl V", DefaultEditorKit.pasteAction);
    result.put("ctrl X", DefaultEditorKit.cutAction);
    result.put("COPY", DefaultEditorKit.copyAction);
    result.put("PASTE", DefaultEditorKit.pasteAction);
    result.put("CUT", DefaultEditorKit.cutAction);
    result.put("control INSERT", DefaultEditorKit.copyAction);
    result.put("shift INSERT", DefaultEditorKit.pasteAction);
    result.put("shift DELETE", DefaultEditorKit.cutAction);

    result.put("shift LEFT", DefaultEditorKit.selectionBackwardAction);
    result.put("shift KP_LEFT", DefaultEditorKit.selectionBackwardAction);
    result.put("shift RIGHT", DefaultEditorKit.selectionForwardAction);
    result.put("shift KP_RIGHT", DefaultEditorKit.selectionForwardAction);
    result.put("ctrl LEFT", DefaultEditorKit.previousWordAction);
    result.put("ctrl KP_LEFT", DefaultEditorKit.previousWordAction);
    result.put("ctrl RIGHT", DefaultEditorKit.nextWordAction);
    result.put("ctrl KP_RIGHT", DefaultEditorKit.nextWordAction);
    result.put("ctrl shift LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result.put("ctrl shift KP_LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result
        .put("ctrl shift RIGHT",
            DefaultEditorKit.selectionNextWordAction);
    result.put("ctrl shift KP_RIGHT",
        DefaultEditorKit.selectionNextWordAction);

    result.put("ctrl A", DefaultEditorKit.selectAllAction);
    result.put("HOME", DefaultEditorKit.beginLineAction);
    result.put("END", DefaultEditorKit.endLineAction);
    result.put("shift HOME", DefaultEditorKit.selectionBeginLineAction);
    result.put("shift END", DefaultEditorKit.selectionEndLineAction);

    result.put("BACK_SPACE", DefaultEditorKit.deletePrevCharAction);
    result.put("shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction);
    result.put("ctrl H", DefaultEditorKit.deletePrevCharAction);
    result.put("DELETE", DefaultEditorKit.deleteNextCharAction);
    result.put("ctrl DELETE", DefaultEditorKit.deleteNextWordAction);
    result.put("ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction);

    result.put("RIGHT", DefaultEditorKit.forwardAction);
    result.put("LEFT", DefaultEditorKit.backwardAction);
    result.put("KP_RIGHT", DefaultEditorKit.forwardAction);
    result.put("KP_LEFT", DefaultEditorKit.backwardAction);
    result.put("ENTER", JTextField.notifyAction);
    result.put("ctrl BACK_SLASH", TextComponentActions.UNSELECT);
    result.put("control shift O",
        TextComponentActions.TOGGLE_COMPONENT_ORIENTATION);

    return result;

  }
View Full Code Here


    public static final String NAVIGATE_UP = "navigateUp";
    public static final String NAVIGATE_DOWN = "navigateDown";
  }

  public SubstanceInputMap getToolBarAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("UP", ToolBarActions.NAVIGATE_UP);
    result.put("KP_UP", ToolBarActions.NAVIGATE_UP);
    result.put("DOWN", ToolBarActions.NAVIGATE_DOWN);
    result.put("KP_DOWN", ToolBarActions.NAVIGATE_DOWN);
    result.put("LEFT", ToolBarActions.NAVIGATE_LEFT);
    result.put("KP_LEFT", ToolBarActions.NAVIGATE_LEFT);
    result.put("RIGHT", ToolBarActions.NAVIGATE_RIGHT);
    result.put("KP_RIGHT", ToolBarActions.NAVIGATE_RIGHT);

    return result;
  }
View Full Code Here

    public static final String MOVE_SELECTION_TO = "moveSelectionTo";
  }

  public SubstanceInputMap getTreeAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ESCAPE", TreeActions.CANCEL_EDITING);

    return result;

  }
View Full Code Here

    return result;

  }

  public SubstanceInputMap getTreeFocusInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ADD", TreeActions.EXPAND);
    result.put("SUBTRACT", TreeActions.COLLAPSE);

    result.put("ctrl C", COPY);
    result.put("ctrl V", PASTE);
    result.put("ctrl X", CUT);
    result.put("COPY", COPY);
    result.put("PASTE", PASTE);
    result.put("CUT", CUT);
    result.put("control INSERT", COPY);
    result.put("shift INSERT", PASTE);
    result.put("shift DELETE", CUT);

    result.put("UP", TreeActions.SELECT_PREVIOUS);
    result.put("KP_UP", TreeActions.SELECT_PREVIOUS);
    result.put("shift UP", TreeActions.SELECT_PREVIOUS_EXTEND_SELECTION);
    result.put("shift KP_UP", TreeActions.SELECT_PREVIOUS_EXTEND_SELECTION);
    result.put("ctrl shift UP",
        TreeActions.SELECT_PREVIOUS_EXTEND_SELECTION);
    result.put("ctrl shift KP_UP",
        TreeActions.SELECT_PREVIOUS_EXTEND_SELECTION);
    result.put("ctrl UP", TreeActions.SELECT_PREVIOUS_CHANGE_LEAD);
    result.put("ctrl KP_UP", TreeActions.SELECT_PREVIOUS_CHANGE_LEAD);

    result.put("DOWN", TreeActions.SELECT_NEXT);
    result.put("KP_DOWN", TreeActions.SELECT_NEXT);
    result.put("shift DOWN", TreeActions.SELECT_NEXT_EXTEND_SELECTION);
    result.put("shift KP_DOWN", TreeActions.SELECT_NEXT_EXTEND_SELECTION);
    result.put("ctrl shift DOWN", TreeActions.SELECT_NEXT_EXTEND_SELECTION);
    result.put("ctrl shift KP_DOWN",
        TreeActions.SELECT_NEXT_EXTEND_SELECTION);
    result.put("ctrl DOWN", TreeActions.SELECT_NEXT_CHANGE_LEAD);
    result.put("ctrl KP_DOWN", TreeActions.SELECT_NEXT_CHANGE_LEAD);

    result.put("RIGHT", TreeActions.SELECT_CHILD);
    result.put("KP_RIGHT", TreeActions.SELECT_CHILD);
    result.put("LEFT", TreeActions.SELECT_PARENT);
    result.put("KP_LEFT", TreeActions.SELECT_PARENT);

    result.put("PAGE_UP", TreeActions.SCROLL_UP_CHANGE_SELECTION);
    result.put("shift PAGE_UP", TreeActions.SCROLL_UP_EXTEND_SELECTION);
    result
        .put("ctrl shift PAGE_UP",
            TreeActions.SCROLL_UP_EXTEND_SELECTION);
    result.put("ctrl PAGE_UP", TreeActions.SCROLL_UP_CHANGE_LEAD);
    result.put("PAGE_DOWN", TreeActions.SCROLL_DOWN_CHANGE_SELECTION);
    result.put("shift PAGE_DOWN", TreeActions.SCROLL_DOWN_EXTEND_SELECTION);
    result.put("ctrl shift PAGE_DOWN",
        TreeActions.SCROLL_DOWN_EXTEND_SELECTION);
    result.put("ctrl PAGE_DOWN", TreeActions.SCROLL_DOWN_CHANGE_LEAD);

    result.put("HOME", TreeActions.SELECT_FIRST);
    result.put("shift HOME", TreeActions.SELECT_FIRST_EXTEND_SELECTION);
    result
        .put("ctrl shift HOME",
            TreeActions.SELECT_FIRST_EXTEND_SELECTION);
    result.put("ctrl HOME", TreeActions.SELECT_FIRST_CHANGE_LEAD);
    result.put("END", TreeActions.SELECT_LAST);
    result.put("shift END", TreeActions.SELECT_LAST_EXTEND_SELECTION);
    result.put("ctrl shift END", TreeActions.SELECT_LAST_EXTEND_SELECTION);
    result.put("ctrl END", TreeActions.SELECT_LAST_CHANGE_LEAD);

    result.put("F2", TreeActions.START_EDITING);
    result.put("ctrl A", TreeActions.SELECT_ALL);
    result.put("ctrl SLASH", TreeActions.SELECT_ALL);
    result.put("ctrl BACK_SLASH", TreeActions.CLEAR_SELECTION);

    result.put("ctrl LEFT", TreeActions.SCROLL_LEFT);
    result.put("ctrl KP_LEFT", TreeActions.SCROLL_LEFT);
    result.put("ctrl RIGHT", TreeActions.SCROLL_RIGHT);
    result.put("ctrl KP_RIGHT", TreeActions.SCROLL_RIGHT);

    result.put("SPACE", TreeActions.ADD_TO_SELECTION);
    result.put("ctrl SPACE", TreeActions.TOGGLE_AND_ANCHOR);
    result.put("shift SPACE", TreeActions.EXTEND_TO);
    result.put("ctrl shift SPACE", TreeActions.MOVE_SELECTION_TO);

    return result;
  };
View Full Code Here

    return result;
  }

  @Override
  public SubstanceInputMap getTabbedPaneAncestorInputMap() {
    SubstanceInputMap result = super.getTabbedPaneAncestorInputMap();

    result.put("ctrl TAB", TabbedPaneActions.NEXT);
    result.put("shift ctrl TAB", TabbedPaneActions.PREVIOUS);

    return result;
  }
View Full Code Here

    return result;
  }

  @Override
  public SubstanceInputMap getTreeFocusInputMap() {
    SubstanceInputMap result = super.getTreeFocusInputMap();

    result.remove("ADD");
    result.put("BACK_SPACE", TreeActions.MOVE_SELECTION_TO_PARENT);
    result.remove("SUBTRACT");

    result.put("typed +", TreeActions.EXPAND);
    result.put("typed -", TreeActions.COLLAPSE);

    return result;
  }
View Full Code Here

  public static final String CUT = (String) TransferHandler.getCutAction()
      .getValue(Action.NAME);

  protected SubstanceInputMap getActionControlFocusInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();
    result.put("SPACE", PRESSED);
    result.put("released SPACE", RELEASED);
    return result;
  }
View Full Code Here

    public static final String HOME = "homePassThrough";
    public static final String END = "endPassThrough";
  }

  public SubstanceInputMap getComboBoxAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ESCAPE", ComboActions.HIDE);
    result.put("PAGE_UP", ComboActions.PAGE_UP);
    result.put("PAGE_DOWN", ComboActions.PAGE_DOWN);
    result.put("HOME", ComboActions.HOME);
    result.put("END", ComboActions.END);
    result.put("DOWN", ComboActions.DOWN);
    result.put("KP_DOWN", ComboActions.DOWN);
    result.put("alt DOWN", ComboActions.TOGGLE);
    result.put("alt KP_DOWN", ComboActions.TOGGLE);
    result.put("alt UP", ComboActions.TOGGLE);
    result.put("alt KP_UP", ComboActions.TOGGLE);
    result.put("SPACE", ComboActions.TOGGLE_2);
    result.put("ENTER", ComboActions.ENTER);
    result.put("UP", ComboActions.UP);
    result.put("KP_UP", ComboActions.UP);

    return result;
  };
View Full Code Here

    public static String NAVIGATE_NEXT = "navigateNext";
    public static String NAVIGATE_PREVIOUS = "navigatePrevious";
  }

  public SubstanceInputMap getDesktopAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ctrl F5", DesktopPaneActions.RESTORE);
    result.put("ctrl F4", DesktopPaneActions.CLOSE);
    result.put("ctrl F7", DesktopPaneActions.MOVE);
    result.put("ctrl F8", DesktopPaneActions.RESIZE);

    result.put("RIGHT", DesktopPaneActions.RIGHT);
    result.put("KP_RIGHT", DesktopPaneActions.RIGHT);
    result.put("shift RIGHT", DesktopPaneActions.SHRINK_RIGHT);
    result.put("shift KP_RIGHT", DesktopPaneActions.SHRINK_RIGHT);
    result.put("LEFT", DesktopPaneActions.LEFT);
    result.put("KP_LEFT", DesktopPaneActions.LEFT);
    result.put("shift LEFT", DesktopPaneActions.SHRINK_LEFT);
    result.put("shift KP_LEFT", DesktopPaneActions.SHRINK_LEFT);

    result.put("UP", DesktopPaneActions.UP);
    result.put("KP_UP", DesktopPaneActions.UP);
    result.put("shift UP", DesktopPaneActions.SHRINK_UP);
    result.put("shift KP_UP", DesktopPaneActions.SHRINK_UP);
    result.put("DOWN", DesktopPaneActions.DOWN);
    result.put("KP_DOWN", DesktopPaneActions.DOWN);
    result.put("shift DOWN", DesktopPaneActions.SHRINK_DOWN);
    result.put("shift KP_DOWN", DesktopPaneActions.SHRINK_DOWN);

    result.put("ESCAPE", DesktopPaneActions.ESCAPE);
    result.put("ctrl F9", DesktopPaneActions.MINIMIZE);
    result.put("ctrl F10", DesktopPaneActions.MAXIMIZE);

    result.put("ctrl F6", DesktopPaneActions.NEXT_FRAME);
    result.put("ctrl TAB", DesktopPaneActions.NEXT_FRAME);
    result.put("ctrl alt F6", DesktopPaneActions.NEXT_FRAME);
    result.put("shift ctrl alt F6", DesktopPaneActions.PREVIOUS_FRAME);
    result.put("ctrl F12", DesktopPaneActions.NAVIGATE_NEXT);
    result.put("shift ctrl F12", DesktopPaneActions.NAVIGATE_PREVIOUS);

    return result;
  }
View Full Code Here

    public static final String INCREMENT = "increment";
    public static final String DECREMENT = "decrement";
  }

  protected SubstanceInputMap getMultilineTextComponentFocusInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ctrl C", DefaultEditorKit.copyAction);
    result.put("ctrl V", DefaultEditorKit.pasteAction);
    result.put("ctrl X", DefaultEditorKit.cutAction);
    result.put("COPY", DefaultEditorKit.copyAction);
    result.put("PASTE", DefaultEditorKit.pasteAction);
    result.put("CUT", DefaultEditorKit.cutAction);
    result.put("control INSERT", DefaultEditorKit.copyAction);
    result.put("shift INSERT", DefaultEditorKit.pasteAction);
    result.put("shift DELETE", DefaultEditorKit.cutAction);

    result.put("shift LEFT", DefaultEditorKit.selectionBackwardAction);
    result.put("shift KP_LEFT", DefaultEditorKit.selectionBackwardAction);
    result.put("shift RIGHT", DefaultEditorKit.selectionForwardAction);
    result.put("shift KP_RIGHT", DefaultEditorKit.selectionForwardAction);
    result.put("ctrl LEFT", DefaultEditorKit.previousWordAction);
    result.put("ctrl KP_LEFT", DefaultEditorKit.previousWordAction);
    result.put("ctrl RIGHT", DefaultEditorKit.nextWordAction);
    result.put("ctrl KP_RIGHT", DefaultEditorKit.nextWordAction);
    result.put("ctrl shift LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result.put("ctrl shift KP_LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result
        .put("ctrl shift RIGHT",
            DefaultEditorKit.selectionNextWordAction);
    result.put("ctrl shift KP_RIGHT",
        DefaultEditorKit.selectionNextWordAction);

    result.put("ctrl A", DefaultEditorKit.selectAllAction);
    result.put("HOME", DefaultEditorKit.beginLineAction);
    result.put("END", DefaultEditorKit.endLineAction);
    result.put("shift HOME", DefaultEditorKit.selectionBeginLineAction);
    result.put("shift END", DefaultEditorKit.selectionEndLineAction);

    result.put("UP", DefaultEditorKit.upAction);
    result.put("KP_UP", DefaultEditorKit.upAction);
    result.put("DOWN", DefaultEditorKit.downAction);
    result.put("KP_DOWN", DefaultEditorKit.downAction);
    result.put("PAGE_UP", DefaultEditorKit.pageUpAction);
    result.put("PAGE_DOWN", DefaultEditorKit.pageDownAction);

    result.put("shift PAGE_UP", TextComponentActions.SELECTION_PAGE_UP);
    result.put("shift PAGE_DOWN", TextComponentActions.SELECTION_PAGE_DOWN);
    result.put("ctrl shift PAGE_UP",
        TextComponentActions.SELECTION_PAGE_LEFT);
    result.put("ctrl shift PAGE_DOWN",
        TextComponentActions.SELECTION_PAGE_RIGHT);
    result.put("shift UP", DefaultEditorKit.selectionUpAction);
    result.put("shift KP_UP", DefaultEditorKit.selectionUpAction);
    result.put("shift DOWN", DefaultEditorKit.selectionDownAction);
    result.put("shift KP_DOWN", DefaultEditorKit.selectionDownAction);

    result.put("ctrl shift HOME", DefaultEditorKit.selectionBeginAction);
    result.put("ctrl shift END", DefaultEditorKit.selectionEndAction);

    result.put("ENTER", DefaultEditorKit.insertBreakAction);
    result.put("BACK_SPACE", DefaultEditorKit.deletePrevCharAction);
    result.put("shift BACK_SPACE", DefaultEditorKit.deletePrevCharAction);
    result.put("ctrl H", DefaultEditorKit.deletePrevCharAction);
    result.put("DELETE", DefaultEditorKit.deleteNextCharAction);
    result.put("ctrl DELETE", DefaultEditorKit.deleteNextWordAction);
    result.put("ctrl BACK_SPACE", DefaultEditorKit.deletePrevWordAction);

    result.put("RIGHT", DefaultEditorKit.forwardAction);
    result.put("KP_RIGHT", DefaultEditorKit.forwardAction);
    result.put("LEFT", DefaultEditorKit.backwardAction);
    result.put("KP_LEFT", DefaultEditorKit.backwardAction);
    result.put("TAB", DefaultEditorKit.insertTabAction);
    result.put("ctrl BACK_SLASH", TextComponentActions.UNSELECT);
    result.put("ctrl HOME", DefaultEditorKit.beginAction);
    result.put("ctrl END", DefaultEditorKit.endAction);

    result.put("ctrl T", TextComponentActions.NEXT_LINK);
    result.put("ctrl shift T", TextComponentActions.PREVIOUS_LINK);
    result.put("ctrl SPACE", TextComponentActions.ACTIVATE_LINK);
    result.put("control shift O",
        TextComponentActions.TOGGLE_COMPONENT_ORIENTATION);

    return result;
  };
View Full Code Here

TOP

Related Classes of org.pushingpixels.substance.api.inputmaps.SubstanceInputMap

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.