|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--uci.gef.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 Form| Field 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(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 |
Rectangle |
getBounds()
The bounding box of the selection is the bbox of the contained Fig. |
Fig |
getContent()
Reply the Fig that was selected |
Rectangle |
getContentBounds()
Reply the bounding box of the selected Figs, does not include space used by handles. |
Point |
getLocation()
Reply the position of the Selection. |
boolean |
getLocked()
|
boolean |
hit(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(Rectangle r,
Handle h)
Find which handle the user clicked on, or return -1 if none. |
void |
keyPressed(KeyEvent ke)
|
void |
keyReleased(KeyEvent ke)
|
void |
keyTyped(KeyEvent ke)
Pass any events along to the selected Fig. |
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)
Abstract method to display the selection handleds. |
void |
print(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 |
startTrans()
Tell the content to start a transaction that causes damage |
void |
stuffBounds(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(Graphics g)
public void paint(Graphics g)
public void startTrans()
public void endTrans()
public Point getLocation()
public void damage()
public final boolean contains(Point pnt)
public boolean contains(int x,
int y)
public boolean hit(Rectangle r)
public abstract void hitHandle(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 Rectangle getBounds()
public void stuffBounds(Rectangle r)
public void delete()
Editor#deselectpublic void dispose()
public abstract void dragHandle(int mx,
int my,
int an_x,
int an_y,
Handle h)
public Rectangle getContentBounds()
public void keyTyped(KeyEvent ke)
public void keyPressed(KeyEvent ke)
public void keyReleased(KeyEvent ke)
public void mouseMoved(MouseEvent me)
public void mouseDragged(MouseEvent me)
public void mousePressed(MouseEvent me)
public void mouseReleased(MouseEvent me)
public void mouseClicked(MouseEvent me)
public void mouseEntered(MouseEvent me)
public void mouseExited(MouseEvent me)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||