Package org.gephi.timeline.api
Interface TimelineModel
-
public interface TimelineModel
Timeline model which holds timeline bounds, interval and animation flags.The timeline controls the currently selected time interval, accessible in the
DynamicAPI
. When enabled, it maintains the time scale and the position of the interval.It also holds configuration values for animation such as speed and step size.
- Author:
- Julian Bilcke, Mathieu Bastian
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
TimelineModel.PlayMode
Defines how the interval is moved when animating.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TimelineChart
getChart()
Returns the current timeline chart ornull
if node.double
getCustomMax()
Returns the custom max value.double
getCustomMin()
Returns the custom min value.double
getIntervalEnd()
Returns the upper bound of the interval.double
getIntervalStart()
Returns the lower bound of the interval.double
getMax()
Returns the max value of the time scale.double
getMin()
Returns the min value of the time scale.int
getPlayDelay()
Returns the play delay in milliseconds.TimelineModel.PlayMode
getPlayMode()
Returns the play mode.double
getPlayStep()
Returns the play step.TimeFormat
getTimeFormat()
Returns the current time format.boolean
hasCustomBounds()
Returnstrue
if custom bounds are defined.boolean
hasValidBounds()
Returnstrue
if none of the min and max time values are infinity.boolean
isEnabled()
Returnstrue
if the timeline is enabled.boolean
isPlaying()
Returnstrue
if the timeline is playing.
-
-
-
Method Detail
-
isEnabled
boolean isEnabled()
Returnstrue
if the timeline is enabled. When enabled, the timeline is filtering the current graph.- Returns:
true
if the timeline is enabled,false
otherwise
-
getMin
double getMin()
Returns the min value of the time scale. This is the start of the earliest interval in the workspace.- Returns:
- the min
-
getMax
double getMax()
Returns the max value of the time scale. This is the end of the latest interval in the workspace.- Returns:
- the max
-
getCustomMin
double getCustomMin()
Returns the custom min value. This value can't be inferior thanmin
- Returns:
- the custom min
-
getCustomMax
double getCustomMax()
Returns the custom max value. This value can't be superior thanmax
- Returns:
- the custom max
-
hasCustomBounds
boolean hasCustomBounds()
Returnstrue
if custom bounds are defined. Returnsfalse
when custom bounds are equal tomin
andmax
.- Returns:
true
if custom bounds are defined,false
otherwise.
-
hasValidBounds
boolean hasValidBounds()
Returnstrue
if none of the min and max time values are infinity.- Returns:
true
if the time scale is valid,false
otherwise
-
getIntervalStart
double getIntervalStart()
Returns the lower bound of the interval.- Returns:
- the interval start
-
getIntervalEnd
double getIntervalEnd()
Returns the upper bound of the interval.- Returns:
- the interval end
-
getTimeFormat
TimeFormat getTimeFormat()
Returns the current time format. Default isDOUBLE
- Returns:
- the current tie
-
getPlayDelay
int getPlayDelay()
Returns the play delay in milliseconds. Defines the time between each interval shift.- Returns:
- the play delay
-
getPlayStep
double getPlayStep()
Returns the play step. Defines how much the interval is moved at each step during animation. Defined in percentage of the total interval.- Returns:
- the play step
-
isPlaying
boolean isPlaying()
Returnstrue
if the timeline is playing.- Returns:
true
is playing,false
otherwise
-
getPlayMode
TimelineModel.PlayMode getPlayMode()
Returns the play mode. This defines how the interval is moved.- Returns:
- the play mode
-
getChart
TimelineChart getChart()
Returns the current timeline chart ornull
if node.- Returns:
- the timeline chart or
null
-
-