Gephi Toolkit Javadoc

org.gephi.datalab.spi
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:

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 Summary
 boolean canExecute()
          Indicates if this Manipulator has to be executable.
 void execute()
          Execute this Manipulator.
 java.lang.String getDescription()
          Description of the Manipulator.
 javax.swing.Icon getIcon()
          Returns an icon for this manipulator if necessary.
 java.lang.String getName()
          Return name to show for this Manipulator on the ui.
 int getPosition()
          Returns a position value that indicates the position of this Manipulator in its type group.
 int getType()
          Type of manipulator.
 ManipulatorUI getUI()
          Returns a ManipulatorUI for this Manipulator if it needs one.
 

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

java.lang.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

java.lang.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

javax.swing.Icon getIcon()
Returns an icon for this manipulator if necessary.

Returns:
Icon for the manipulator or null

Gephi Toolkit Javadoc