Package org.pushingpixels.substance.api.inputmaps

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


    public static final String REFRESH = "refresh";
    public static final String GO_UP = "Go Up";
  }

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

    result.put("ESCAPE", FileChooserActions.CANCEL_SELECTION);
    result.put("F2", FileChooserActions.EDIT_FILE_NAME);
    result.put("F5", FileChooserActions.REFRESH);
    result.put("BACK_SPACE", FileChooserActions.GO_UP);
    result.put("ENTER", FileChooserActions.APPROVE_SELECTION);
    result.put("ctrl ENTER", FileChooserActions.APPROVE_SELECTION);

    return result;
  }
View Full Code Here


    return result;
  }

  @Override
  public SubstanceInputMap getFormattedTextFieldFocusInputMap() {
    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);
    result.put("ESCAPE", TextComponentActions.RESET_FIELD_EDIT);
    result.put("UP", TextComponentActions.INCREMENT);
    result.put("KP_UP", TextComponentActions.INCREMENT);
    result.put("DOWN", TextComponentActions.DECREMENT);
    result.put("KP_DOWN", TextComponentActions.DECREMENT);

    return result;
  }
View Full Code Here

    public static final String MOVE_SELECTION_TO = "moveSelectionTo";

  }

  public SubstanceInputMap getListFocusInputMap() {
    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("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("ctrl shift UP", ListActions.SELECT_PREVIOUS_ROW_EXTEND);
    result.put("ctrl shift KP_UP", ListActions.SELECT_PREVIOUS_ROW_EXTEND);
    result.put("ctrl UP", ListActions.SELECT_PREVIOUS_ROW_CHANGE_LEAD);
    result.put("ctrl KP_UP", ListActions.SELECT_PREVIOUS_ROW_CHANGE_LEAD);

    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("ctrl shift DOWN", ListActions.SELECT_NEXT_ROW_EXTEND);
    result.put("ctrl shift KP_DOWN", ListActions.SELECT_NEXT_ROW_EXTEND);
    result.put("ctrl DOWN", ListActions.SELECT_NEXT_ROW_CHANGE_LEAD);
    result.put("ctrl KP_DOWN", ListActions.SELECT_NEXT_ROW_CHANGE_LEAD);

    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("ctrl shift LEFT",
            ListActions.SELECT_PREVIOUS_COLUMN_EXTEND);
    result.put("ctrl shift KP_LEFT",
        ListActions.SELECT_PREVIOUS_COLUMN_EXTEND);
    result.put("ctrl LEFT", ListActions.SELECT_PREVIOUS_COLUMN_CHANGE_LEAD);
    result.put("ctrl KP_LEFT",
        ListActions.SELECT_PREVIOUS_COLUMN_CHANGE_LEAD);

    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("ctrl shift RIGHT", ListActions.SELECT_NEXT_COLUMN_EXTEND);
    result
        .put("ctrl shift KP_RIGHT",
            ListActions.SELECT_NEXT_COLUMN_EXTEND);
    result.put("ctrl RIGHT", ListActions.SELECT_NEXT_COLUMN_CHANGE_LEAD);
    result.put("ctrl KP_RIGHT", ListActions.SELECT_NEXT_COLUMN_CHANGE_LEAD);

    result.put("HOME", ListActions.SELECT_FIRST_ROW);
    result.put("shift HOME", ListActions.SELECT_FIRST_ROW_EXTEND);
    result.put("ctrl shift HOME", ListActions.SELECT_FIRST_ROW_EXTEND);
    result.put("ctrl HOME", ListActions.SELECT_FIRST_ROW_CHANGE_LEAD);
    result.put("END", ListActions.SELECT_LAST_ROW);
    result.put("shift END", ListActions.SELECT_LAST_ROW_EXTEND);
    result.put("ctrl shift END", ListActions.SELECT_LAST_ROW_EXTEND);
    result.put("ctrl END", ListActions.SELECT_LAST_ROW_CHANGE_LEAD);

    result.put("PAGE_UP", ListActions.SCROLL_UP);
    result.put("shift PAGE_UP", ListActions.SCROLL_UP_EXTEND);
    result.put("ctrl shift PAGE_UP", ListActions.SCROLL_UP_EXTEND);
    result.put("ctrl PAGE_UP", ListActions.SCROLL_UP_CHANGE_LEAD);
    result.put("PAGE_DOWN", ListActions.SCROLL_DOWN);
    result.put("shift PAGE_DOWN", ListActions.SCROLL_DOWN_EXTEND);
    result.put("ctrl shift PAGE_DOWN", ListActions.SCROLL_DOWN_EXTEND);
    result.put("ctrl PAGE_DOWN", ListActions.SCROLL_DOWN_CHANGE_LEAD);

    result.put("ctrl A", ListActions.SELECT_ALL);
    result.put("ctrl SLASH", ListActions.SELECT_ALL);
    result.put("ctrl BACK_SLASH", ListActions.CLEAR_SELECTION);
    result.put("SPACE", ListActions.ADD_TO_SELECTION);
    result.put("ctrl SPACE", ListActions.TOGGLE_AND_ANCHOR);
    result.put("shift SPACE", ListActions.EXTEND_TO);
    result.put("ctrl shift SPACE", ListActions.MOVE_SELECTION_TO);

    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.