Package org.pushingpixels.substance.api.inputmaps

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


import org.pushingpixels.substance.api.inputmaps.SubstanceInputMap;

public class WindowsInputMapSet extends BaseInputMapSet {
  @Override
  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_2);
    result.put("KP_DOWN", ComboActions.DOWN_2);
    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("ENTER", ComboActions.ENTER);
    result.put("UP", ComboActions.UP_2);
    result.put("KP_UP", ComboActions.UP_2);

    return result;
  }
View Full Code Here


    return result;
  }

  @Override
  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("LEFT", DesktopPaneActions.LEFT);
    result.put("KP_LEFT", DesktopPaneActions.LEFT);

    result.put("UP", DesktopPaneActions.UP);
    result.put("KP_UP", DesktopPaneActions.UP);
    result.put("DOWN", DesktopPaneActions.DOWN);
    result.put("KP_DOWN", DesktopPaneActions.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

    return result;
  }

  @Override
  protected SubstanceInputMap getMultilineTextComponentFocusInputMap() {
    SubstanceInputMap result = super
        .getMultilineTextComponentFocusInputMap();

    result.remove("ctrl KP_LEFT");
    result.remove("ctrl KP_RIGHT");
    result.remove("KP_DOWN");
    result.remove("KP_UP");
    result.remove("ctrl shift KP_LEFT");
    result.remove("ctrl shift KP_RIGHT");
    result.remove("shift KP_LEFT");
    result.remove("shift KP_RIGHT");
    result.remove("shift KP_DOWN");
    result.remove("shift KP_UP");

    return result;
  }
View Full Code Here

    return result;
  }

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

    result.remove("ctrl KP_LEFT");
    result.remove("ctrl KP_RIGHT");
    result.remove("ctrl shift KP_LEFT");
    result.remove("ctrl shift KP_RIGHT");
    result.remove("shift KP_LEFT");
    result.remove("shift KP_RIGHT");

    return result;
  }
View Full Code Here

    return result;
  }

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

    result.put("ctrl PAGE_DOWN", ScrollBarActions.POSITIVE_BLOCK_INCREMENT);
    result.put("ctrl PAGE_UP", ScrollBarActions.NEGATIVE_BLOCK_INCREMENT);

    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 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 getTextFieldFocusInputMap() {
    SubstanceInputMap result = super.getTextFieldFocusInputMap();

    result.remove("ctrl KP_LEFT");
    result.remove("ctrl KP_RIGHT");
    result.remove("ctrl shift KP_LEFT");
    result.remove("ctrl shift KP_RIGHT");
    result.remove("shift KP_LEFT");
    result.remove("shift KP_RIGHT");

    return result;
  }
