Package org.pushingpixels.substance.api.inputmaps

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


    return result;
  }

  @Override
  public SubstanceInputMap getFileChooserAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ESCAPE", FileChooserActions.CANCEL_SELECTION);
    result.put("F5", FileChooserActions.REFRESH);

    return result;
  }
View Full Code Here


    return result;
  }

  @Override
  public SubstanceInputMap getListFocusInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("meta C", COPY);
    result.put("meta V", PASTE);
    result.put("meta X", CUT);
    result.put("COPY", COPY);
    result.put("PASTE", PASTE);
    result.put("CUT", CUT);

    result.put("UP", ListActions.SELECT_PREVIOUS_ROW);
    result.put("KP_UP", ListActions.SELECT_PREVIOUS_ROW);
    result.put("shift UP", ListActions.SELECT_PREVIOUS_ROW_EXTEND);
    result.put("shift KP_UP", ListActions.SELECT_PREVIOUS_ROW_EXTEND);

    result.put("DOWN", ListActions.SELECT_NEXT_ROW);
    result.put("KP_DOWN", ListActions.SELECT_NEXT_ROW);
    result.put("shift DOWN", ListActions.SELECT_NEXT_ROW_EXTEND);
    result.put("shift KP_DOWN", ListActions.SELECT_NEXT_ROW_EXTEND);

    result.put("LEFT", ListActions.SELECT_PREVIOUS_COLUMN);
    result.put("KP_LEFT", ListActions.SELECT_PREVIOUS_COLUMN);
    result.put("shift LEFT", ListActions.SELECT_PREVIOUS_COLUMN_EXTEND);
    result.put("shift KP_LEFT", ListActions.SELECT_PREVIOUS_COLUMN_EXTEND);

    result.put("RIGHT", ListActions.SELECT_NEXT_COLUMN);
    result.put("KP_RIGHT", ListActions.SELECT_NEXT_COLUMN);
    result.put("shift RIGHT", ListActions.SELECT_NEXT_COLUMN_EXTEND);
    result.put("shift KP_RIGHT", ListActions.SELECT_NEXT_COLUMN_EXTEND);

    result.put("shift HOME", ListActions.SELECT_FIRST_ROW_EXTEND);
    result.put("shift END", ListActions.SELECT_LAST_ROW_EXTEND);

    result.put("shift PAGE_UP", ListActions.SCROLL_UP_EXTEND);
    result.put("shift PAGE_DOWN", ListActions.SCROLL_DOWN_EXTEND);

    result.put("meta A", ListActions.SELECT_ALL);

    // XXX: missing:
    // END -> aquaEnd
    // HOME -> aquaHome
View Full Code Here

    return this.getSingleLineTextComponentFocusInputMap();
  }

  @Override
  public SubstanceInputMap getScrollPaneAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("RIGHT", ScrollPaneActions.UNIT_SCROLL_RIGHT);
    result.put("KP_RIGHT", ScrollPaneActions.UNIT_SCROLL_RIGHT);
    result.put("DOWN", ScrollPaneActions.UNIT_SCROLL_DOWN);
    result.put("KP_DOWN", ScrollPaneActions.UNIT_SCROLL_DOWN);
    result.put("LEFT", ScrollPaneActions.UNIT_SCROLL_LEFT);
    result.put("KP_LEFT", ScrollPaneActions.UNIT_SCROLL_LEFT);
    result.put("UP", ScrollPaneActions.UNIT_SCROLL_UP);
    result.put("KP_UP", ScrollPaneActions.UNIT_SCROLL_UP);

    result.put("PAGE_UP", ScrollPaneActions.SCROLL_UP);
    result.put("PAGE_DOWN", ScrollPaneActions.SCROLL_DOWN);
    result.put("HOME", ScrollPaneActions.SCROLL_HOME);
    result.put("END", ScrollPaneActions.SCROLL_END);

    return result;
  }
View Full Code Here

    return result;
  }

  @Override
  public SubstanceInputMap getSliderFocusInputMap() {
    SubstanceInputMap result = super.getSliderFocusInputMap();
    result.remove("ctrl PAGE_DOWN");
    result.remove("ctrl PAGE_UP");
    return result;
  }
