Gephi Toolkit Javadoc

org.gephi.timeline
Class TimelineControllerImpl

java.lang.Object
  extended by org.gephi.timeline.TimelineControllerImpl
All Implemented Interfaces:
java.util.EventListener, DynamicModelListener, TimelineController

public class TimelineControllerImpl
extends java.lang.Object
implements TimelineController, DynamicModelListener

Author:
Mathieu Bastian

Constructor Summary
TimelineControllerImpl()
           
 
Method Summary
 void addListener(TimelineModelListener listener)
          Add listener to the list of event listerners.
 void dynamicModelChanged(DynamicModelEvent event)
           
protected  void fireTimelineModelEvent(TimelineModelEvent event)
           
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimelineControllerImpl

public TimelineControllerImpl()
Method Detail

getModel

public TimelineModel getModel(Workspace workspace)
Description copied from interface: TimelineController
Returns the timeline model from workspace.

Specified by:
getModel in interface TimelineController
Parameters:
workspace - the workspace to get the model from
Returns:
the timeline model for this workspace

getModel

public TimelineModel getModel()
Description copied from interface: TimelineController
Get the current model from the current workspace

Specified by:
getModel in interface TimelineController
Returns:
the current model, or null if no active workspace

dynamicModelChanged

public void dynamicModelChanged(DynamicModelEvent event)
Specified by:
dynamicModelChanged in interface DynamicModelListener

setCustomBounds

public void setCustomBounds(double min,
                            double max)
Description copied from interface: TimelineController
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.

Specified by:
setCustomBounds in interface TimelineController
Parameters:
min - the lower bound
max - the upper bound

setEnabled

public void setEnabled(boolean enabled)
Description copied from interface: TimelineController
Sets the timeline enable status.

Specified by:
setEnabled in interface TimelineController
Parameters:
enabled - the enabled value to set

setInterval

public void setInterval(double from,
                        double to)
Description copied from interface: TimelineController
Sets the current timeline interval. This is propagated to the DynamicModel and defines the interval the graph is filtered with.

Specified by:
setInterval in interface TimelineController
Parameters:
from - the lower bound
to - the upper bound

getDynamicGraphColumns

public AttributeColumn[] getDynamicGraphColumns()
Description copied from interface: TimelineController
Returns all the possible dynamic attribute columns. This is essentially all number-based dynamic columns defined in the graph table.

Specified by:
getDynamicGraphColumns in interface TimelineController
Returns:
all dynamic number columns in the graph table

selectColumn

public void selectColumn(AttributeColumn column)
Description copied from interface: TimelineController
Select a column to make a TimelineChart of it. The column must be member of the graph table.

Specified by:
selectColumn in interface TimelineController
Parameters:
column - the column to select

fireTimelineModelEvent

protected void fireTimelineModelEvent(TimelineModelEvent event)

addListener

public void addListener(TimelineModelListener listener)
Description copied from interface: TimelineController
Add listener to the list of event listerners.

Specified by:
addListener in interface TimelineController
Parameters:
listener - the listener to add

removeListener

public void removeListener(TimelineModelListener listener)
Description copied from interface: TimelineController
Remove listerner from the list of event listeners.

Specified by:
removeListener in interface TimelineController
Parameters:
listener - the listener to remove

startPlay

public void startPlay()
Description copied from interface: TimelineController
Starts the timeline animation using the current delay, step size and play mode.

Specified by:
startPlay in interface TimelineController

stopPlay

public void stopPlay()
Description copied from interface: TimelineController
Stops the timeline animation.

Specified by:
stopPlay in interface TimelineController

setPlaySpeed

public void setPlaySpeed(int delay)
Description copied from interface: TimelineController
Sets the play delay in milliseconds. Defines the time between each interval shift.

Specified by:
setPlaySpeed in interface TimelineController
Parameters:
delay - the delay in milliseconds

setPlayStep

public void setPlayStep(double step)
Description copied from interface: TimelineController
Sets the play step. Defines how much the interval is moved at each step during animation. Defined in percentage of the total interval.

Specified by:
setPlayStep in interface TimelineController
Parameters:
step - the step, between 0 and 1

setPlayMode

public void setPlayMode(TimelineModel.PlayMode playMode)
Description copied from interface: TimelineController
Sets the play mode. This defines how the interval is moved.

Specified by:
setPlayMode in interface TimelineController
Parameters:
playMode - the play mode

Gephi Toolkit Javadoc