|
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.interpreter.InterpreterImpl
The superclass for all of the types of interpreters. Interpreters can do two different things: handle and manipulate new strokes, and manipulate old strokes. Interpreters are attached to GraphicalObjects, currently one interpreter per GraphicalObject.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Apr 22 1999, 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 |
| Constructor Summary | |
InterpreterImpl()
Empty constructor. |
|
| Method Summary | |
abstract Object |
clone()
Since not overriding clone() can cause many errors with copying-and-pasting, I'm forcing you to do it. |
protected InterpreterImpl |
clone(InterpreterImpl intrp)
|
GraphicalObject |
getAttachedGraphicalObject()
Get the GraphicalObject this Interpreter is attached to. |
String |
getName()
Get the name of this Interpreter. |
void |
handleNewStroke(NewStrokeEvent evt)
By default, does nothing. |
void |
handleSingleStroke(SingleStrokeEvent evt)
By default, does nothing. |
void |
handleUpdateStroke(UpdateStrokeEvent evt)
By default, does nothing. |
boolean |
isConsumedAccepted()
Check whether consumed events are accepted or not. |
boolean |
isEnabled()
See if this interpreter is enabled or not (ie can run or not). |
boolean |
isEventAccepted(EventObject evt)
This method is called for us when an event is handed to us, to ensure that we really want to handle the event. |
boolean |
isEventAccepted(StrokeEvent evt)
This method is called for us when an event is handed to us, to ensure that we really want to handle the event. |
boolean |
isLeftButtonAccepted()
Check if the left button is Accepted. |
boolean |
isMiddleButtonAccepted()
Check if the middle button is Accepted. |
boolean |
isRightButtonAccepted()
Check if the right button is Accepted. |
void |
setAcceptConsumed(boolean flag)
Set whether consumed events are accepted or not. |
void |
setAcceptLeftButton(boolean flag)
Set whether the left button is Accepted or not. |
void |
setAcceptMiddleButton(boolean flag)
Set whether the middle button is Accepted or not. |
void |
setAcceptRightButton(boolean flag)
Set whether the right button is Accepted or not. |
GraphicalObject |
setAttachedGraphicalObject(GraphicalObject newGob)
Set the GraphicalObject this Interpreter is attached to. |
void |
setEnabled(boolean flag)
Set whether or not this interpreter is enabled or not (ie can run or not). |
String |
setName(String strName)
Set the name of this Interpreter. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public InterpreterImpl()
| Method Detail |
public boolean isEnabled()
InterpreterIf called by an MultiInterpreter, it just turns that MultiInterpreter off, but not any contained Interpreters.
isEnabled in interface Interpreterpublic String getName()
InterpretergetName in interface Interpreteredu.berkeley.guir.lib.satin.interpreter.Interpreterpublic void setEnabled(boolean flag)
InterpretersetEnabled in interface Interpreterpublic String setName(String strName)
InterpretersetName in interface Interpreteredu.berkeley.guir.lib.satin.interpreter.InterpreterstrName - is the new name of this interpreter.public GraphicalObject setAttachedGraphicalObject(GraphicalObject newGob)
setAttachedGraphicalObject in interface Interpretergob - is the GraphicalObject this Interpreter is to be attached to.
Okay if null temporarily.public GraphicalObject getAttachedGraphicalObject()
getAttachedGraphicalObject in interface Interpreterpublic void handleNewStroke(NewStrokeEvent evt)
handleNewStroke in interface StrokeListeneredu.berkeley.guir.lib.satin.event.StrokeListenerevt - is the event to handle.public void handleUpdateStroke(UpdateStrokeEvent evt)
handleUpdateStroke in interface StrokeListeneredu.berkeley.guir.lib.satin.event.StrokeListenerStrokeListener.handleNewStroke(NewStrokeEvent).public void handleSingleStroke(SingleStrokeEvent evt)
handleSingleStroke in interface StrokeListeneredu.berkeley.guir.lib.satin.event.StrokeListenerStrokeListener.handleNewStroke(NewStrokeEvent).public boolean isConsumedAccepted()
SatinEventFilterisConsumedAccepted in interface SatinEventFilterpublic boolean isLeftButtonAccepted()
StrokeEventFilterisLeftButtonAccepted in interface StrokeEventFilterpublic boolean isMiddleButtonAccepted()
StrokeEventFilterisMiddleButtonAccepted in interface StrokeEventFilterpublic boolean isRightButtonAccepted()
StrokeEventFilterisRightButtonAccepted in interface StrokeEventFilterpublic void setAcceptConsumed(boolean flag)
SatinEventFiltersetAcceptConsumed in interface SatinEventFilterpublic void setAcceptLeftButton(boolean flag)
StrokeEventFiltersetAcceptLeftButton in interface StrokeEventFilterpublic void setAcceptMiddleButton(boolean flag)
StrokeEventFiltersetAcceptMiddleButton in interface StrokeEventFilterpublic void setAcceptRightButton(boolean flag)
StrokeEventFiltersetAcceptRightButton in interface StrokeEventFilterpublic boolean isEventAccepted(StrokeEvent evt)
public boolean isEventAccepted(EventObject evt)
isEventAccepted in interface EventFilterpublic String toString()
toString in class Objectpublic abstract Object clone()
clone in interface Interpreterclone in class Objectprotected InterpreterImpl clone(InterpreterImpl intrp)
|
Copyright Information | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||