|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uci.gef.SelectionManager
This class handles Manager selections. It is basically a collection of Selection instances. Most of its operations just dispatch the same operation to each of the Selection instances in turn.
The SelectionManager is also responsible for sending out GraphSelectionEvents to any GraphSelectionListeners that are registered.
Selection, Serialized Form| Field Summary | |
protected Editor |
_editor
|
protected EventListenerList |
_listeners
|
protected Vector |
_selections
The collection of Selection instances |
| Constructor Summary | |
SelectionManager(Editor ed)
|
|
| Method Summary | |
protected void |
addAllFigs(Vector v)
|
protected void |
addEnclosed(Vector affected,
Fig f)
|
protected void |
addFig(Fig f)
|
void |
addGraphSelectionListener(GraphSelectionListener listener)
|
protected void |
addSelection(Selection s)
Add a new selection to the collection of selections |
protected void |
allDamaged()
|
void |
cleanUp()
|
boolean |
contains(int x,
int y)
Reply true iff the given point is inside one of the selected Fig's |
boolean |
contains(Selection s)
Reply true if the given selection instance is part of my collection |
boolean |
containsFig(Fig f)
Reply true if the given Fig is selected by any of my selection objects |
void |
damage()
When the SelectionManager is damaged, that implies that each Selection should be damaged. |
void |
delete()
When a multiple selection are deleted, each selection is deleted |
void |
deselect(Fig f)
Deselect the given Fig |
void |
deselectAll()
|
void |
dispose()
When a multiple selection are deleted, each selection is deleted |
void |
dragHandle(int mx,
int my,
int an_x,
int an_y,
Handle h)
If only one thing is selected, then it is possible to mouse on one of its handles, but if Manager things are selected, users can only drag the objects around |
void |
endTrans()
End a transaction that damages all selected Fig's |
Selection |
findSelectionAt(int x,
int y)
|
Selection |
findSelectionFor(Fig f)
|
protected void |
fireSelectionChanged()
|
Rectangle |
getBounds()
|
Rectangle |
getContentBounds()
|
Vector |
getFigs()
Reply the collection of all selected Fig's |
boolean |
getLocked()
|
boolean |
hit(Rectangle r)
Reply true iff the given point is inside one of the selected Fig's |
void |
hitHandle(Rectangle r,
Handle h)
If only one thing is selected, then it is possible to mouse on one of its handles, but if Manager things are selected, users can only drag the objects around |
void |
keyPressed(KeyEvent ke)
|
void |
keyReleased(KeyEvent ke)
|
void |
keyTyped(KeyEvent ke)
When an event is passed to a multiple selection, try to pass it off to the first selection that will handle it. |
static Selection |
makeSelectionFor(Fig f)
|
void |
mouseClicked(MouseEvent me)
|
void |
mouseDragged(MouseEvent me)
|
void |
mouseEntered(MouseEvent me)
|
void |
mouseExited(MouseEvent me)
|
void |
mouseMoved(MouseEvent me)
|
void |
mousePressed(MouseEvent me)
|
void |
mouseReleased(MouseEvent me)
|
void |
paint(Graphics g)
Paint all selection objects |
protected void |
removeAllElements()
|
protected void |
removeFig(Fig f)
|
void |
removeGraphSelectionListener(GraphSelectionListener listener)
|
protected void |
removeSelection(Selection s)
|
void |
reorder(int func,
Layer lay)
When Manager selections are sent to back, each of them is sent to back. |
void |
select(Fig f)
|
void |
select(Vector items)
|
Vector |
selections()
|
int |
size()
Reply the number of selected Fig's. |
void |
startTrans()
Start a transaction that damages all selected Fig's |
void |
toggle(Fig f)
|
void |
toggle(Vector items)
|
void |
translate(int dx,
int dy)
When Manager selections are moved, each of them is moved |
void |
updatePropertySheet()
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Field Detail |
protected Vector _selections
protected Editor _editor
protected EventListenerList _listeners
| Constructor Detail |
public SelectionManager(Editor ed)
| Method Detail |
protected void addSelection(Selection s)
protected void addFig(Fig f)
protected void addAllFigs(Vector v)
protected void removeAllElements()
protected void removeSelection(Selection s)
protected void removeFig(Fig f)
protected void allDamaged()
public void select(Fig f)
public void deselect(Fig f)
public void toggle(Fig f)
public void deselectAll()
public void select(Vector items)
public void toggle(Vector items)
public Selection findSelectionFor(Fig f)
public Selection findSelectionAt(int x,
int y)
public boolean contains(Selection s)
public boolean containsFig(Fig f)
public boolean getLocked()
public int size()
public Vector selections()
public Vector getFigs()
public void startTrans()
public void endTrans()
public void paint(Graphics g)
public void damage()
public boolean contains(int x,
int y)
public boolean hit(Rectangle r)
public Rectangle getBounds()
public Rectangle getContentBounds()
public void reorder(int func,
Layer lay)
public void translate(int dx,
int dy)
protected void addEnclosed(Vector affected,
Fig f)
public void hitHandle(Rectangle r,
Handle h)
public void dragHandle(int mx,
int my,
int an_x,
int an_y,
Handle h)
public void cleanUp()
public void delete()
public void dispose()
public void keyTyped(KeyEvent ke)
public void keyReleased(KeyEvent ke)
public void keyPressed(KeyEvent ke)
public void mouseMoved(MouseEvent me)
public void mouseDragged(MouseEvent me)
public void mouseClicked(MouseEvent me)
public void mousePressed(MouseEvent me)
public void mouseReleased(MouseEvent me)
public void mouseExited(MouseEvent me)
public void mouseEntered(MouseEvent me)
public void addGraphSelectionListener(GraphSelectionListener listener)
public void removeGraphSelectionListener(GraphSelectionListener listener)
protected void fireSelectionChanged()
public void updatePropertySheet()
public static Selection makeSelectionFor(Fig f)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||