View Full Code Here

    return result;
  }

  @Override
  public SubstanceInputMap getTableAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("meta C", COPY);
    result.put("meta V", PASTE);
    result.put("meta X", CUT);
    result.put("COPY", COPY);
    result.put("PASTE", PASTE);
    result.put("CUT", CUT);

    result.put("RIGHT", TableActions.NEXT_COLUMN);
    result.put("KP_RIGHT", TableActions.NEXT_COLUMN);
    result.put("shift RIGHT", TableActions.NEXT_COLUMN_EXTEND_SELECTION);
    result.put("shift KP_RIGHT", TableActions.NEXT_COLUMN_EXTEND_SELECTION);

    result.put("LEFT", TableActions.PREVIOUS_COLUMN);
    result.put("KP_LEFT", TableActions.PREVIOUS_COLUMN);
    result.put("shift LEFT", TableActions.PREVIOUS_COLUMN_EXTEND_SELECTION);
    result.put("shift KP_LEFT",
        TableActions.PREVIOUS_COLUMN_EXTEND_SELECTION);

    result.put("DOWN", TableActions.NEXT_ROW);
    result.put("KP_DOWN", TableActions.NEXT_ROW);
    result.put("shift DOWN", TableActions.NEXT_ROW_EXTEND_SELECTION);
    result.put("shift KP_DOWN", TableActions.NEXT_ROW_EXTEND_SELECTION);

    result.put("UP", TableActions.PREVIOUS_ROW);
    result.put("KP_UP", TableActions.PREVIOUS_ROW);
    result.put("shift UP", TableActions.PREVIOUS_ROW_EXTEND_SELECTION);
    result.put("shift KP_UP", TableActions.PREVIOUS_ROW_EXTEND_SELECTION);

    result.put("HOME", TableActions.FIRST_COLUMN);
    result.put("shift HOME", TableActions.FIRST_COLUMN_EXTEND_SELECTION);
    result.put("END", TableActions.LAST_COLUMN);
    result.put("shift END", TableActions.LAST_COLUMN_EXTEND_SELECTION);

    result.put("PAGE_UP", TableActions.SCROLL_UP_CHANGE_SELECTION);
    result.put("shift PAGE_UP", TableActions.SCROLL_UP_EXTEND_SELECTION);
    result.put("PAGE_DOWN", TableActions.SCROLL_DOWN_CHANGE_SELECTION);
    result
        .put("shift PAGE_DOWN",
            TableActions.SCROLL_DOWN_EXTEND_SELECTION);

    result.put("TAB", TableActions.NEXT_COLUMN_CELL);
    result.put("shift TAB", TableActions.PREVIOUS_COLUMN_CELL);
    result.put("ENTER", TableActions.NEXT_ROW_CELL);
    result.put("shift ENTER", TableActions.PREVIOUS_ROW_CELL);
    result.put("meta A", TableActions.SELECT_ALL);

    result.put("alt TAB", TableActions.FOCUS_HEADER);
    result.put("shift alt TAB", TableActions.FOCUS_HEADER);

    return result;
  }
View Full Code Here

    return this.getSingleLineTextComponentFocusInputMap();
  }

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

    result.put("meta C", COPY);
    result.put("meta V", PASTE);
    result.put("meta X", CUT);
    result.put("COPY", COPY);
    result.put("PASTE", PASTE);
    result.put("CUT", 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("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 A", TreeActions.SELECT_ALL);

    // XXX: in Aqua this is mapped to aquaExpandNode
    result.put("RIGHT", TreeActions.EXPAND);
    result.put("KP_RIGHT", TreeActions.EXPAND);
    result.put("ctrl RIGHT", TreeActions.EXPAND);
    result.put("ctrl KP_RIGHT", TreeActions.EXPAND);
    result.put("shift RIGHT", TreeActions.EXPAND);
    result.put("shift KP_RIGHT", TreeActions.EXPAND);

    // XXX: in Aqua this is mapped to aquaCollapseNode
    result.put("LEFT", TreeActions.COLLAPSE);
    result.put("KP_LEFT", TreeActions.COLLAPSE);
    result.put("ctrl LEFT", TreeActions.COLLAPSE);
    result.put("ctrl KP_LEFT", TreeActions.COLLAPSE);
    result.put("shift LEFT", TreeActions.COLLAPSE);
    result.put("shift KP_LEFT", TreeActions.COLLAPSE);

    // XXX: in Aqua there are mappings to aquaFullyCollapseNode and
    // aquaFullyExpandNode

    return result;
View Full Code Here

    public static final String SCROLL_BACKWARD = "scrollTabsBackwardAction";
  }

  @Override
  public SubstanceInputMap getTabbedPaneAncestorInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("ctrl PAGE_DOWN", TabbedPaneActions.PAGE_DOWN);
    result.put("ctrl PAGE_UP", TabbedPaneActions.PAGE_UP);
    result.put("ctrl UP", TabbedPaneActions.REQUEST_FOCUS);
    result.put("ctrl KP_UP", TabbedPaneActions.REQUEST_FOCUS);

    return result;
  }
View Full Code Here

    return result;
  }

  @Override
  public SubstanceInputMap getTabbedPaneFocusInputMap() {
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("RIGHT", TabbedPaneActions.RIGHT);
    result.put("KP_RIGHT", TabbedPaneActions.RIGHT);
    result.put("LEFT", TabbedPaneActions.LEFT);
    result.put("KP_LEFT", TabbedPaneActions.LEFT);

    result.put("UP", TabbedPaneActions.UP);
    result.put("KP_UP", TabbedPaneActions.UP);
    result.put("DOWN", TabbedPaneActions.DOWN);
    result.put("KP_DOWN", TabbedPaneActions.DOWN);

    result.put("ctrl DOWN", TabbedPaneActions.REQUEST_FOCUS_FOR_VISIBLE);
    result.put("ctrl KP_DOWN", TabbedPaneActions.REQUEST_FOCUS_FOR_VISIBLE);

    return result;
  }
View Full Code Here

    public static final String FOCUS_HEADER = "focusHeader";
  }

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

    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("RIGHT", TableActions.NEXT_COLUMN);
    result.put("KP_RIGHT", TableActions.NEXT_COLUMN);
    result.put("shift RIGHT", TableActions.NEXT_COLUMN_EXTEND_SELECTION);
    result.put("shift KP_RIGHT", TableActions.NEXT_COLUMN_EXTEND_SELECTION);
    result.put("ctrl shift RIGHT",
        TableActions.NEXT_COLUMN_EXTEND_SELECTION);
    result.put("ctrl shift KP_RIGHT",
        TableActions.NEXT_COLUMN_EXTEND_SELECTION);
    result.put("ctrl RIGHT", TableActions.NEXT_COLUMN_CHANGE_LEAD);
    result.put("ctrl KP_RIGHT", TableActions.NEXT_COLUMN_CHANGE_LEAD);

    result.put("LEFT", TableActions.PREVIOUS_COLUMN);
    result.put("KP_LEFT", TableActions.PREVIOUS_COLUMN);
    result.put("shift LEFT", TableActions.PREVIOUS_COLUMN_EXTEND_SELECTION);
    result.put("shift KP_LEFT",
        TableActions.PREVIOUS_COLUMN_EXTEND_SELECTION);
    result.put("ctrl shift LEFT",
        TableActions.PREVIOUS_COLUMN_EXTEND_SELECTION);
    result.put("ctrl shift KP_LEFT",
        TableActions.PREVIOUS_COLUMN_EXTEND_SELECTION);
    result.put("ctrl LEFT", TableActions.PREVIOUS_COLUMN_CHANGE_LEAD);
    result.put("ctrl KP_LEFT", TableActions.PREVIOUS_COLUMN_CHANGE_LEAD);

    result.put("DOWN", TableActions.NEXT_ROW);
    result.put("KP_DOWN", TableActions.NEXT_ROW);
    result.put("shift DOWN", TableActions.NEXT_ROW_EXTEND_SELECTION);
    result.put("shift KP_DOWN", TableActions.NEXT_ROW_EXTEND_SELECTION);
    result.put("ctrl shift DOWN", TableActions.NEXT_ROW_EXTEND_SELECTION);
    result
        .put("ctrl shift KP_DOWN",
            TableActions.NEXT_ROW_EXTEND_SELECTION);
    result.put("ctrl DOWN", TableActions.NEXT_ROW_CHANGE_LEAD);
    result.put("ctrl KP_DOWN", TableActions.NEXT_ROW_CHANGE_LEAD);

    result.put("UP", TableActions.PREVIOUS_ROW);
    result.put("KP_UP", TableActions.PREVIOUS_ROW);
    result.put("shift UP", TableActions.PREVIOUS_ROW_EXTEND_SELECTION);
    result.put("shift KP_UP", TableActions.PREVIOUS_ROW_EXTEND_SELECTION);
    result.put("ctrl shift UP", TableActions.PREVIOUS_ROW_EXTEND_SELECTION);
    result.put("ctrl shift KP_UP",
        TableActions.PREVIOUS_ROW_EXTEND_SELECTION);
    result.put("ctrl UP", TableActions.PREVIOUS_ROW_CHANGE_LEAD);
    result.put("ctrl KP_UP", TableActions.PREVIOUS_ROW_CHANGE_LEAD);

    result.put("HOME", TableActions.FIRST_COLUMN);
    result.put("shift HOME", TableActions.FIRST_COLUMN_EXTEND_SELECTION);
    result.put("ctrl shift HOME", TableActions.FIRST_ROW_EXTEND_SELECTION);
    result.put("ctrl HOME", TableActions.FIRST_ROW);
    result.put("END", TableActions.LAST_COLUMN);
    result.put("shift END", TableActions.LAST_COLUMN_EXTEND_SELECTION);
    result.put("ctrl shift END", TableActions.LAST_ROW_EXTEND_SELECTION);
    result.put("ctrl END", TableActions.LAST_ROW);

    result.put("PAGE_UP", TableActions.SCROLL_UP_CHANGE_SELECTION);
    result.put("shift PAGE_UP", TableActions.SCROLL_UP_EXTEND_SELECTION);
    result.put("ctrl shift PAGE_UP",
        TableActions.SCROLL_LEFT_EXTEND_SELECTION);
    result.put("ctrl PAGE_UP", TableActions.SCROLL_LEFT_CHANGE_SELECTION);
    result.put("PAGE_DOWN", TableActions.SCROLL_DOWN_CHANGE_SELECTION);
    result
        .put("shift PAGE_DOWN",
            TableActions.SCROLL_DOWN_EXTEND_SELECTION);
    result.put("ctrl shift PAGE_DOWN",
        TableActions.SCROLL_RIGHT_EXTEND_SELECTION);
    result
        .put("ctrl PAGE_DOWN",
            TableActions.SCROLL_RIGHT_CHANGE_SELECTION);

    result.put("TAB", TableActions.NEXT_COLUMN_CELL);
    result.put("shift TAB", TableActions.PREVIOUS_COLUMN_CELL);
    result.put("ENTER", TableActions.NEXT_ROW_CELL);
    result.put("shift ENTER", TableActions.PREVIOUS_ROW_CELL);
    result.put("ctrl A", TableActions.SELECT_ALL);
    result.put("ctrl SLASH", TableActions.SELECT_ALL);
    result.put("ctrl BACK_SLASH", TableActions.CLEAR_SELECTION);

    result.put("ESCAPE", TableActions.CANCEL_EDITING);
    result.put("F2", TableActions.START_EDITING);
    result.put("SPACE", TableActions.ADD_TO_SELECTION);
    result.put("ctrl SPACE", TableActions.TOGGLE_AND_ANCHOR);
    result.put("shift SPACE", TableActions.EXTEND_TO);
    result.put("ctrl shift SPACE", TableActions.MOVE_SELECTION_TO);
    result.put("F8", TableActions.FOCUS_HEADER);

    return result;
  }
