Interface DataTablesController


  • public interface DataTablesController

    This interface defines part of the Data Laboratory API.

    It provides methods to control the Data Table UI that shows a table for nodes and edges.

    This is done by registering the data table ui as a listener of these events that can be requested with this controller. Note that data table ui will not be registered to listen to the events of this controller until it is instanced opening Data Laboratory Group

    Author:
    Eduardo Ramos
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void exportCurrentTable()
      Requests to exports current table being shown as a file.
      DataTablesEventListener getDataTablesEventListener()
      Returns the current registered DataTablesEventListener.
      Edge[] getEdgeTableSelection()
      Request the tables implementation to provide the selected edges in edges table.
      Node[] getNodeTableSelection()
      Request the tables implementation to provide the selected nodes in nodes table.
      boolean isAutoRefreshEnabled()
      Gets auto-refresh suspended state.
      boolean isDataTablesReady()
      Indicates if Data Table UI is registered as a listener of the events created by this controller.
      boolean isEdgeTableMode()
      Checks if the data tables implementation is showing edges table
      boolean isNodeTableMode()
      Checks if the data tables implementation is showing nodes table
      boolean isShowEdgesNodesLabels()
      Checks if the data tables implementation is showing edges nodes (source and target) labels at the moment.
      boolean isShowOnlyVisible()
      Checks if the data tables implementation is showing only visible elements (nodes or edges) in the graph at the moment.
      boolean isTimeIntervalGraphics()
      Checks if the data tables implementation is showing time intervals as graphics at the moment.
      boolean isUseSparklines()
      Checks if the data tables implementation is showing number lists and dynamic numbers as sparklines at the moment.
      boolean prepareDataTables()
      Looks for an available DataTablesEventListenerBuilder and sets its DataTablesEventListener.
      void refreshCurrentTable()
      Requests the tables implementation to refresh the data of the table being shown.
      void selectEdgesTable()
      Requests the tables implementation to show edges table.
      void selectNodesTable()
      Requests the tables implementation to show nodes table.
      void selectTable​(Table table)
      Request the tables implementation to show the given table (nodes or edges table)
      void setAutoRefreshEnabled​(boolean enabled)
      Sets auto-refresh suspended state.
      void setDataTablesEventListener​(DataTablesEventListener listener)
      Register a listener for these requests.
      void setEdgeTableSelection​(Edge[] edges)
      Requests the tables implementation to adapt the edges table row selection to the specified edges.
      void setNodeTableSelection​(Node[] nodes)
      Requests the tables implementation to adapt the nodes table row selection to the specified nodes.
      void setShowEdgesNodesLabels​(boolean showEdgesNodesLabels)
      Requests the tables implementation to show edges nodes (source and target).
      void setShowOnlyVisible​(boolean showOnlyVisible)
      Requests the tables implementation to show only visible elements or not.
      void setTimeIntervalGraphics​(boolean timeIntervalGraphics)
      Requests the tables implementation to show time intervals as graphics.
      void setUseSparklines​(boolean useSparklines)
      Requests the tables implementation to show number lists and dynamic numbers as sparklines.
    • Method Detail

      • selectTable

        void selectTable​(Table table)
        Request the tables implementation to show the given table (nodes or edges table)
        Parameters:
        table - Table to show
      • getDataTablesEventListener

        DataTablesEventListener getDataTablesEventListener()
        Returns the current registered DataTablesEventListener. It can be null if it is still not activated or there is no active workspace.
        Returns:
        Current listener or null
      • setDataTablesEventListener

        void setDataTablesEventListener​(DataTablesEventListener listener)
        Register a listener for these requests.
        Parameters:
        listener - Instance of DataTablesEventListener
      • isDataTablesReady

        boolean isDataTablesReady()
        Indicates if Data Table UI is registered as a listener of the events created by this controller.
        Returns:
        True if Data Table UI is prepared, false otherwise
      • prepareDataTables

        boolean prepareDataTables()
        Looks for an available DataTablesEventListenerBuilder and sets its DataTablesEventListener.
        Returns:
        True if listener found, false otherwise
      • selectNodesTable

        void selectNodesTable()
        Requests the tables implementation to show nodes table.
      • selectEdgesTable

        void selectEdgesTable()
        Requests the tables implementation to show edges table.
      • refreshCurrentTable

        void refreshCurrentTable()
        Requests the tables implementation to refresh the data of the table being shown.
      • isAutoRefreshEnabled

        boolean isAutoRefreshEnabled()
        Gets auto-refresh suspended state. True by default.
        Returns:
        Current auto-refresh state
      • setAutoRefreshEnabled

        void setAutoRefreshEnabled​(boolean enabled)
        Sets auto-refresh suspended state. True by default.
        Parameters:
        enabled -
      • getNodeTableSelection

        Node[] getNodeTableSelection()
        Request the tables implementation to provide the selected nodes in nodes table.
        Returns:
        Array of selected nodes
      • setNodeTableSelection

        void setNodeTableSelection​(Node[] nodes)
        Requests the tables implementation to adapt the nodes table row selection to the specified nodes.
        Parameters:
        nodes - Nodes to select
      • getEdgeTableSelection

        Edge[] getEdgeTableSelection()
        Request the tables implementation to provide the selected edges in edges table.
        Returns:
        Array of selected edges
      • setEdgeTableSelection

        void setEdgeTableSelection​(Edge[] edges)
        Requests the tables implementation to adapt the edges table row selection to the specified edges.
        Parameters:
        edges - Edges to select
      • isNodeTableMode

        boolean isNodeTableMode()
        Checks if the data tables implementation is showing nodes table
        Returns:
        True if nodes table is being shown, false otherwise
      • isEdgeTableMode

        boolean isEdgeTableMode()
        Checks if the data tables implementation is showing edges table
        Returns:
        True if edges table is being shown, false otherwise
      • isShowOnlyVisible

        boolean isShowOnlyVisible()
        Checks if the data tables implementation is showing only visible elements (nodes or edges) in the graph at the moment.
        Returns:
        True if only visible elements are being shown, false otherwise
      • setShowOnlyVisible

        void setShowOnlyVisible​(boolean showOnlyVisible)
        Requests the tables implementation to show only visible elements or not.
        Parameters:
        showOnlyVisible - Indicates if only visible elements have to be shown in table
      • isUseSparklines

        boolean isUseSparklines()
        Checks if the data tables implementation is showing number lists and dynamic numbers as sparklines at the moment.
        Returns:
        True if sparklines are on, false otherwise
      • setUseSparklines

        void setUseSparklines​(boolean useSparklines)
        Requests the tables implementation to show number lists and dynamic numbers as sparklines.
        Parameters:
        useSparklines - Indicates if sparklines should be used
      • isTimeIntervalGraphics

        boolean isTimeIntervalGraphics()
        Checks if the data tables implementation is showing time intervals as graphics at the moment.
        Returns:
        True if sparklines are on, false otherwise
      • setTimeIntervalGraphics

        void setTimeIntervalGraphics​(boolean timeIntervalGraphics)
        Requests the tables implementation to show time intervals as graphics.
        Parameters:
        timeIntervalGraphics - Indicates if time interval graphics should be used
      • isShowEdgesNodesLabels

        boolean isShowEdgesNodesLabels()
        Checks if the data tables implementation is showing edges nodes (source and target) labels at the moment.
        Returns:
        True if edges nodes lables are shown, false otherwise
      • setShowEdgesNodesLabels

        void setShowEdgesNodesLabels​(boolean showEdgesNodesLabels)
        Requests the tables implementation to show edges nodes (source and target).
        Parameters:
        showEdgesNodesLabels - Indicates if edges nodes labels should be shown
      • exportCurrentTable

        void exportCurrentTable()
        Requests to exports current table being shown as a file.