|
UC Berkeley Group for User Interface Research Updated November 17, 2000 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.berkeley.guir.lib.satin.objects.GraphicalObjectImpl | +--edu.berkeley.guir.lib.satin.stroke.TimedStroke | +--edu.berkeley.guir.lib.satin.objects.LineArrow
A simple straight-line arrow.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v2.1-1.0.0, Nov 02 2000, JH Created.
Inner classes inherited from class edu.berkeley.guir.lib.satin.SatinConstants |
SatinConstants.ObjectPoolAffineTransform, SatinConstants.ObjectPoolPoint2D, SatinConstants.ObjectPoolPolygon2D, SatinConstants.ObjectPoolRectangle2D, SatinConstants.ObjectPoolStringBuffer, SatinConstants.UniqueAffineTransform, SatinConstants.UniquePoint2D, SatinConstants.UniquePolygon2D, SatinConstants.UniqueRectangle2D |
Field Summary | |
static String |
ARROW_STYLE_FILE
|
Fields inherited from class edu.berkeley.guir.lib.satin.stroke.TimedStroke |
TIMEDSTROKE_STYLE_FILE |
Fields inherited from interface edu.berkeley.guir.lib.satin.objects.GraphicalObject |
GESTUREINTRP_CLPROPERTY, INKINTRP_CLPROPERTY, STYLE_CLPROPERTY, VIEW_CLPROPERTY |
Constructor Summary | |
LineArrow()
|
|
LineArrow(float x1,
float y1,
float x2,
float y2)
|
|
LineArrow(GraphicalObject gobStart,
GraphicalObject gobEnd)
|
|
LineArrow(Point2D ptStart,
Point2D ptEnd)
|
Method Summary | |
protected LineArrow |
clone(LineArrow newArrow)
For clone chaining purposes. |
protected LineArrow |
deepClone(LineArrow newArrow)
For deep-clone chaining. |
protected void |
defaultRender(SatinGraphics g)
The default method for rendering. |
protected void |
drawArrowHead(SatinGraphics g)
Draw the arrowhead portion of the arrow. |
protected void |
drawArrowLine(SatinGraphics g)
Draw the line portion of the arrow. |
GraphicalObject |
getEndGraphicalObject()
|
Point2D |
getEndPoint(int cdsys)
Get either the center of the bounding box of the end graphical object if it was defined through setEndGraphicalObject(GraphicalObject) , or
the fixed point that was set through setEndPoint(Point2D) . |
GraphicalObject |
getStartGraphicalObject()
|
Point2D |
getStartPoint(int cdsys)
Get either the center of the bounding box of the start graphical object if it was defined through setStartGraphicalObject(GraphicalObject) , or
the fixed point that was set through setStartPoint(Point2D) . |
protected boolean |
lineContains(Point2D pt)
|
static void |
main(String[] argv)
|
void |
onDelete(Watchable w)
Callback method for notifications of deletions, that is this Graphical Object has been deleted and you should remove it. |
void |
onNotify(Watchable w,
Object arg)
Callback method for generic notifications. |
void |
onUpdate(Watchable w,
Object arg)
Callback method for notifications. |
void |
onUpdate(Watchable w,
String strProperty,
Object oldVal,
Object newVal)
Callback method for notifications. |
void |
setArrowHeadVector(double x,
double y)
|
void |
setArrowHeadVector(float x,
float y)
|
void |
setArrowHeadVector(Point2D pt)
Set the direction the arrowhead should point, where (0,0) is where you are now. |
void |
setDirty(boolean flag)
|
void |
setEndGraphicalObject(GraphicalObject gob)
Set the graphical object that we end at (and the arrowhead points to). |
void |
setEndPoint(double x,
double y)
|
void |
setEndPoint(float x,
float y)
|
void |
setEndPoint(Point2D pt)
Copies the values in the point. |
void |
setStartGraphicalObject(GraphicalObject gob)
Set the graphical object that we start from. |
void |
setStartPoint(double x,
double y)
|
void |
setStartPoint(float x,
float y)
|
void |
setStartPoint(Point2D pt)
Copies the values in the point. |
protected boolean |
shapeContainsInternal(Point2D pt)
Here in case we ever want to override and deal with arrow heads. |
protected boolean |
shapeContainsInternal(Shape s)
Here in case we ever want to override and deal with arrow heads. |
protected boolean |
shapeIntersectsInternal(Shape s)
Here in case we ever want to override and deal with arrow heads. |
protected void |
updateArrowHeadAngle()
Update the angle for the arrow head. |
protected void |
updateBounds()
|
Methods inherited from class edu.berkeley.guir.lib.satin.stroke.TimedStroke |
addPoint, addPoint, addPoint, addPoint, addPoint, addPoint, changePoint, clearPoints, clone, clone, doneAddingPoints, getButtonString, getEndPoint2D, getEndPoint2D, getEndTime, getLength2D, getNumPoints, getPolygon2D, getPolygon2D, getStartPoint2D, getStartPoint2D, getStartTime, getSubstroke, isLeftButton, isMiddleButton, isRightButton, renderSelected, setDrawFix, setLeftButton, setMiddleButton, setRightButton, toDebugString |
Methods inherited from class java.lang.Object |
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.berkeley.guir.lib.satin.watch.Watcher |
clone |
Field Detail |
public static final String ARROW_STYLE_FILE
Constructor Detail |
public LineArrow()
public LineArrow(Point2D ptStart, Point2D ptEnd)
public LineArrow(float x1, float y1, float x2, float y2)
public LineArrow(GraphicalObject gobStart, GraphicalObject gobEnd)
Method Detail |
public void setDirty(boolean flag)
public void setStartPoint(Point2D pt)
public void setStartPoint(float x, float y)
public void setStartPoint(double x, double y)
public void setStartGraphicalObject(GraphicalObject gob)
public Point2D getStartPoint(int cdsys)
setStartGraphicalObject(GraphicalObject)
, or
the fixed point that was set through setStartPoint(Point2D)
.cdsys
- is the coordinate system to return in.public GraphicalObject getStartGraphicalObject()
public void setEndPoint(Point2D pt)
public void setEndPoint(float x, float y)
public void setEndPoint(double x, double y)
public void setEndGraphicalObject(GraphicalObject gob)
public Point2D getEndPoint(int cdsys)
setEndGraphicalObject(GraphicalObject)
, or
the fixed point that was set through setEndPoint(Point2D)
.cdsys
- is the coordinate system to return in.public GraphicalObject getEndGraphicalObject()
public void setArrowHeadVector(Point2D pt)
public void setArrowHeadVector(float x, float y)
public void setArrowHeadVector(double x, double y)
protected void updateArrowHeadAngle()
protected void updateBounds()
protected final boolean shapeContainsInternal(Point2D pt)
shapeContainsInternal
in class GraphicalObjectImpl
protected final boolean shapeContainsInternal(Shape s)
shapeContainsInternal
in class GraphicalObjectImpl
protected final boolean shapeIntersectsInternal(Shape s)
shapeIntersectsInternal
in class GraphicalObjectImpl
protected boolean lineContains(Point2D pt)
protected void defaultRender(SatinGraphics g)
GraphicalObjectImpl
defaultRender
in class TimedStroke
protected void drawArrowHead(SatinGraphics g)
protected void drawArrowLine(SatinGraphics g)
public void onNotify(Watchable w, Object arg)
Watcher
onNotify
in interface Watcher
edu.berkeley.guir.lib.satin.watch.Watcher
w
- is the Watchable object notifying you.arg
- is some agreed upon argument.Watchable.notifyWatchers()
,
Watchable.notifyWatchers(java.lang.Object)
public void onUpdate(Watchable w, Object arg)
Watcher
onUpdate
in interface Watcher
edu.berkeley.guir.lib.satin.watch.Watcher
w
- is the Watchable object that has been updated.arg
- is some agreed upon argument.Watchable.notifyWatchersUpdate(Object)
public void onUpdate(Watchable w, String strProperty, Object oldVal, Object newVal)
Watcher
onUpdate
in interface Watcher
edu.berkeley.guir.lib.satin.watch.Watcher
w
- is the Watchable object that has been updated.strProperty
- is the name of the property to update.oldVal
- is the old value of the property. This should usually
be a clone of the old value, so that modifying this
value should have no effect. Whether this is a copy or
a reference should be defined in the SatinConstants
file.newVal
- is the new value of the property. This should usually
be a clone of the old value, so that modifying this
value should have no effect. However, don't clone
if it is prohibitively expensive to do so. Whether
this is a copy or a reference should be defined in the
SatinConstants file.SatinConstants
,
Watchable.notifyWatchersUpdate(String, Object, Object)
public void onDelete(Watchable w)
Watcher
onDelete
in interface Watcher
edu.berkeley.guir.lib.satin.watch.Watcher
w
- is the Watchable object to be deleted.Watchable.notifyWatchersDelete()
protected LineArrow clone(LineArrow newArrow)
GraphicalObjectImpl.clone(GraphicalObjectImpl)
protected LineArrow deepClone(LineArrow newArrow)
TimedStroke.clone()
,
GraphicalObjectImpl.deepClone()
public static void main(String[] argv)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |