|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.tigris.gef.base.Selection
public abstract class Selection
This class represents the "selection" object that is used when you select one or more Figs in the drawing window. Selections handle the display of handles or whatever graphics indicate that something is selected, and they process events to manipulate the selected Fig.
Fig
,
Serialized FormField Summary | |
---|---|
protected Fig |
_content
_content refers to the Fig that is selected. |
static int |
BORDER_WIDTH
The margin between the contents bbox and the frame |
static int |
HAND_SIZE
The size of the little handle boxes. |
Constructor Summary | |
---|---|
Selection(Fig f)
Construct a new selection. |
Method Summary | |
---|---|
boolean |
contains(Fig f)
Reply true if this selection contains the given Fig |
boolean |
contains(int x,
int y)
|
boolean |
contains(java.awt.Point pnt)
Reply true if the given point is inside this selection |
void |
damage()
This selection object needs to be redrawn, register its damaged area within the given Editor |
void |
delete()
If the selection is being deleted, the selected object must be deleted also. |
void |
dispose()
|
abstract void |
dragHandle(int mx,
int my,
int an_x,
int an_y,
Handle h)
Move one of the handles of a selected Fig. |
void |
endTrans()
Tell the content to end a transaction that causes damage |
java.awt.Rectangle |
getBounds()
The bounding box of the selection is the bbox of the contained Fig. |
Fig |
getContent()
Reply the Fig that was selected |
java.awt.Rectangle |
getContentBounds()
Reply the bounding box of the selected Figs, does not include space used by handles. |
java.awt.Point |
getLocation()
Reply the position of the Selection. |
boolean |
getLocked()
|
boolean |
hit(java.awt.Rectangle r)
Reply true if the given Rectangle is inside or overlapps me |
void |
hitHandle(int x,
int y,
int w,
int h,
Handle hdl)
|
abstract void |
hitHandle(java.awt.Rectangle r,
Handle h)
Find which handle the user clicked on, or return -1 if none. |
void |
keyPressed(java.awt.event.KeyEvent ke)
|
void |
keyReleased(java.awt.event.KeyEvent ke)
|
void |
keyTyped(java.awt.event.KeyEvent ke)
Pass any events along to the selected Fig. |
void |
mouseClicked(java.awt.event.MouseEvent me)
|
void |
mouseDragged(java.awt.event.MouseEvent me)
|
void |
mouseEntered(java.awt.event.MouseEvent me)
|
void |
mouseExited(java.awt.event.MouseEvent me)
|
void |
mouseMoved(java.awt.event.MouseEvent me)
|
void |
mousePressed(java.awt.event.MouseEvent me)
|
void |
mouseReleased(java.awt.event.MouseEvent me)
|
void |
paint(java.awt.Graphics g)
Abstract method to display the selection handleds. |
void |
print(java.awt.Graphics g)
Do nothing. |
void |
reorder(int func,
Layer lay)
Tell the selected Fig to move to front or back, etc. |
void |
setcontent(Fig f)
|
void |
stuffBounds(java.awt.Rectangle r)
Returns my bounding box in the given Rectangle. |
void |
translate(int dx,
int dy)
When the selection is told to move, move the selected Fig |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HAND_SIZE
public static final int BORDER_WIDTH
protected Fig _content
Constructor Detail |
---|
public Selection(Fig f)
Method Detail |
---|
public Fig getContent()
public void setcontent(Fig f)
public boolean getLocked()
public boolean contains(Fig f)
public void print(java.awt.Graphics g)
public void paint(java.awt.Graphics g)
public void endTrans()
public java.awt.Point getLocation()
public void damage()
public final boolean contains(java.awt.Point pnt)
public boolean contains(int x, int y)
public boolean hit(java.awt.Rectangle r)
public abstract void hitHandle(java.awt.Rectangle r, Handle h)
public final void hitHandle(int x, int y, int w, int h, Handle hdl)
public void reorder(int func, Layer lay)
public void translate(int dx, int dy)
public java.awt.Rectangle getBounds()
public void stuffBounds(java.awt.Rectangle r)
public void delete()
SelectionManager.deselect(org.tigris.gef.presentation.Fig)
public void dispose()
public abstract void dragHandle(int mx, int my, int an_x, int an_y, Handle h)
public java.awt.Rectangle getContentBounds()
public void keyTyped(java.awt.event.KeyEvent ke)
keyTyped
in interface java.awt.event.KeyListener
public void keyPressed(java.awt.event.KeyEvent ke)
keyPressed
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent ke)
keyReleased
in interface java.awt.event.KeyListener
public void mouseMoved(java.awt.event.MouseEvent me)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void mouseDragged(java.awt.event.MouseEvent me)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mousePressed(java.awt.event.MouseEvent me)
mousePressed
in interface java.awt.event.MouseListener
public void mouseReleased(java.awt.event.MouseEvent me)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseClicked(java.awt.event.MouseEvent me)
mouseClicked
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent me)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent me)
mouseExited
in interface java.awt.event.MouseListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |