|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.nite.tools.videolabeler.TimelineFactory
public class TimelineFactory
A timeline factory is a global singleton object. Before it is used it
should be created with
ViewFrameFactory.createInstance().
From then on the same factory can be retrieved with
TimelineFactory.getInstance().
A timeline factory displays selected annotation layers on a timeline.
A timeline is an instance of NiteTimeline. This
factory does not only create the timeline, but it also serves as a repository
of the current timeline and it is responsible for laying out the timeline
in a designated area of a desktop pane.
The factory implements the SelectionListener
interface. The user should be able to select and deselect the layers to
be shown on the timeline. Whenever the user selects or deselects an
annotation layer, the method
layerSelected()
should be called, so that the timeline blobs for the selected/deselected layer
is created/removed and the timeline is refreshed.
| Method Summary | |
|---|---|
void |
agentSelected(NAgent agent,
boolean selected)
This method does nothing, because view frames are only associated with a layer, not with an agent. |
static TimelineFactory |
createInstance(javax.swing.JDesktopPane desktop,
java.awt.Rectangle area,
NOMWriteCorpus corpus)
Initialises the singleton timeline factory. |
java.util.List |
doSearch(java.lang.String query)
|
Clock |
getClock()
|
static TimelineFactory |
getInstance()
Returns the singleton timeline factory. |
void |
layerSelected(AnnotationLayer layer,
boolean selected)
Selects or deselects a layer. |
void |
setArea(java.awt.Rectangle area)
Sets the area of the desktop in which the view frames are layed out. |
void |
setClock(Clock c)
|
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static TimelineFactory createInstance(javax.swing.JDesktopPane desktop,
java.awt.Rectangle area,
NOMWriteCorpus corpus)
Initialises the singleton timeline factory. The factory will display the timline on the specified desktop. The timeline will be layed out in the specified area of the desktop.
If the singleton timeline factory has already been initialised, this method does not create a new factory, but simply returns the existing singleton factory.
desktop - the desktop where the view frames will be displayedarea - the area of the desktop in which the view frames will be
layed out
public Clock getClock()
public void setClock(Clock c)
public static TimelineFactory getInstance()
Returns the singleton timeline factory. The factory should have been
initialised first with
createInstance.
If the factory has not been initialised yet, this method returns
null.
public void setArea(java.awt.Rectangle area)
Sets the area of the desktop in which the view frames are layed out. This method will set the area and lay out the current view frames in the specified area.
area - an area of the desktop
public void agentSelected(NAgent agent,
boolean selected)
This method does nothing, because view frames are only associated with a layer, not with an agent.
agentSelected in interface SelectionListeneragent - the agent that is selected or deselectedselected - true if the agent is selected, false if it is deselectedpublic java.util.List doSearch(java.lang.String query)
public void layerSelected(AnnotationLayer layer,
boolean selected)
Selects or deselects a layer. If a layer is selected, the view frame for that layer is created on the desktop. If a layer is deselected, the view frame for that layer is removed from the desktop. In either case the new set of selected view frames are layed out in the designated desktop area.
layerSelected in interface SelectionListenerlayer - the layer that is selected or deselectedselected - true if the layer is selected, false if it is deselected
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||