|
|||||||||
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.FeeltraceTimeLine
public class FeeltraceTimeLine
A Feeltrace timeline is part of a Feeltrace target control panel (set at
construction). It displays a bar that from left to right covers the duration
of the signal being annotated. An annotation is visualised with the colour
of its emotion. The colour is obtained from the Feeltrace colour map
returned by the method getColourMap()
of the Feeltrace annotation layer. Time spans that do not
contain any annotations will not be coloured and keep the control colour
(usually gray).
The timeline can only be painted if the duration of the signal is known.
This is obtained from the display of the global clock. The display should be
an instance of ClockFace
. If no
clock face could be found or if the maximum time has not been registered with
the clock face, this timeline will not show any annotations.
The timeline is automatically updated whenever the control is shown or
resized (the corpus will be searched for annotations). Otherwise the timeline
is not automatically updated to prevent many possibly costly corpus searches.
The timeline can be updated manually by calling repaint()
. A new annotation can be displayed with
showAnnotation()
.
This class is a TimeHandler
. It will show a black line at
the current time or a window around the current time span.
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 | |
---|---|
FeeltraceTimeLine(FeeltraceTargetControlPanel parent)
Constructs a new Feeltrace timeline 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 |
double |
getMaxTime()
find the largest end time handled by this TimeHandler. |
void |
repaint()
Updates this timeline by searching the corpus. |
void |
setClock(Clock clock)
Set the Clock to which this TimeHandler is registered |
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. |
void |
showAnnotation(double start,
double end,
java.awt.geom.Point2D emotion)
Adds an annotation and updates the timeline. |
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, 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 FeeltraceTimeLine(FeeltraceTargetControlPanel parent)
Constructs a new Feeltrace timeline to be part of the specified target control panel.
parent
- the Feeltrace target control panel that will contain this
timelineMethod Detail |
---|
public void repaint()
Updates this timeline by searching the corpus.
repaint
in class java.awt.Component
public void showAnnotation(double start, double end, java.awt.geom.Point2D emotion)
Adds an annotation and updates the timeline.
start
- the start time of the annotationend
- the end time of the annotationemotion
- the emotion pointpublic 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 |