|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--DrawObj | +--RectObj
Used to draw a rectangle. The submit string is a XY coordinate . Using this object the user could draw an xor rectangle. When he release the button, the operation is automaticaly commit and the map is notify.
Inner classes inherited from class java.awt.Component |
java.awt.Component.AWTTreeLock |
Field Summary | |
protected boolean |
bInit
Use to know if the rectangle is already initialize. |
protected int |
height
Heigth of the current rectangle |
protected int |
knDeltaInit
This constant is used to know the initial distance before drawing |
(package private) Map |
m_map
Parent object. |
protected java.awt.Point |
pAnchor
Used for initial drawing and resizing |
protected java.awt.Point |
pMoveAnchor
Used for moving |
protected int |
width
Width of the current rectangle |
protected int |
x
X coordinate at the left top rectangle |
protected int |
y
Y coordinate at the left top rectangle |
Fields inherited from class DrawObj |
color,
g |
Fields inherited from class java.awt.Component |
actionListenerK,
adjustmentListenerK,
appContext,
assert,
background,
BOTTOM_ALIGNMENT,
CENTER_ALIGNMENT,
changeSupport,
componentListener,
componentListenerK,
componentOrientation,
componentSerializedDataVersion,
containerListenerK,
cursor,
dropTarget,
enabled,
eventMask,
focusListener,
focusListenerK,
font,
foreground,
hasFocus,
height,
incRate,
inputMethodListener,
inputMethodListenerK,
isInc,
isPacked,
itemListenerK,
keyListener,
keyListenerK,
LEFT_ALIGNMENT,
locale,
LOCK,
minSize,
mouseListener,
mouseListenerK,
mouseMotionListener,
mouseMotionListenerK,
name,
nameExplicitlySet,
newEventsOnly,
ownedWindowK,
parent,
peer,
peerFont,
popups,
prefSize,
RIGHT_ALIGNMENT,
serialVersionUID,
textListenerK,
TOP_ALIGNMENT,
valid,
visible,
width,
windowListenerK,
x,
y |
Constructor Summary | |
RectObj(Map parent)
Constructor. |
Method Summary | |
(package private) void |
computeNewRect(java.awt.Point p)
Compute the new rectangle using the mouse coordinate. |
void |
destroyEvent()
Destroy the mouse listener and the motion listener. |
void |
draw()
Draw the rectangle. |
java.lang.String |
getSubmitValue()
Create a submit string. |
void |
initPaint()
Draw the initial rectangle. |
void |
mouseClicked(java.awt.event.MouseEvent evt)
Do nothing |
void |
mouseDragged(java.awt.event.MouseEvent evt)
Called when the user drag the rectangle. |
void |
mouseEntered(java.awt.event.MouseEvent evt)
Do nothing |
void |
mouseExited(java.awt.event.MouseEvent evt)
Do nothing |
void |
mouseMoved(java.awt.event.MouseEvent evt)
Do nothing |
void |
mousePressed(java.awt.event.MouseEvent evt)
Start the drawing rectangle. |
void |
mouseReleased(java.awt.event.MouseEvent evt)
Destroy the event and notify the map. |
void |
resize(java.awt.Point p)
Resize and redraw the new rectangle. |
void |
setAnchor(java.awt.Point pt)
Set the initial point. |
Methods inherited from class DrawObj |
getColor,
paint,
setColor |
Methods inherited from class java.awt.Component |
|
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
registerNatives,
wait,
wait,
wait |
Field Detail |
protected final int knDeltaInit
protected java.awt.Point pAnchor
protected java.awt.Point pMoveAnchor
protected int x
protected int y
protected int width
protected int height
protected boolean bInit
Map m_map
Constructor Detail |
public RectObj(Map parent)
Method Detail |
public java.lang.String getSubmitValue()
public void setAnchor(java.awt.Point pt)
Point
- in the mouse click.public void draw()
public void resize(java.awt.Point p)
p
- new coordinate.public void initPaint()
void computeNewRect(java.awt.Point p)
Mouse
- location.public void mouseDragged(java.awt.event.MouseEvent evt)
public void destroyEvent()
public void mousePressed(java.awt.event.MouseEvent evt)
public void mouseReleased(java.awt.event.MouseEvent evt)
public void mouseMoved(java.awt.event.MouseEvent evt)
public void mouseEntered(java.awt.event.MouseEvent evt)
public void mouseExited(java.awt.event.MouseEvent evt)
public void mouseClicked(java.awt.event.MouseEvent evt)
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |