|
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 | +--java.util.EventObject | +--edu.berkeley.guir.lib.satin.event.SatinEvent | +--edu.berkeley.guir.lib.satin.event.StrokeEvent
An abstract class representing an event signalling a stroke has been completed.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Oct 29 1998, JH Created class - SATIN-v2.1-1.0.0, Aug 11 2000, JH Touched for SATIN release
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 |
Fields inherited from class java.util.EventObject |
source |
Constructor Summary | |
StrokeEvent(Object source)
Create a new StrokeEvent object. |
|
StrokeEvent(Object source,
TimedStroke stroke)
Create a new StrokeEvent object. |
|
StrokeEvent(Object source,
TimedStroke stroke,
MouseEvent evt)
Create a new StrokeEvent object. |
Method Summary | |
MouseEvent |
getMouseEvent()
Get a reference to the corresponding mouse event, after the transformations have been applied (ie in relative coordinates, relative to the last GraphicalObject that handled this event). |
TimedStroke |
getStroke()
Get a reference to the Stroke object this event represents, after the transformations have been applied (ie in relative coordinate, relative to the last GraphicalObject that handled this event). |
MouseEvent |
getUntransformedMouseEvnet()
Get a reference to the corresponding mouse event, before the transformations have been applied (ie in absolute coordinates). |
TimedStroke |
getUntransformedStroke()
Get a reference to the Stroke object this event represents, before the transformations have been applied (ie in absolute coordinates). |
boolean |
isLeftButton()
Does the stroke use the left button? Only registers as left button if neither middle and right are down too. |
boolean |
isMiddleButton()
Does the stroke use the middle button? |
boolean |
isRightButton()
Does the stroke use the right button? |
protected void |
onApplyTransform(AffineTransform newTx)
Apply the transform to the stroke and to the event. |
protected void |
onSetTransform(AffineTransform newTx)
Apply the transform to the stroke and to the event. |
void |
setMouseEvent(MouseEvent newEvt)
|
void |
setStroke(TimedStroke stk)
|
String |
toString()
|
Methods inherited from class edu.berkeley.guir.lib.satin.event.SatinEvent |
applyTransform, getTransform, isConsumed, setConsumed, setConsumed, setShouldRender, setTransform, shouldRender |
Methods inherited from class java.util.EventObject |
getSource |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public StrokeEvent(Object source)
source
- is the object creating this StrokeEvent.public StrokeEvent(Object source, TimedStroke stroke)
source
- is the object creating this StrokeEvent.public StrokeEvent(Object source, TimedStroke stroke, MouseEvent evt)
source
- is the object creating this StrokeEvent.evt
- is an associated AWT Event.Method Detail |
protected void onApplyTransform(AffineTransform newTx)
onApplyTransform
in class SatinEvent
edu.berkeley.guir.lib.satin.event.SatinEvent
newTx
- is the transform that will be applied.protected void onSetTransform(AffineTransform newTx)
onSetTransform
in class SatinEvent
edu.berkeley.guir.lib.satin.event.SatinEvent
newTx
- is the transform that will be applied.public boolean isLeftButton()
public boolean isMiddleButton()
public boolean isRightButton()
public TimedStroke getStroke()
public void setStroke(TimedStroke stk)
public TimedStroke getUntransformedStroke()
This method is needed since, when adding, GraphicalObjectGroup converts the object to add into its own coordinate system, so using getStroke() applies the transform twice.
public MouseEvent getMouseEvent()
public void setMouseEvent(MouseEvent newEvt)
public MouseEvent getUntransformedMouseEvnet()
public String toString()
toString
in class EventObject
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |