|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.nite.tools.videolabeler.AnnotationFrameFactory
public class AnnotationFrameFactory
This factory creates annotation frames and keeps track of the currently opened annotation frames. It is a selection listener, which means that it can be notified when the user selects or deselects a layer or an agent. For each selected layer that belongs to an agent coding, this factory makes sure that there is one annotation frame for each of the selected agents. For each selected layer that belongs to an interaction coding, this factory makes sure that there is one annotation frame exactly.
The factory is a singleton object, which is created with createInstance().
Method Summary | |
---|---|
void |
agentSelected(NAgent agent,
boolean selected)
Adds or removes annotation frames for the specified agent. |
static AnnotationFrameFactory |
createInstance(javax.swing.JDesktopPane desktop,
java.awt.Rectangle area)
Creates and returns the singleton annotation frame factory. |
static AnnotationFrameFactory |
getInstance()
Returns the singleton annotation frame factory. |
void |
layerSelected(AnnotationLayer layer,
boolean selected)
Adds or removes annotation frames for the specified layer. |
void |
setArea(java.awt.Rectangle area)
Sets the area of the desktop pane in which the annotation frames should be layed out. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static AnnotationFrameFactory createInstance(javax.swing.JDesktopPane desktop, java.awt.Rectangle area)
Creates and returns the singleton annotation frame factory. If this method has been called before, this method will return the existing factory. The annotation frames will be layed out in the specified area of the specified desktop pane.
desktop
- the desktop pane to which the annotation frames will be
addedarea
- the area in the desktop pane in which the frames will be
layed out
public static AnnotationFrameFactory getInstance()
Returns the singleton annotation frame factory. If createInstance() has not been called yet, this method returns null.
public void setArea(java.awt.Rectangle area)
Sets the area of the desktop pane in which the annotation frames should be layed out. The current annotation frames are layed out in the new area.
area
- the area in which the annotation frames are layed outpublic void agentSelected(NAgent agent, boolean selected)
Adds or removes annotation frames for the specified agent.
agentSelected
in interface SelectionListener
agent
- the agent that is selected or deselectedselected
- true if the agent is selected, false if it is deselectedpublic void layerSelected(AnnotationLayer layer, boolean selected)
Adds or removes annotation frames for the specified layer.
layerSelected
in interface SelectionListener
layer
- 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 |