View Full Code Here

    // All entries in Aqua are "aqua" except ESCAPE mapped to "hidePopup"
    return super.getComboBoxAncestorInputMap();
  }

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

    result.put("meta C", DefaultEditorKit.copyAction);
    result.put("meta V", DefaultEditorKit.pasteAction);
    result.put("meta X", DefaultEditorKit.cutAction);
    result.put("COPY", DefaultEditorKit.copyAction);
    result.put("PASTE", DefaultEditorKit.pasteAction);
    result.put("CUT", 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("meta LEFT", DefaultEditorKit.beginLineAction);
    result.put("meta KP_LEFT", DefaultEditorKit.beginLineAction);
    result.put("ctrl A", DefaultEditorKit.beginLineAction);
    result.put("UP", DefaultEditorKit.beginLineAction);
    result.put("KP_UP", DefaultEditorKit.beginLineAction);
    result.put("meta RIGHT", DefaultEditorKit.endLineAction);
    result.put("meta KP_RIGHT", DefaultEditorKit.endLineAction);
    result.put("ctrl E", DefaultEditorKit.endLineAction);
    result.put("DOWN", DefaultEditorKit.endLineAction);
    result.put("KP_DOWN", DefaultEditorKit.endLineAction);

    result
        .put("meta shift LEFT",
            DefaultEditorKit.selectionBeginLineAction);
    result.put("meta shift KP_LEFT",
        DefaultEditorKit.selectionBeginLineAction);
    result.put("shift UP", DefaultEditorKit.selectionBeginLineAction);
    result.put("shift KP_UP", DefaultEditorKit.selectionBeginLineAction);
    result.put("meta shift RIGHT", DefaultEditorKit.selectionEndLineAction);
    result.put("meta shift KP_RIGHT",
        DefaultEditorKit.selectionEndLineAction);
    result.put("shift DOWN", DefaultEditorKit.selectionEndLineAction);
    result.put("shift KP_DOWN", DefaultEditorKit.selectionEndLineAction);

    result.put("meta A", DefaultEditorKit.selectAllAction);

    result.put("HOME", DefaultEditorKit.beginAction);
    result.put("ctrl P", DefaultEditorKit.beginAction);
    result.put("meta UP", DefaultEditorKit.beginAction);
    result.put("meta KP_UP", DefaultEditorKit.beginAction);
    result.put("END", DefaultEditorKit.endAction);
    result.put("ctrl N", DefaultEditorKit.endAction);
    result.put("ctrl V", DefaultEditorKit.endAction);
    result.put("meta DOWN", DefaultEditorKit.endAction);
    result.put("meta KP_DOWN", DefaultEditorKit.endAction);

    result.put("shift meta KP_UP", DefaultEditorKit.selectionBeginAction);
    result.put("shift UP", DefaultEditorKit.selectionBeginAction);
    result.put("shift HOME", DefaultEditorKit.selectionBeginAction);
    result.put("shift meta DOWN", DefaultEditorKit.selectionEndAction);
    result.put("shift meta KP_DOWN", DefaultEditorKit.selectionEndAction);
    result.put("shift END", DefaultEditorKit.selectionEndAction);

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

    result.put("RIGHT", DefaultEditorKit.forwardAction);
    result.put("KP_RIGHT", DefaultEditorKit.forwardAction);
    result.put("ctrl F", DefaultEditorKit.forwardAction);
    result.put("LEFT", DefaultEditorKit.backwardAction);
    result.put("KP_LEFT", DefaultEditorKit.backwardAction);
    result.put("ctrl B", DefaultEditorKit.backwardAction);

    result.put("alt RIGHT", DefaultEditorKit.nextWordAction);
    result.put("alt KP_RIGHT", DefaultEditorKit.nextWordAction);
    result.put("alt LEFT", DefaultEditorKit.previousWordAction);
    result.put("alt KP_LEFT", DefaultEditorKit.previousWordAction);

    result.put("shift alt RIGHT", DefaultEditorKit.selectionNextWordAction);
    result.put("shift alt KP_RIGHT",
        DefaultEditorKit.selectionNextWordAction);
    result.put("shift alt LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result.put("shift alt KP_LEFT",
        DefaultEditorKit.selectionPreviousWordAction);

    result.put("shift meta PAGE_UP",
        TextComponentActions.SELECTION_PAGE_LEFT);
    result.put("shift meta PAGE_DOWN",
        TextComponentActions.SELECTION_PAGE_RIGHT);
    result
        .put("shift meta PAGE_UP",
            TextComponentActions.SELECTION_PAGE_UP);
    result.put("shift meta PAGE_DOWN",
        TextComponentActions.SELECTION_PAGE_DOWN);

    result.put("ENTER", JTextField.notifyAction);
    result.put("meta BACK_SLASH", TextComponentActions.UNSELECT);
    result.put("control shift O",
        TextComponentActions.TOGGLE_COMPONENT_ORIENTATION);

    // XXX: in Aqua these are aqua-page-down and aqua-page-up
    result.put("PAGE_DOWN", DefaultEditorKit.pageDownAction);
    result.put("PAGE_UP", DefaultEditorKit.pageUpAction);

    return result;
  }
View Full Code Here

  protected SubstanceInputMap getMultilineTextComponentFocusInputMap() {
    // This is used in EditorPane, TextArea and TextPane. Almost
    // all key strokes can be mapped to the same basic actions used in Aqua.
    // There are 7 key strokes that use Aqua-specific actions. These
    // are mapped to the closest basic actions.
    SubstanceInputMap result = new SubstanceInputMap();

    result.put("meta C", DefaultEditorKit.copyAction);
    result.put("meta V", DefaultEditorKit.pasteAction);
    result.put("meta X", DefaultEditorKit.cutAction);
    result.put("COPY", DefaultEditorKit.copyAction);
    result.put("PASTE", DefaultEditorKit.pasteAction);
    result.put("CUT", 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("alt LEFT", DefaultEditorKit.previousWordAction);
    result.put("alt KP_LEFT", DefaultEditorKit.previousWordAction);
    result.put("alt RIGHT", DefaultEditorKit.nextWordAction);
    result.put("alt KP_RIGHT", DefaultEditorKit.nextWordAction);
    result.put("alt shift LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result.put("alt shift KP_LEFT",
        DefaultEditorKit.selectionPreviousWordAction);
    result.put("alt shift RIGHT", DefaultEditorKit.selectionNextWordAction);
    result.put("alt shift KP_RIGHT",
        DefaultEditorKit.selectionNextWordAction);

    result.put("meta A", DefaultEditorKit.selectAllAction);
    result.put("ctrl A", DefaultEditorKit.beginLineAction);
    result.put("meta KP_LEFT", DefaultEditorKit.beginLineAction);
    result.put("meta LEFT", DefaultEditorKit.beginLineAction);
    result.put("ctrl E", DefaultEditorKit.endLineAction);
    result.put("meta KP_RIGHT", DefaultEditorKit.endLineAction);
    result.put("meta RIGHT", DefaultEditorKit.endLineAction);

    result.put("shift meta KP_LEFT",
        DefaultEditorKit.selectionBeginLineAction);
    result
        .put("shift meta LEFT",
            DefaultEditorKit.selectionBeginLineAction);
    result.put("shift meta KP_RIGHT",
        DefaultEditorKit.selectionEndLineAction);
    result.put("shift meta RIGHT", DefaultEditorKit.selectionEndLineAction);

    result.put("ctrl P", DefaultEditorKit.upAction);
    result.put("ctrl N", DefaultEditorKit.downAction);
    // XXX: these are actually mapped to aqua-move-up and aqua-move-down
    result.put("UP", DefaultEditorKit.upAction);
    result.put("KP_UP", DefaultEditorKit.upAction);
    result.put("DOWN", DefaultEditorKit.downAction);
    result.put("KP_DOWN", DefaultEditorKit.downAction);
    // XXX: these are actually mapped to aqua-page-up and aqua-page-down
    result.put("PAGE_UP", DefaultEditorKit.pageUpAction);
    result.put("PAGE_DOWN", DefaultEditorKit.pageDownAction);
    result.put("ctrl V", DefaultEditorKit.pageDownAction);

    result.put("shift PAGE_UP", TextComponentActions.SELECTION_PAGE_UP);
    result.put("shift PAGE_DOWN", TextComponentActions.SELECTION_PAGE_DOWN);
    result.put("meta shift PAGE_UP",
        TextComponentActions.SELECTION_PAGE_LEFT);
    result.put("meta 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("meta shift KP_UP", DefaultEditorKit.selectionBeginAction);
    result.put("meta shift UP", DefaultEditorKit.selectionBeginAction);
    result.put("shift HOME", DefaultEditorKit.selectionBeginAction);
    result.put("meta shift KP_DOWN", DefaultEditorKit.selectionEndAction);
    result.put("meta shift DOWN", DefaultEditorKit.selectionEndAction);
    result.put("shift END", DefaultEditorKit.selectionEndAction);

    result.put("shift alt KP_UP",
        DefaultEditorKit.selectionBeginParagraphAction);
    result.put("shift alt UP",
        DefaultEditorKit.selectionBeginParagraphAction);
    result.put("shift alt KP_DOWN",
        DefaultEditorKit.selectionEndParagraphAction);
    result.put("shift alt DOWN",
        DefaultEditorKit.selectionEndParagraphAction);

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

    result.put("RIGHT", DefaultEditorKit.forwardAction);
    result.put("KP_RIGHT", DefaultEditorKit.forwardAction);
    result.put("ctrl F", DefaultEditorKit.forwardAction);
    result.put("LEFT", DefaultEditorKit.backwardAction);
    result.put("KP_LEFT", DefaultEditorKit.backwardAction);
    result.put("ctrl B", DefaultEditorKit.backwardAction);
    result.put("TAB", DefaultEditorKit.insertTabAction);
    result.put("meta BACK_SLASH", TextComponentActions.UNSELECT);

    result.put("meta KP_UP", DefaultEditorKit.beginAction);
    result.put("meta UP", DefaultEditorKit.beginAction);
    result.put("HOME", DefaultEditorKit.beginAction);
    result.put("meta KP_DOWN", DefaultEditorKit.endAction);
    result.put("meta DOWN", DefaultEditorKit.endAction);
    result.put("END", DefaultEditorKit.endAction);

    result.put("meta T", TextComponentActions.NEXT_LINK);
    result.put("meta shift T", TextComponentActions.PREVIOUS_LINK);
    result.put("meta 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.