org.netbeans.modules.editor.lib2/1 1.43.1 10

org.netbeans.api.editor

Annotation Type EditorActionRegistration

    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element and Description
      String name
      Name of the action that will appear as Action.NAME attribute's value.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element and Description
      String iconResource
      Resource specification for small icon.
      String menuPath
      Path of this action in main menu e.g.
      int menuPosition
      Integer position of the main menu item among the other menu items.
      String menuText
      Menu text bundle key of the registered action.
      String mimeType
      Mime type for which the action will be registered.
      String popupPath
      Path of this action in popup menu e.g.
      int popupPosition
      Integer position of the popup menu item among the other popup menu (or submenu) items.
      String popupText
      Popup menu text bundle key of the registered action.
      String preferencesKey
      Boolean key in preferences that corresponds to action's selected state.
      String shortDescription
      Short description bundle key of the action being registered.
      int toolBarPosition
      Integer position of this action in editor toolbar.
    • Element Detail

      • name

        public abstract String name
        Name of the action that will appear as Action.NAME attribute's value.
        The Swing's text package actions use convention of lowercase letters with hyphens e.g. "caret-end-word" - see String constants in DefaultEditorKit.
        Returns:
        value of Action.NAME attribute.
      • mimeType

        public abstract String mimeType
        Mime type for which the action will be registered.
        It implies the target folder of the registration /Editors/<mime-type>/Actions.
        Returns:
        mime-type of the action registration (for example "text/x-java" or empty string which means that the action will be registered as global (for all mime-types).
        Default:
        ""
      • iconResource

        public abstract String iconResource
        Resource specification for small icon.
        Returns:
        icon resource specification or default (empty string which means no icon).
        Default:
        ""
      • shortDescription

        public abstract String shortDescription
        Short description bundle key of the action being registered. Several constructions are allowed:
        • Leave the annotation's default value which means that the short description will be searched in a bundle located in the same package as the action's class by a key equal to action's name (value of Action.NAME property).
        • Value starting with a hash "#key" searches in a bundle in the same package as the action's class.
        • "bundle#key" allows specification of both bundle and a corresponding key.
        • Empty string "" means that nothing will be generated and the value of Action.SHORT_DESCRIPTION property will be null.
        Default:
        "BY_ACTION_NAME"
      • menuText

        public abstract String menuText
        Menu text bundle key of the registered action. If an empty string is used (the default) it will be set to the same value like action's short description.
        Value starting with a hash "#key" searches in a bundle in the same package as the action's class.
        "bundle#key" allows specification of both bundle and a corresponding key.
        Default:
        ""
      • popupText

        public abstract String popupText
        Popup menu text bundle key of the registered action. If an empty string is used (the default) it will be set to the same value like menu text.
        Value starting with a hash "#key" searches in a bundle in the same package as the action's class.
        "bundle#key" allows specification of both bundle and a corresponding key.
        Default:
        ""
      • menuPath

        public abstract String menuPath
        Path of this action in main menu e.g. "Edit".
        Default:
        ""
      • menuPosition

        public abstract int menuPosition
        Integer position of the main menu item among the other menu items.
        The default Integer.MAX_VALUE value means no menu representation.
        Default:
        2147483647
      • popupPath

        public abstract String popupPath
        Path of this action in popup menu e.g. "" for appearance right in the context menu or a corresponding path for nested submenu appearance.
        Default:
        ""
      • popupPosition

        public abstract int popupPosition
        Integer position of the popup menu item among the other popup menu (or submenu) items.
        The default Integer.MAX_VALUE value means no popup menu representation.
        Default:
        2147483647
      • toolBarPosition

        public abstract int toolBarPosition
        Integer position of this action in editor toolbar.
        The default Integer.MAX_VALUE value means no toolbar representation.
        Default:
        2147483647
      • preferencesKey

        public abstract String preferencesKey
        Boolean key in preferences that corresponds to action's selected state.
        If set to non-empty string the action will be represented by a check-box in menu and popup menu and the corresponding key will be set in global mime-lookup MimeLookup.getLookup(MimePath.EMPTY).
        Default:
        ""
org.netbeans.modules.editor.lib2/1 1.43.1 10

Built on March 18 2014.  |  Portions Copyright 1997-2014 Sun Microsystems, Inc. All rights reserved.