|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensourcephysics.cabrillo.tracker.Step
org.opensourcephysics.cabrillo.tracker.ProtractorStep
public class ProtractorStep
This is a Step for a Protractor. It is used for measuring angles.
| Field Summary | |
|---|---|
protected java.awt.Shape |
arcHighlight
|
protected boolean |
drawLayoutBounds
|
protected TPoint |
end1
|
protected java.util.Map<TrackerPanel,java.awt.Shape> |
end1Shapes
|
protected TPoint |
end2
|
protected java.util.Map<TrackerPanel,java.awt.Shape> |
end2Shapes
|
protected boolean |
endsEnabled
|
protected static java.awt.Font |
font
|
protected org.opensourcephysics.cabrillo.tracker.ProtractorStep.Handle |
handle
|
protected java.util.Map<TrackerPanel,java.awt.Rectangle> |
layoutBounds
|
protected double |
line1Angle
|
protected java.util.Map<TrackerPanel,java.awt.Shape> |
line1Shapes
|
protected double |
line2Angle
|
protected java.util.Map<TrackerPanel,java.awt.Shape> |
line2Shapes
|
protected Protractor |
protractor
|
protected org.opensourcephysics.cabrillo.tracker.ProtractorStep.Rotator |
rotator
|
protected java.util.Map<TrackerPanel,java.awt.Shape> |
rotatorShapes
|
protected java.awt.Shape |
selectedShape
|
protected java.util.Map<TrackerPanel,java.awt.font.TextLayout> |
textLayouts
|
protected static java.awt.geom.AffineTransform |
transform
|
protected TPoint |
vertex
|
protected java.awt.Shape |
vertexCircle
|
protected java.util.Map<TrackerPanel,java.awt.Shape> |
vertexShapes
|
| Fields inherited from class org.opensourcephysics.cabrillo.tracker.Step |
|---|
dataVisible, defaultIndex, footprint, format, frc, hitRect, marks, n, points, screenPoints, selectionShape, track, valid |
| Constructor Summary | |
|---|---|
ProtractorStep(Protractor track,
int n,
double x1,
double y1,
double x2,
double y2)
Constructs a ProtractorStep with specified end point coordinates in image space. |
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
Clones this Step. |
void |
draw(DrawingPanel panel,
java.awt.Graphics _g)
Overrides Step draw method. |
Interactive |
findInteractive(DrawingPanel panel,
int xpix,
int ypix)
Overrides Step findInteractive method. |
java.awt.Rectangle |
getBounds(TrackerPanel trackerPanel)
Overrides Step getBounds method. |
static int |
getLength()
Gets the step length. |
protected Mark |
getMark(TrackerPanel trackerPanel)
Overrides Step getMark method. |
double |
getProtractorAngle()
Gets the protractor angle. |
boolean |
isEndsEnabled()
Gets whether the ends are enabled. |
int |
n()
Returns the frame number. |
void |
setEndsEnabled(boolean enabled)
Enables and disables the interactivity of the ends. |
void |
setFootprint(Footprint footprint)
Overrides Step setFootprint method. |
void |
setProtractorAngle(double theta)
Sets the protractor angle of this tape. |
java.lang.String |
toString()
Returns a String describing this. |
| Methods inherited from class org.opensourcephysics.cabrillo.tracker.Step |
|---|
erase, erase, getDefaultAutotrackIndex, getDefaultPoint, getFrameNumber, getPointIndex, getPoints, getTrack, remark, remark, repaint, repaint, setDefaultPointIndex, setHitRectCenter |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected static java.awt.geom.AffineTransform transform
protected static java.awt.Font font
protected Protractor protractor
protected TPoint vertex
protected TPoint end1
protected TPoint end2
protected org.opensourcephysics.cabrillo.tracker.ProtractorStep.Handle handle
protected org.opensourcephysics.cabrillo.tracker.ProtractorStep.Rotator rotator
protected double line1Angle
protected double line2Angle
protected boolean endsEnabled
protected boolean drawLayoutBounds
protected java.awt.Shape vertexCircle
protected java.awt.Shape arcHighlight
protected java.util.Map<TrackerPanel,java.awt.Shape> vertexShapes
protected java.util.Map<TrackerPanel,java.awt.Shape> end1Shapes
protected java.util.Map<TrackerPanel,java.awt.Shape> end2Shapes
protected java.util.Map<TrackerPanel,java.awt.Shape> line1Shapes
protected java.util.Map<TrackerPanel,java.awt.Shape> line2Shapes
protected java.util.Map<TrackerPanel,java.awt.Shape> rotatorShapes
protected java.util.Map<TrackerPanel,java.awt.font.TextLayout> textLayouts
protected java.util.Map<TrackerPanel,java.awt.Rectangle> layoutBounds
protected java.awt.Shape selectedShape
| Constructor Detail |
|---|
public ProtractorStep(Protractor track,
int n,
double x1,
double y1,
double x2,
double y2)
track - the trackn - the frame numberx1 - the x coordinate of end 1y1 - the y coordinate of end 1x2 - the x coordinate of end 2y2 - the y coordinate of end 2| Method Detail |
|---|
public void setEndsEnabled(boolean enabled)
enabled - true to enable the endspublic boolean isEndsEnabled()
true if the ends are enabledpublic void setFootprint(Footprint footprint)
setFootprint in class Stepfootprint - the footprint
public Interactive findInteractive(DrawingPanel panel,
int xpix,
int ypix)
findInteractive in class Steppanel - the drawing panelxpix - the x pixel positionypix - the y pixel position
public void draw(DrawingPanel panel,
java.awt.Graphics _g)
draw in class Steppanel - the drawing panel requesting the drawing_g - the graphics context on which to drawprotected Mark getMark(TrackerPanel trackerPanel)
getMark in class SteptrackerPanel - the tracker panel
public java.awt.Rectangle getBounds(TrackerPanel trackerPanel)
getBounds in class SteptrackerPanel - the tracker panel drawing the step
public double getProtractorAngle()
public void setProtractorAngle(double theta)
theta - the angle in radianspublic java.lang.Object clone()
clone in class Steppublic java.lang.String toString()
toString in class Steppublic int n()
public static int getLength()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||