Interface Manipulator

  • All Known Subinterfaces:
    AttributeColumnsMergeStrategy, AttributeRowsMergeStrategy, AttributeValueManipulator, ContextMenuItemManipulator, EdgesManipulator, GeneralActionsManipulator, NodesManipulator, PluginGeneralActionsManipulator

    public interface Manipulator

    General and abstract manipulation action to use for Data Laboratory table UI and other actions like Graph context menu items in Overview.

    Different subtypes of manipulators are defined for every type of action in the UI.

    All manipulator types are able to:

    • Execute an action
    • Provide a name, description, type and order of appearance (position in group of its type)
    • Indicate wether they have to be executable (enabled in the context menu) or not
    • Provide and UI or not
    • Provide and icon or not

    Used for different manipulators such as NodesManipulator, EdgesManipulator and GeneralActionsManipulator.

    The only methods that are called before setting up a manipulator (subtypes have special setup methods) with the data are getType and getPosition. This way, the other methods behaviour can depend on the data that has been setup before

    Author:
    Eduardo Ramos
    See Also:
    NodesManipulator
    • Method Detail

      • execute

        void execute()
        Execute this Manipulator. It will operate with data like nodes and edges previously setup for the type of manipulator.
      • getName

        String getName()

        Return name to show for this Manipulator on the ui.

        Implementations can provide different names depending on the data this Manipulator has (for example depending on the number of nodes in a NodesManipulator).

        Returns:
        Name to show at current time and conditions
      • getDescription

        String getDescription()
        Description of the Manipulator.
        Returns:
        Description
      • canExecute

        boolean canExecute()
        Indicates if this Manipulator has to be executable. Implementations should evaluate the current data and conditions.
        Returns:
        True if it has to be executable, false otherwise
      • getUI

        ManipulatorUI getUI()
        Returns a ManipulatorUI for this Manipulator if it needs one.
        Returns:
        ManipulatorUI for this Manipulator or null
      • getType

        int getType()
        Type of manipulator. This is used for separating the manipulators in groups when shown, using popup separators. First types to show will be the lesser.
        Returns:
        Type of this manipulator
      • getPosition

        int getPosition()
        Returns a position value that indicates the position of this Manipulator in its type group. Less means upper.
        Returns:
        This Manipulator position
      • getIcon

        Icon getIcon()
        Returns an icon for this manipulator if necessary.
        Returns:
        Icon for the manipulator or null