|
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.watch.WatchableImpl | +--edu.berkeley.guir.lib.satin.command.CommandSubsystem
Command central for commands. All necessary values and references to objects should be obtainable through here. Everything in the command package should be able to access everything in this class. This class simply decouples the command package from everything else.
Some of the useful things the CommandSubsystem does include:
The reason this is a Watchable object is that the system needs to know what objects are selected in order to render correctly. If these objects change, the system also needs to know that. Hence, this class is Watchable.
This software is distributed under the Berkeley Software License.
Revisions: - SATIN-v1.0-1.0.0, Apr 03 1999, JH Created class - SATIN-v1.0-1.0.1, Jun 28 2000, JH Added JavaBeans notification messages (PropertyChange). - 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 |
Field Summary | |
static String |
SELECTED_ADDED
Message sent when an item is selected. |
static String |
SELECTED_REMOVED
Message sent when an item is de-selected. |
Constructor Summary | |
CommandSubsystem()
|
Method Summary | |
void |
addPropertyChangeListener(PropertyChangeListener l)
|
void |
addPropertyChangeListener(String strPropertyName,
PropertyChangeListener l)
|
void |
addSelected(GraphicalObject gob)
Add the specified GraphicalObject to the selected list if it is not already (can only be in the list at most once). |
void |
addSelected(Iterator it)
Add the GraphicalObjects in the iterator to the selected list. |
void |
clearSelected()
Clear out the list of selected objects. |
Point |
getAbsoluteLastLocation()
Get the last mouse location clicked. |
Point |
getAbsoluteLastLocation(Point pt)
Get the last mouse location clicked. |
int |
getAbsoluteLastXLocation()
Get the last mouse x-location clicked. |
int |
getAbsoluteLastYLocation()
Get the last mouse y-location clicked. |
GraphicalObject |
getLastGraphicalObject()
Get the last Graphical Object added by InsertCommand . |
Point |
getLocalLastLocation(GraphicalObject gob)
Get the last mouse location clicked, in the specified GraphicalObject's coordinate system. |
Point |
getLocalLastLocation(GraphicalObject gob,
Point pt)
Get the last mouse location clicked, in the specified GraphicalObject's coordinate system. |
int |
getLocalLastXLocation(GraphicalObject gob)
Get the last mouse x-location clicked, in the specified GraphicalObject's coordinate system. |
int |
getLocalLastYLocation(GraphicalObject gob)
Get the last mouse y-location clicked, in the specified GraphicalObject's coordinate system. |
Iterator |
getSelected()
Get a copy of the list of selected Graphical Objects. |
GraphicalObjectCollection |
getSelectedCollection()
Returns a reference to the actual collection of selected objects. |
void |
initializeCommandSubsystem(Sheet newSheet)
|
boolean |
isSelected(GraphicalObject gob)
|
void |
mouseClicked(MouseEvent evt)
Keep track of where the mouse is in the Sheet. |
void |
mouseDragged(MouseEvent evt)
|
void |
mouseEntered(MouseEvent evt)
|
void |
mouseExited(MouseEvent evt)
|
void |
mouseMoved(MouseEvent evt)
|
void |
mousePressed(MouseEvent evt)
Keep track of where the mouse is in the Sheet. |
void |
mouseReleased(MouseEvent evt)
Keep track of where the mouse is in the Sheet. |
void |
postEvent(AWTEvent evt)
Throw an event into the System event queue. |
void |
removePropertyChangeListener(PropertyChangeListener l)
|
void |
removePropertyChangeListener(String strPropertyName,
PropertyChangeListener l)
|
void |
removeSelected(GraphicalObject gob)
Remove the specified Graphical Object from the selected list. |
void |
setLastGraphicalObject(GraphicalObject gob)
Set the last Graphical Object added. |
void |
setSelected(GraphicalObjectCollection g)
Set the list of selected objects. |
String |
toString()
|
Methods inherited from class edu.berkeley.guir.lib.satin.watch.WatchableImpl |
addWatcher, clearWatchers, clone, countWatchers, disableNotify, enableNotify, hasNotifyEnabled, notifyWatchers, notifyWatchers, notifyWatchers, notifyWatchers, notifyWatchersDelete, notifyWatchersDelete, notifyWatchersUpdate, notifyWatchersUpdate, notifyWatchersUpdate, notifyWatchersUpdate, notifyWatchersUpdate, removeWatcher |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final String SELECTED_ADDED
public static final String SELECTED_REMOVED
Constructor Detail |
public CommandSubsystem()
Method Detail |
public void initializeCommandSubsystem(Sheet newSheet)
public void mouseClicked(MouseEvent evt)
mouseClicked
in interface MouseListener
public void mouseEntered(MouseEvent evt)
mouseEntered
in interface MouseListener
public void mouseExited(MouseEvent evt)
mouseExited
in interface MouseListener
public void mouseDragged(MouseEvent evt)
mouseDragged
in interface MouseMotionListener
public void mouseMoved(MouseEvent evt)
mouseMoved
in interface MouseMotionListener
public void mousePressed(MouseEvent evt)
mousePressed
in interface MouseListener
public void mouseReleased(MouseEvent evt)
mouseReleased
in interface MouseListener
public void postEvent(AWTEvent evt)
public boolean isSelected(GraphicalObject gob)
public void setSelected(GraphicalObjectCollection g)
g
- is the collection of Graphical Objects to set to.public void clearSelected()
public void removeSelected(GraphicalObject gob)
gob
- is the Graphical Object to remove from the selected list.public void addSelected(GraphicalObject gob)
gob
- is the Graphical Object to add to the selected list.public void addSelected(Iterator it)
public Iterator getSelected()
public GraphicalObjectCollection getSelectedCollection()
public Point getAbsoluteLastLocation()
public Point getAbsoluteLastLocation(Point pt)
pt
- is the storage space to put the answer in.public int getAbsoluteLastXLocation()
public int getAbsoluteLastYLocation()
public Point getLocalLastLocation(GraphicalObject gob)
gob
- is the GraphicalObject whose coordinate system we will use.public Point getLocalLastLocation(GraphicalObject gob, Point pt)
gob
- is the GraphicalObject whose coordinate system we will use.pt
- is the storage space to put the answer in.public int getLocalLastXLocation(GraphicalObject gob)
gob
- is the GraphicalObject whose coordinate system we will use.public int getLocalLastYLocation(GraphicalObject gob)
gob
- is the GraphicalObject whose coordinate system we will use.public void setLastGraphicalObject(GraphicalObject gob)
InsertCommand
.gob
- is the last Graphical Object added.public GraphicalObject getLastGraphicalObject()
InsertCommand
.public void addPropertyChangeListener(PropertyChangeListener l)
public void addPropertyChangeListener(String strPropertyName, PropertyChangeListener l)
public void removePropertyChangeListener(PropertyChangeListener l)
public void removePropertyChangeListener(String strPropertyName, PropertyChangeListener l)
public String toString()
toString
in class WatchableImpl
|
Copyright Information | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |