|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
net.sourceforge.nite.tools.videolabeler.FeeltraceCircle
public class FeeltraceCircle
A Feeltrace circle is part of a Feeltrace target control panel (set at construction). It displays a circle with an X axis and a Y axis through its origin. Emotions consisting of evaluation and activation can be displayed in the circle. The X axis represents evaluation values between -1.0 and +1.0. The Y axis represents activation values between -1.0 and +1.0.
In the circle labels for some predefined emotions will be displayed if
the method showLabels()
of
the parent panel returns true.
Every location within the circle is mapped to a colour using the
Feeltrace colour map returned by the method
getColourMap()
of the
Feeltrace annotation layer. The circle itself is white. Emotions will be
displayed as a small circle in the emotion colour and a black border for
contrast. The cursor will also have this appearance when the user moves the
cursor in the circle. If the user is annotating, the cursor will be closed
(filled with the emotion colour). Otherwise it will be open (have a thick
border in the emotion colour).
If the method clickAnnotation()
of the parent panel returns true, the user can start
annotating by clicking somewhere in the circle. Annotating ends when the user
clicks again. If clickAnnotation
returns false, the user should
keep the mouse button pressed while annotating.
By default existing annotations will be displayed in the circle. This
class is a TimeHandler
and it will query the corpus at every
time event to display the annotations at the current time or in the current
time span. This may be turned off with setReplay()
.
The panel should have enough space for a circle with diameter 200 plus the axis labels. If the panel is not big enough, it will display the text "panel too small".
Nested Class Summary |
---|
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
javax.swing.JComponent.AccessibleJComponent |
Field Summary |
---|
Fields inherited from class javax.swing.JComponent |
---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
FeeltraceCircle(FeeltraceTargetControlPanel parent)
Constructs a new Feeltrace circle to be part of the specified target control panel. |
Method Summary | |
---|---|
void |
acceptTimeChange(double systemTime)
Accept a new time (generally from another registered TimeHandler). |
void |
acceptTimeSpanChange(double start,
double end)
Accept a new time span from another registered time handler. |
Clock |
getClock()
Return the Clock that is currently syncronising this TimeHandler |
java.awt.geom.Point2D |
getCurrentEmotion()
Returns the emotion of the current annotation. |
double |
getMaxTime()
find the largest end time handled by this TimeHandler. |
void |
setClock(Clock clock)
Set the Clock to which this TimeHandler is registered |
void |
setReplay(boolean replay)
Enables or disables the visualisation of existing annotations. |
boolean |
setTarget(NOMWriteElement annotation)
Sets the target of the current annotation. |
void |
setTime(double time)
Broadcast a new time. |
void |
setTimeHighlightColor(java.awt.Color color)
Change the Color used for all registered TimeHandlers to highlight times |
void |
setTimeSpan(double start,
double end)
Broadcast a new span to all registered TimeHandlers. |
Methods inherited from class javax.swing.JPanel |
---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
---|
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintImmediately, paintImmediately, print, printAll, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
---|
add, add, add, add, add, addContainerListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate |
Methods inherited from class java.awt.Component |
---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, contains, createImage, createImage, createVolatileImage, createVolatileImage, dispatchEvent, enable, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public FeeltraceCircle(FeeltraceTargetControlPanel parent)
Constructs a new Feeltrace circle to be part of the specified target control panel.
parent
- the Feeltrace target control panel that will contain this
circleMethod Detail |
---|
public void setReplay(boolean replay)
Enables or disables the visualisation of existing annotations. As a corpus query is performed at every time event, replay might seriously degrade performance.
replay
- true if replay should be enabled, false if it should be
disabledpublic boolean setTarget(NOMWriteElement annotation)
Sets the target of the current annotation. This method is called in response to the targetSet event. The current emotion will be set in the evaluation and activation attribute of the annotation.
annotation
- the current annotation
public java.awt.geom.Point2D getCurrentEmotion()
Returns the emotion of the current annotation. If there is no current annotation or the emotion has not been set, this method returns null.
public void acceptTimeChange(double systemTime)
TimeHandler
acceptTimeChange
in interface TimeHandler
public void setTime(double time)
TimeHandler
setTime
in interface TimeHandler
public void acceptTimeSpanChange(double start, double end)
TimeHandler
acceptTimeSpanChange
in interface TimeHandler
public void setTimeSpan(double start, double end)
TimeHandler
setTimeSpan
in interface TimeHandler
public Clock getClock()
TimeHandler
getClock
in interface TimeHandler
public void setClock(Clock clock)
TimeHandler
setClock
in interface TimeHandler
public void setTimeHighlightColor(java.awt.Color color)
TimeHandler
setTimeHighlightColor
in interface TimeHandler
public double getMaxTime()
TimeHandler
getMaxTime
in interface TimeHandler
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |