Class PencilScene
java.lang.Object
org.opensourcephysics.cabrillo.tracker.PencilScene
- All Implemented Interfaces:
- Comparable<PencilScene>,- Drawable,- Interactive,- Measurable,- Trackable
A PencilScene is a collection of PencilDrawings and an optional PencilCaption.
- Author:
- Douglas Brown
- 
Field SummaryFieldsFields inherited from interface org.opensourcephysics.media.core.TrackablePROPERTY_ADJUSTING
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionintcompareTo(PencilScene that) voiddraw(DrawingPanel panel, Graphics g) Draws a representation of an object in a drawing panel.findInteractive(DrawingPanel panel, int xpix, int ypix) Gets the caption.getDescription(TrackerPanel trackerPanel) Gets a compact description suitable for the PencilControl sceneDropdown.Gets the drawings.static XML.ObjectLoaderReturns the XML.ObjectLoader for this class.doublegetX()doublegetXMax()Gets the maximum x needed to draw this object.doublegetXMin()Gets the minimum x needed to draw this object.doublegetY()doublegetYMax()Gets the maximum y needed to draw this object.doublegetYMin()Gets the minimum y needed to draw this object.booleanincludesFrame(int frame) booleanbooleanisHeavy()Gets the heavy state of this scene.booleanDetermines if information is available to set min/max values.booleanGets the visibility of this scene.protected voidmeasure()Measures this scene to determine an appropriate margin.voidsetCaption(PencilCaption caption) Sets the caption.voidSets the color of the caption and all drawings.voidsetEnabled(boolean enabled) intsetEndFrame(int end) Sets the end frame.voidsetHeavy(boolean heavy) Sets the heavy state of this scene.intsetStartFrame(int start) Sets the start frame.voidsetVisible(boolean vis) Sets the visibility of this scene.voidsetX(double x) voidsetXY(double x, double y) voidsetY(double y) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.opensourcephysics.display.InteractiveisInteractive
- 
Field Details- 
frame
- 
panelID
 
- 
- 
Constructor Details- 
PencilScenepublic PencilScene()Constructor.
 
- 
- 
Method Details- 
drawDescription copied from interface:DrawableDraws a representation of an object in a drawing panel.
- 
getDrawingsGets the drawings.- Returns:
- the drawings
 
- 
getCaptionGets the caption. May return null.- Returns:
- the caption
 
- 
setCaptionSets the caption.- Parameters:
- caption- the caption.
 
- 
setColorSets the color of the caption and all drawings.- Parameters:
- color- the color
 
- 
setStartFramepublic int setStartFrame(int start) Sets the start frame.- Parameters:
- start- the desired start frame
- Returns:
- the resulting start frame
 
- 
setEndFramepublic int setEndFrame(int end) Sets the end frame.- Parameters:
- end- the desired end frame
- Returns:
- the resulting end frame
 
- 
getDescriptionGets a compact description suitable for the PencilControl sceneDropdown.- Parameters:
- trackerPanel- the TrackerPanel with videoclip data
- Returns:
- the description
 
- 
includesFramepublic boolean includesFrame(int frame) 
- 
isVisiblepublic boolean isVisible()Gets the visibility of this scene.- Returns:
- true if visible
 
- 
setVisiblepublic void setVisible(boolean vis) Sets the visibility of this scene.- Parameters:
- vis- true for visible
 
- 
isHeavypublic boolean isHeavy()Gets the heavy state of this scene. When heavy, bold fonts and heavy lines are displayed.- Returns:
- true if heavy
 
- 
setHeavypublic void setHeavy(boolean heavy) Sets the heavy state of this scene.- Parameters:
- heavy- true for heavy lines and bold font
 
- 
getXMinpublic double getXMin()Description copied from interface:MeasurableGets the minimum x needed to draw this object.- Specified by:
- getXMinin interface- Measurable
- Returns:
- minimum
 
- 
getXMaxpublic double getXMax()Description copied from interface:MeasurableGets the maximum x needed to draw this object.- Specified by:
- getXMaxin interface- Measurable
- Returns:
- maximum
 
- 
getYMinpublic double getYMin()Description copied from interface:MeasurableGets the minimum y needed to draw this object.- Specified by:
- getYMinin interface- Measurable
- Returns:
- minimum
 
- 
getYMaxpublic double getYMax()Description copied from interface:MeasurableGets the maximum y needed to draw this object.- Specified by:
- getYMaxin interface- Measurable
- Returns:
- minimum
 
- 
isMeasuredpublic boolean isMeasured()Description copied from interface:MeasurableDetermines if information is available to set min/max values. Objects that store data should return false if data is null.- Specified by:
- isMeasuredin interface- Measurable
- Returns:
- true if min/max values are valid
 
- 
compareTo- Specified by:
- compareToin interface- Comparable<PencilScene>
 
- 
findInteractive- Specified by:
- findInteractivein interface- Interactive
 
- 
setEnabledpublic void setEnabled(boolean enabled) - Specified by:
- setEnabledin interface- Interactive
 
- 
isEnabledpublic boolean isEnabled()- Specified by:
- isEnabledin interface- Interactive
 
- 
setXYpublic void setXY(double x, double y) - Specified by:
- setXYin interface- Interactive
 
- 
setXpublic void setX(double x) - Specified by:
- setXin interface- Interactive
 
- 
setYpublic void setY(double y) - Specified by:
- setYin interface- Interactive
 
- 
getXpublic double getX()- Specified by:
- getXin interface- Interactive
 
- 
getYpublic double getY()- Specified by:
- getYin interface- Interactive
 
- 
measureprotected void measure()Measures this scene to determine an appropriate margin.
- 
getLoaderReturns the XML.ObjectLoader for this class.- Returns:
- the object loader
 
 
-