View Full Code Here

    public static final String RESIZE_RIGHT = "resizeRight";
    public static final String FOCUS_TABLE = "focusTable";
  }

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

    result.put("SPACE", TableHeaderActions.TOGGLE_SORT_ORDER);

    result.put("LEFT", TableHeaderActions.SELECT_COLUMN_TO_LEFT);
    result.put("KP_LEFT", TableHeaderActions.SELECT_COLUMN_TO_LEFT);
    result.put("RIGHT", TableHeaderActions.SELECT_COLUMN_TO_RIGHT);
    result.put("KP_RIGHT", TableHeaderActions.SELECT_COLUMN_TO_RIGHT);

    result.put("alt LEFT", TableHeaderActions.MOVE_COLUMN_LEFT);
    result.put("alt KP_LEFT", TableHeaderActions.MOVE_COLUMN_LEFT);
    result.put("alt RIGHT", TableHeaderActions.MOVE_COLUMN_RIGHT);
    result.put("alt KP_RIGHT", TableHeaderActions.MOVE_COLUMN_RIGHT);

    result.put("alt shift LEFT", TableHeaderActions.RESIZE_LEFT);
    result.put("alt shift KP_LEFT", TableHeaderActions.RESIZE_LEFT);
    result.put("alt shift RIGHT", TableHeaderActions.RESIZE_RIGHT);
    result.put("alt shift KP_RIGHT", TableHeaderActions.RESIZE_RIGHT);

    result.put("ESCAPE", TableHeaderActions.FOCUS_TABLE);

    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.