Class MultipleModelElementAction

    • Constructor Detail

      • MultipleModelElementAction

        public MultipleModelElementAction​(@CheckForNull
                                          java.lang.String actionID,
                                          java.lang.String actionName,
                                          @CheckForNull
                                          javax.swing.KeyStroke stroke,
                                          @CheckForNull
                                          java.lang.String group)
        Constructor
        Parameters:
        actionID - action id
        actionName - action name
        stroke - action stroke
        group - action group
      • MultipleModelElementAction

        public MultipleModelElementAction​(@CheckForNull
                                          java.lang.String actionID,
                                          java.lang.String actionName,
                                          @CheckForNull
                                          javax.swing.KeyStroke stroke,
                                          @CheckForNull
                                          java.lang.String group,
                                          boolean useSchema)
        Constructor
        Parameters:
        actionID - action id
        actionName - action name
        stroke - action stroke
        group - action group
        useSchema - use shortcuts schema
    • Method Detail

      • getElements

        protected java.util.List<Element> getElements()
        Returns data from selected node. If there are no selected nodes, or more than one selected node returns null.
        Returns:
        element
      • createCollection

        public static <T> java.util.List<T> createCollection​(@CheckForNull
                                                             T element)
        Utility method to create an empty collection in case given element is null or a singleton collection in other case.
        Parameters:
        element - element
        Returns:
        collection
      • getElement

        protected Element getElement()
        Description copied from class: SingleModelElementAction
        Returns data from selected node. If there are no selected nodes, or more than one selected node returns null.
        Overrides:
        getElement in class SingleModelElementAction
        Returns:
        a single element in case many elements are set
      • clone

        public NMAction clone()
        Description copied from class: NMAction
        Clones the object. Does the deep clone.
        Overrides:
        clone in class NMAction
        Returns:
        cloned object