|
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 | +--edu.berkeley.guir.lib.satin.interpreter.DefaultMultiInterpreterImpl
Basically a collection of Interpreters, used for delegation purposes by a GraphicalObject. A listener class for Interpreters that manipulates and handles the management of Interpreters. This is the class that will contain the rules for how multiple Interpreters are handled.
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 | |
DefaultMultiInterpreterImpl()
Does nothing. |
Method Summary | |
Interpreter |
add(Interpreter intrp)
Add a stroke interpreter, setting the GraphicalObject the Interpreter is added to, via Interpreter.setAttachedGraphicalObject(GraphicalObject) . |
void |
clear()
Clear all of the interpreters. |
Object |
clone()
Clones this MultiInterpreter. |
protected DefaultMultiInterpreterImpl |
clone(DefaultMultiInterpreterImpl im)
|
boolean |
contains(Interpreter intrp)
See if we contain the specified interpreter. |
Interpreter |
get(int index)
Get the interpreter at the specified index. |
void |
handleNewStroke(NewStrokeEvent evt)
Called when a stroke is started. |
void |
handleSingleStroke(SingleStrokeEvent evt)
Called when a stroke is finished. |
void |
handleUpdateStroke(UpdateStrokeEvent evt)
Called when a stroke is updated. |
Iterator |
iterator()
Get an iterator over all of the Interpreters. |
Interpreter |
remove(Interpreter intrp)
Remove a stroke Interpreter. |
GraphicalObject |
setAttachedGraphicalObject(GraphicalObject gob)
Attaches the MultiInterpreter and every contained interpreter to the given graphical object. |
int |
size()
Get the number of interpreters contained. |
String |
toString()
Returns a string representation of this MultiInterpreter. |
Methods inherited from class edu.berkeley.guir.lib.satin.interpreter.InterpreterImpl |
clone, getAttachedGraphicalObject, getName, isConsumedAccepted, isEnabled, isEventAccepted, isEventAccepted, isLeftButtonAccepted, isMiddleButtonAccepted, isRightButtonAccepted, setAcceptConsumed, setAcceptLeftButton, setAcceptMiddleButton, setAcceptRightButton, setEnabled, setName |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface edu.berkeley.guir.lib.satin.interpreter.Interpreter |
getAttachedGraphicalObject, getName, isEnabled, setEnabled, setName |
Methods inherited from interface edu.berkeley.guir.lib.satin.event.StrokeEventFilter |
isLeftButtonAccepted, isMiddleButtonAccepted, isRightButtonAccepted, setAcceptLeftButton, setAcceptMiddleButton, setAcceptRightButton |
Methods inherited from interface edu.berkeley.guir.lib.satin.event.SatinEventFilter |
isConsumedAccepted, setAcceptConsumed |
Methods inherited from interface edu.berkeley.guir.lib.satin.event.EventFilter |
isEventAccepted |
Constructor Detail |
public DefaultMultiInterpreterImpl()
Method Detail |
public GraphicalObject setAttachedGraphicalObject(GraphicalObject gob)
setAttachedGraphicalObject
in interface Interpreter
setAttachedGraphicalObject
in class InterpreterImpl
gob
- is the GraphicalObject to attach.public Interpreter add(Interpreter intrp)
MultiInterpreter
Interpreter.setAttachedGraphicalObject(GraphicalObject)
.add
in interface MultiInterpreter
edu.berkeley.guir.lib.satin.interpreter.MultiInterpreter
intrp
- is the StrokeInterpreter to add.public Interpreter remove(Interpreter intrp)
MultiInterpreter
remove
in interface MultiInterpreter
edu.berkeley.guir.lib.satin.interpreter.MultiInterpreter
intrp
- is the StrokeInterpreter to remove.public Iterator iterator()
MultiInterpreter
iterator
in interface MultiInterpreter
edu.berkeley.guir.lib.satin.interpreter.MultiInterpreter
public Interpreter get(int index)
MultiInterpreter
get
in interface MultiInterpreter
edu.berkeley.guir.lib.satin.interpreter.MultiInterpreter
index
- is the index in the list to get.public boolean contains(Interpreter intrp)
MultiInterpreter
contains
in interface MultiInterpreter
edu.berkeley.guir.lib.satin.interpreter.MultiInterpreter
intrp
- is the interpreter to check for containment.public int size()
MultiInterpreter
size
in interface MultiInterpreter
public void clear()
MultiInterpreter
clear
in interface MultiInterpreter
public void handleNewStroke(NewStrokeEvent evt)
handleNewStroke
in interface StrokeListener
handleNewStroke
in class InterpreterImpl
edu.berkeley.guir.lib.satin.event.StrokeListener
evt
- is the event to handle.public void handleUpdateStroke(UpdateStrokeEvent evt)
handleUpdateStroke
in interface StrokeListener
handleUpdateStroke
in class InterpreterImpl
edu.berkeley.guir.lib.satin.event.StrokeListener
StrokeListener.handleNewStroke(NewStrokeEvent).
public void handleSingleStroke(SingleStrokeEvent evt)
handleSingleStroke
in interface StrokeListener
handleSingleStroke
in class InterpreterImpl
edu.berkeley.guir.lib.satin.event.StrokeListener
StrokeListener.handleNewStroke(NewStrokeEvent).
public String toString()
toString
in class InterpreterImpl
public Object clone()
clone
in interface Interpreter
clone
in class InterpreterImpl
protected DefaultMultiInterpreterImpl clone(DefaultMultiInterpreterImpl im)
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |