Class TMat
java.lang.Object
org.opensourcephysics.cabrillo.tracker.TMat
- All Implemented Interfaces:
PropertyChangeListener,EventListener,Drawable,Measurable,Trackable
This is a trackable rectangular background mat that draws itself on a tracker
panel behind the video.
- Author:
- Douglas Brown
-
Field Summary
FieldsFields inherited from interface org.opensourcephysics.media.core.Trackable
PROPERTY_ADJUSTING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckVideo(TrackerPanel panel) voidcleanup()Cleans up this matvoiddraw(DrawingPanel panel, Graphics g) Draws the image mat on the panel.voidfinalize()protected Rectangleprotected Rectangle2DgetPaint()Gets the paint.doublegetXMax()Gets the maximum x needed to draw this object.doublegetXMin()Gets the minimum x needed to draw this object.doublegetYMax()Gets the maximum y needed to draw this object.doublegetYMin()Gets the minimum y needed to draw this object.voidbooleanReports whether information is available to set min/max values.booleanGets the visibility of this mat.voidResponds to property change events.voidrefresh()Refreshes this mat.voidSets the paint.voidsetTrackerPanel(TrackerPanel panel) voidsetVisible(boolean visible) Shows or hides this mat.Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.Drawable
isInteractive
-
Field Details
-
drawnBounds
-
-
Constructor Details
-
TMat
Creates a mat for the specified tracker panel- Parameters:
panel- the tracker panel
-
-
Method Details
-
setTrackerPanel
-
draw
Draws the image mat on the panel. -
getDrawingBounds
-
getPaint
Gets the paint.- Returns:
- the paint used to draw the mat
-
setPaint
Sets the paint.- Parameters:
paint- the desired paint
-
setVisible
public void setVisible(boolean visible) Shows or hides this mat.- Parameters:
visible-trueto show this mat.
-
isVisible
public boolean isVisible()Gets the visibility of this mat.- Returns:
trueif this mat is visible
-
getXMin
public double getXMin()Gets the minimum x needed to draw this object.- Specified by:
getXMinin interfaceMeasurable- Returns:
- minimum x
-
getXMax
public double getXMax()Gets the maximum x needed to draw this object.- Specified by:
getXMaxin interfaceMeasurable- Returns:
- maximum x
-
getYMin
public double getYMin()Gets the minimum y needed to draw this object.- Specified by:
getYMinin interfaceMeasurable- Returns:
- minimum y
-
getYMax
public double getYMax()Gets the maximum y needed to draw this object.- Specified by:
getYMaxin interfaceMeasurable- Returns:
- maximum y
-
isMeasured
public boolean isMeasured()Reports whether information is available to set min/max values.- Specified by:
isMeasuredin interfaceMeasurable- Returns:
trueif min/max values are valid
-
refresh
public void refresh()Refreshes this mat. -
checkVideo
-
propertyChange
Responds to property change events.- Specified by:
propertyChangein interfacePropertyChangeListener- Parameters:
e- the property change event
-
cleanup
public void cleanup()Cleans up this mat -
finalize
public void finalize() -
getBounds
-
invalidate
public void invalidate()
-