public class VideoPanel extends InteractivePanel implements java.beans.PropertyChangeListener
InteractivePanel.IADMouseControllerDrawingPanel.ZoomBoxjavax.swing.JPanel.AccessibleJPaneljavax.swing.JComponent.AccessibleJComponent| Modifier and Type | Field and Description |
|---|---|
boolean |
changed |
protected ImageCoordSystem |
coords |
protected java.io.File |
dataFile |
java.lang.String |
defaultFileName |
protected static int |
defaultHeight |
protected static int |
defaultWidth |
protected boolean |
drawingInImageSpace |
protected java.util.Map |
filterClasses |
protected double |
imageBorder |
protected double |
imageHeight |
protected double |
imageWidth |
protected TextPanel |
messagePanel |
protected TextPanel |
mousePanel |
protected VideoPlayer |
player |
protected boolean |
playerVisible |
protected java.awt.geom.Point2D |
pt |
protected Video |
video |
protected double |
xOffset |
protected double |
yOffset |
containsInteractive, interactive, MOUSE_CLICKED, MOUSE_DRAGGED, MOUSE_ENTERED, MOUSE_EXITED, MOUSE_MOVED, MOUSE_PRESSED, MOUSE_RELEASED, mouseAction, mouseEventadjustableGutter, antialiasShapeOn, antialiasTextOn, autoscaleMargin, autoscaleX, autoscaleY, bgColor, blMessageBox, BOTTOM_LEFT, BOTTOM_RIGHT, bottomGutter, bottomGutterPreferred, brMessageBox, clipAtGutter, coordinateStrBuilder, customInspector, decimalFormat, dimensionSetter, drawableList, enableZoom, fixedPixelPerUnit, glassPanel, glassPanelLayout, height, leftGutter, leftGutterPreferred, mouseController, offscreenImage, optionController, pixelMatrix, pixelTransform, popupmenu, propertiesItem, rightGutter, rightGutterPreferred, scaleItem, scientificFormat, showCoordinates, snapshotItem, squareAspect, tlMessageBox, TOP_LEFT, TOP_RIGHT, topGutter, topGutterPreferred, trMessageBox, validImage, viewRect, width, workingImage, xceil, xfloor, xMarginPercentage, xmax, xmaxPreferred, xmin, xminPreferred, xPixPerUnit, yceil, yfloor, yMarginPercentage, ymax, ymaxPreferred, ymin, yminPreferred, yPixPerUnit, zoomBox, zoomInItem, zoomMode, zoomOutItemaccessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW| Constructor and Description |
|---|
VideoPanel()
Constructs a blank VideoPanel with a player.
|
VideoPanel(Video video)
Constructs a VideoPanel with a video and player.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDrawable(Drawable drawable)
Adds a drawable object to the drawable list.
|
void |
addFilter(java.lang.Class filterClass)
Adds a video filter class to the map of available filters.
|
protected boolean |
checkImage()
Overrides DrawingPanel checkImage method so offscreenImage will not include
the videoPlayer.
|
void |
clear()
Removes all drawable objects except the video.
|
ImageCoordSystem |
getCoords()
Gets the current image coordinate system used for drawing.
|
java.io.File |
getDataFile()
Gets the file where data is saved.
|
java.util.ArrayList |
getDrawables()
Overrides DrawingPanel getDrawables method.
|
java.lang.String |
getFilePath()
Gets the default path for the saveAs method.
|
java.util.Map |
getFilters()
Gets the map of available video filters.
|
int |
getFrameNumber()
Gets the current frame number.
|
double |
getImageBorder()
Gets the image border.
|
double |
getImageHeight()
Gets the image height in image units (1.0 unit/pixel).
|
double |
getImageWidth()
Gets the image width in image units.
|
static XML.ObjectLoader |
getLoader()
Returns an XML.ObjectLoader to save and load data for this object.
|
VideoPlayer |
getPlayer()
Gets the video player.
|
int |
getStepNumber()
Gets the current step number.
|
Video |
getVideo()
Gets the video.
|
java.awt.geom.Point2D |
getWorldMousePoint()
Gets the world coordinates of the last mouse event
|
void |
hideMouseBox()
Hides the mouse box
|
boolean |
isDrawingInImageSpace()
Returns true if this is drawing in image space rather than
world space.
|
boolean |
isPlayerVisible()
Gets the video player visibility.
|
boolean |
isShowCoordinates()
Returns true if mouse coordinates are displayed
|
protected void |
paintEverything(java.awt.Graphics g)
Overrides DrawingPanel paintEverything method.
|
void |
propertyChange(java.beans.PropertyChangeEvent e)
Responds to property change events.
|
void |
removeDrawable(Drawable drawable)
Removes a drawable object from the drawable list.
|
void |
removeFilter(java.lang.Class filterClass)
Removes a video filter class from the map of available filters.
|
void |
removeObjectsOfClass(java.lang.Class c)
Removes all objects of the specified class.
|
protected void |
scale(java.util.ArrayList drawables)
Overrides DrawingPanel scale method to handle drawing in imagespace
|
void |
setCoords(ImageCoordSystem newCoords)
Sets the image coordinate system used to convert between
image and world spaces.
|
void |
setDataFile(java.io.File file)
Sets the file in which data is saved.
|
void |
setDrawingInImageSpace(boolean imagespace)
Sets the drawing space to imagespace or worldspace.
|
void |
setImageBorder(double borderFraction)
Sets the image border.
|
void |
setImageHeight(double h)
Sets the image height in image units (1.0 unit/pixel).
|
void |
setImageWidth(double w)
Sets the image width in image units.
|
void |
setPlayerVisible(boolean visible)
Shows or hides the video player.
|
void |
setVideo(Video newVideo)
Sets the video.
|
getCurrentDraggable, getInteractive, getMouseAction, getMouseButton, getMouseClickCount, getMouseIntX, getMouseIntY, getMouseX, getMouseY, handleMouseAction, saveMouseEvent, setInteractiveMouseHandler, setShowCoordinatesactionPerformed, addDrawables, buildPopupmenu, checkWorkingImage, computeGutters, enableInspector, findViewRect, getAspectRatio, getBottomGutter, getCoordinateStringBuilder, getDimensionSetter, getDrawables, getGlassPanel, getGutters, getHeight, getImageRatio, getLeftGutter, getMaxPixPerUnit, getMeasure, getObjectOfClass, getPixelMatrix, getPixelTransform, getPopupMenu, getPreferredXMax, getPreferredXMin, getPreferredYMax, getPreferredYMin, getRightGutter, getScale, getTopGutter, getVideoTool, getViewRect, getWidth, getXMax, getXMin, getXPixPerUnit, getYMax, getYMin, getYPixPerUnit, getZoomBox, hasInspector, hideInspector, invalidateImage, isAdjustableGutter, isAntialiasShapeOn, isAntialiasTextOn, isAutoscaleX, isAutoscaleY, isBuffered, isClipAtGutter, isIconified, isPointInside, isSquareAspect, isZoom, limitAutoscaleX, limitAutoscaleY, measure, paint, paintComponent, paintDrawableList, paintFirst, paintLast, pixToX, pixToY, project, recomputeTransform, refreshGUI, removeDrawables, removeOptionController, render, render, replaceDrawable, resetGutters, scale, scaleX, scaleY, setAdjustableGutter, setAntialiasShapeOn, setAntialiasTextOn, setAutoscaleMargin, setAutoscaleX, setAutoscaleY, setBounds, setBounds, setBuffered, setClipAtGutter, setCoordinateStringBuilder, setCustomInspector, setFontLevel, setGutters, setGutters, setIgnoreRepaint, setMessage, setMessage, setMouseCursor, setPixelScale, setPixelsPerUnit, setPopupMenu, setPreferredGutters, setPreferredMinMax, setPreferredMinMaxX, setPreferredMinMaxY, setSquareAspect, setVideoTool, setVisible, setXMarginPercentage, setYMarginPercentage, setZoom, showInspector, snapshot, xToPix, yToPix, zoomIn, zoomOutgetAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, 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, setUI, setVerifyInputWhenFocusTarget, unregisterKeyboardAction, updateadd, add, add, add, add, addContainerListener, addImpl, 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, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTreeaction, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, 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, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleprotected static int defaultWidth
protected static int defaultHeight
protected VideoPlayer player
protected TextPanel mousePanel
protected TextPanel messagePanel
protected Video video
protected boolean playerVisible
protected boolean drawingInImageSpace
protected double imageWidth
protected double imageHeight
protected double xOffset
protected double yOffset
protected double imageBorder
protected ImageCoordSystem coords
protected java.awt.geom.Point2D pt
protected java.io.File dataFile
protected java.util.Map filterClasses
public boolean changed
public java.lang.String defaultFileName
public VideoPanel()
public VideoPanel(Video video)
video - the video to be drawnpublic void setVideo(Video newVideo)
newVideo - the videopublic Video getVideo()
public double getImageWidth()
public void setImageWidth(double w)
w - the widthpublic double getImageHeight()
public void setImageHeight(double h)
h - the heightpublic double getImageBorder()
public void setImageBorder(double borderFraction)
borderFraction - the border fractionpublic void setCoords(ImageCoordSystem newCoords)
newCoords - the image coordinate systempublic ImageCoordSystem getCoords()
public void setDataFile(java.io.File file)
file - the data filepublic java.io.File getDataFile()
public java.lang.String getFilePath()
public void setDrawingInImageSpace(boolean imagespace)
imagespace - true to draw in imagespacepublic boolean isDrawingInImageSpace()
true if drawing in image spacepublic VideoPlayer getPlayer()
public void setPlayerVisible(boolean visible)
visible - true to show the playerpublic boolean isPlayerVisible()
true if the player is visiblepublic int getStepNumber()
public int getFrameNumber()
public java.util.ArrayList getDrawables()
getDrawables in class DrawingPanelpublic void addDrawable(Drawable drawable)
addDrawable in class InteractivePaneldrawable - the drawable objectpublic void removeDrawable(Drawable drawable)
removeDrawable in class DrawingPaneldrawable - the drawable objectpublic void removeObjectsOfClass(java.lang.Class c)
removeObjectsOfClass in class DrawingPanelc - the class to removeDrawingPanel.removeDrawables(Class c)public void clear()
clear in class InteractivePanelpublic void addFilter(java.lang.Class filterClass)
filterClass - the filter class to addpublic void removeFilter(java.lang.Class filterClass)
filterClass - the filter class to removepublic java.util.Map getFilters()
public boolean isShowCoordinates()
true if mouse coordinates are displayedpublic void hideMouseBox()
public void propertyChange(java.beans.PropertyChangeEvent e)
propertyChange in interface java.beans.PropertyChangeListenere - the property change eventprotected void paintEverything(java.awt.Graphics g)
paintEverything in class DrawingPanelg - the graphics context to draw onprotected void scale(java.util.ArrayList drawables)
scale in class DrawingPaneldrawables - the list of drawable objectsprotected boolean checkImage()
true if the image is correctly sizedpublic java.awt.geom.Point2D getWorldMousePoint()
public static XML.ObjectLoader getLoader()