|
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()
Interpreter
If called by an MultiInterpreter, it just turns that MultiInterpreter off, but not any contained Interpreters.
isEnabled
in interface Interpreter
public String getName()
Interpreter
getName
in interface Interpreter
edu.berkeley.guir.lib.satin.interpreter.Interpreter
public void setEnabled(boolean flag)
Interpreter
setEnabled
in interface Interpreter
public String setName(String strName)
Interpreter
setName
in interface Interpreter
edu.berkeley.guir.lib.satin.interpreter.Interpreter
strName
- is the new name of this interpreter.public GraphicalObject setAttachedGraphicalObject(GraphicalObject newGob)
setAttachedGraphicalObject
in interface Interpreter
gob
- is the GraphicalObject this Interpreter is to be attached to.
Okay if null temporarily.public GraphicalObject getAttachedGraphicalObject()
getAttachedGraphicalObject
in interface Interpreter
public void handleNewStroke(NewStrokeEvent evt)
handleNewStroke
in interface StrokeListener
edu.berkeley.guir.lib.satin.event.StrokeListener
evt
- is the event to handle.public void handleUpdateStroke(UpdateStrokeEvent evt)
handleUpdateStroke
in interface StrokeListener
edu.berkeley.guir.lib.satin.event.StrokeListener
StrokeListener.handleNewStroke(NewStrokeEvent).
public void handleSingleStroke(SingleStrokeEvent evt)
handleSingleStroke
in interface StrokeListener
edu.berkeley.guir.lib.satin.event.StrokeListener
StrokeListener.handleNewStroke(NewStrokeEvent).
public boolean isConsumedAccepted()
SatinEventFilter
isConsumedAccepted
in interface SatinEventFilter
public boolean isLeftButtonAccepted()
StrokeEventFilter
isLeftButtonAccepted
in interface StrokeEventFilter
public boolean isMiddleButtonAccepted()
StrokeEventFilter
isMiddleButtonAccepted
in interface StrokeEventFilter
public boolean isRightButtonAccepted()
StrokeEventFilter
isRightButtonAccepted
in interface StrokeEventFilter
public void setAcceptConsumed(boolean flag)
SatinEventFilter
setAcceptConsumed
in interface SatinEventFilter
public void setAcceptLeftButton(boolean flag)
StrokeEventFilter
setAcceptLeftButton
in interface StrokeEventFilter
public void setAcceptMiddleButton(boolean flag)
StrokeEventFilter
setAcceptMiddleButton
in interface StrokeEventFilter
public void setAcceptRightButton(boolean flag)
StrokeEventFilter
setAcceptRightButton
in interface StrokeEventFilter
public boolean isEventAccepted(StrokeEvent evt)
public boolean isEventAccepted(EventObject evt)
isEventAccepted
in interface EventFilter
public String toString()
toString
in class Object
public abstract Object clone()
clone
in interface Interpreter
clone
in class Object
protected InterpreterImpl clone(InterpreterImpl intrp)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |