Interface AttributeColumnsManipulator


  • public interface AttributeColumnsManipulator

    Manipulation action to use for Data Laboratory column manipulator buttons.

    This special type of manipulator does not need any builder, implementations can be published simply with @ServiceProvider(service = AttributeColumnsManipulator.class) annotation

    These are shown as drop down buttons and are able to:

    • Execute an action with 1 column
    • Provide a name, description, type and order of appearance (position in group of its type)
    • Indicate wether they can be executed on a specific AttributeColumn or not
    • Provide and UI or not
    • Provide and icon or not
    Author:
    Eduardo Ramos
    • Method Detail

      • execute

        void execute​(Table table,
                     Column column)
        Execute this AttributeColumnsManipulator with the indicated table and column
        Parameters:
        table - AttributeTable of the column
        column - AttributeColumn of the table to manipulate
      • getName

        String getName()
        Return name to show for this AttributeColumnsManipulator on the ui.
        Returns:
        Name to show in UI
      • getDescription

        String getDescription()
        Description of the AttributeColumnsManipulator.
        Returns:
        Description
      • canManipulateColumn

        boolean canManipulateColumn​(Table table,
                                    Column column)
        Indicates if this AttributeColumnsManipulator can manipulate a specific AttributeColumn.
        Returns:
        True if it can manipulate the column, false otherwise
      • getUI

        AttributeColumnsManipulatorUI getUI​(Table table,
                                            Column column)
        Returns a ManipulatorUI for this Manipulator if it needs one.
        Parameters:
        table - AttributeTable of the column
        column - AttributeColumn of the table to manipulate
        Returns:
        ManipulatorUI for this Manipulator or null
      • getType

        int getType()
        Type of manipulator. This is used for separating the manipulators in groups when shown. 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 AttributeColumnsManipulator in its type group. Less means upper.
        Returns:
        This AttributeColumnsManipulator position
      • getIcon

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