Gephi Toolkit Javadoc

org.gephi.timeline.api
Interface TimelineController

All Known Implementing Classes:
TimelineControllerImpl

public interface TimelineController

Controls the timeline bounds and animation features.

By default the timeline is disabled and can be enabled with the setEnabled() method. Once enabled, the controller is setting its interval value to the DynamicModel.

The interval can be animated using the startPlay() and stopPlay() methods. Configuration parameters are also available.

This controller also allows to lookup graph attribute columns that can be used as sparklines (e.g. node count, average degree...). Use the selectColumn() to create a TimelineChart accessible from the TimelineModel

All interval values are in the same space as the DynamicAPI module and no value should eb out of the min/max bounds maintained by the DynamicModel.

Author:
Julian Bilcke, Mathieu Bastian
See Also:
TimelineModel

Method Summary
 void addListener(TimelineModelListener listener)
          Add listener to the list of event listerners.
 AttributeColumn[] getDynamicGraphColumns()
          Returns all the possible dynamic attribute columns.
 TimelineModel getModel()
          Get the current model from the current workspace
 TimelineModel getModel(Workspace workspace)
          Returns the timeline model from workspace.
 void removeListener(TimelineModelListener listener)
          Remove listerner from the list of event listeners.
 void selectColumn(AttributeColumn column)
          Select a column to make a TimelineChart of it.
 void setCustomBounds(double min, double max)
          Sets the timeline custom bounds.
 void setEnabled(boolean enabled)
          Sets the timeline enable status.
 void setInterval(double from, double to)
          Sets the current timeline interval.
 void setPlayMode(TimelineModel.PlayMode playMode)
          Sets the play mode.
 void setPlaySpeed(int delay)
          Sets the play delay in milliseconds.
 void setPlayStep(double step)
          Sets the play step.
 void startPlay()
          Starts the timeline animation using the current delay, step size and play mode.
 void stopPlay()
          Stops the timeline animation.
 

Method Detail

getModel

TimelineModel getModel(Workspace workspace)
Returns the timeline model from workspace.

Parameters:
workspace - the workspace to get the model from
Returns:
the timeline model for this workspace

getModel

TimelineModel getModel()
Get the current model from the current workspace

Returns:
the current model, or null if no active workspace

setCustomBounds

void setCustomBounds(double min,
                     double max)
Sets the timeline custom bounds. Custom bounds still need to be included in the min and max bound of the time scale. The timeline will resize accordingly.

Parameters:
min - the lower bound
max - the upper bound
Throws:
java.lang.IllegalArgumentException - if min is superior or equal than max or out of bounds

setEnabled

void setEnabled(boolean enabled)
Sets the timeline enable status.

Parameters:
enabled - the enabled value to set

setInterval

void setInterval(double from,
                 double to)
Sets the current timeline interval. This is propagated to the DynamicModel and defines the interval the graph is filtered with.

Parameters:
from - the lower bound
to - the upper bound
Throws:
java.lang.IllegalArgumentException - if min is superior or equal than max or out of bounds

startPlay

void startPlay()
Starts the timeline animation using the current delay, step size and play mode.


stopPlay

void stopPlay()
Stops the timeline animation.


setPlaySpeed

void setPlaySpeed(int delay)
Sets the play delay in milliseconds. Defines the time between each interval shift.

Parameters:
delay - the delay in milliseconds

setPlayStep

void setPlayStep(double step)
Sets the play step. Defines how much the interval is moved at each step during animation. Defined in percentage of the total interval.

Parameters:
step - the step, between 0 and 1

setPlayMode

void setPlayMode(TimelineModel.PlayMode playMode)
Sets the play mode. This defines how the interval is moved.

Parameters:
playMode - the play mode

getDynamicGraphColumns

AttributeColumn[] getDynamicGraphColumns()
Returns all the possible dynamic attribute columns. This is essentially all number-based dynamic columns defined in the graph table.

Returns:
all dynamic number columns in the graph table

selectColumn

void selectColumn(AttributeColumn column)
Select a column to make a TimelineChart of it. The column must be member of the graph table.

Parameters:
column - the column to select
Throws:
java.lang.IllegalArgumentException - if column is not a graph column

addListener

void addListener(TimelineModelListener listener)
Add listener to the list of event listerners.

Parameters:
listener - the listener to add

removeListener

void removeListener(TimelineModelListener listener)
Remove listerner from the list of event listeners.

Parameters:
listener - the listener to remove

Gephi Toolkit Javadoc