|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.geom.RectangularShape
java.awt.geom.Rectangle2D
java.awt.Rectangle
dods.clients.importwizard.TMAP.map.ToolHandle
public class ToolHandle
A rectangular tool handle to be used by a MapTool and defined by
NW, N, NE, W, C, C, SW, S, E
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.awt.geom.Rectangle2D |
---|
Rectangle2D.Double, Rectangle2D.Float |
Field Summary |
---|
Fields inherited from class java.awt.Rectangle |
---|
height, width, x, y |
Fields inherited from class java.awt.geom.Rectangle2D |
---|
OUT_BOTTOM, OUT_LEFT, OUT_RIGHT, OUT_TOP |
Constructor Summary | |
---|---|
ToolHandle()
Constructs a new ToolHandle. |
|
ToolHandle(Dimension d,
Color color,
int type)
Constructs a ToolHandle and initializes it to the specified parameters. |
|
ToolHandle(int width,
int height,
Color color,
int type)
Constructs a ToolHandle and initializes it with the specified parameters. |
|
ToolHandle(int x,
int y,
int width,
int height,
Color color,
int type)
Constructs and initializes a ToolHandle with the specified parameters. |
|
ToolHandle(Point p,
Color color,
int type)
Constructs a ToolHandle and initializes it to the specified parameters. |
|
ToolHandle(Point p,
Dimension d,
Color color,
int type)
Constructs a ToolHandle and initializes it to a specified parameters. |
Method Summary | |
---|---|
boolean |
contains(int x,
int y)
Overrides the Rectangle.contains() method to allow for definition of a target area larger than the size of the handle. |
void |
draw(Graphics g)
Draws a ToolHandle. |
int |
get_type()
Returns the ToolHandle type. |
int |
get_x_target()
Returns the x_target of the ToolHandle. |
int |
get_y_target()
Returns the y_target of the ToolHandle. |
Color |
getColor()
Returns the ToolHandle color. |
void |
set_type(int type)
Sets the ToolHandle type. |
void |
set_x_target(int x_target)
Sets the x_target of the ToolHandle. |
void |
set_y_target(int y_target)
Sets the y_target of the ToolHandle. |
void |
setColor(Color color)
Sets the ToolHandle color. |
Methods inherited from class java.awt.Rectangle |
---|
add, add, add, contains, contains, contains, createIntersection, createUnion, equals, getBounds, getBounds2D, getHeight, getLocation, getSize, getWidth, getX, getY, grow, inside, intersection, intersects, isEmpty, move, outcode, reshape, resize, setBounds, setBounds, setLocation, setLocation, setRect, setSize, setSize, toString, translate, union |
Methods inherited from class java.awt.geom.Rectangle2D |
---|
add, add, add, contains, contains, getPathIterator, getPathIterator, hashCode, intersect, intersects, intersectsLine, intersectsLine, outcode, setFrame, setRect, union |
Methods inherited from class java.awt.geom.RectangularShape |
---|
clone, contains, contains, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.awt.Shape |
---|
contains, contains, contains, contains, getPathIterator, getPathIterator, intersects, intersects |
Constructor Detail |
---|
public ToolHandle()
public ToolHandle(int x, int y, int width, int height, Color color, int type)
x
- the x coordinatey
- the y coordinatewidth
- the width of the ToolHandleheight
- the height of the ToolHandlecolor
- the color of the ToolHandletype
- the type of the ToolHandlepublic ToolHandle(int width, int height, Color color, int type)
width
- the width of the ToolHandleheight
- the height of the ToolHandlecolor
- the color of the ToolHandletype
- the type of the ToolHandlepublic ToolHandle(Point p, Dimension d, Color color, int type)
p
- the pointd
- dimensioncolor
- the color of the ToolHandletype
- the type of the ToolHandlepublic ToolHandle(Point p, Color color, int type)
p
- the value of the x and y coordinatecolor
- the color of the ToolHandletype
- the type of the ToolHandlepublic ToolHandle(Dimension d, Color color, int type)
d
- the value of the width and heightcolor
- the color of the ToolHandletype
- the type of the ToolHandleMethod Detail |
---|
public boolean contains(int x, int y)
contains
in class Rectangle
x
- current mouse Xy
- current mouse Ypublic void setColor(Color color)
color
- the Color used to draw the ToolHandle.public Color getColor()
public void set_type(int type)
type
- the [ NW, N, NE, W, C ... ]
type of the ToolHandle.public int get_type()
[ NW, N, NE, W, C ... ]
type of the ToolHandle.public void set_x_target(int x_target)
x_target
- the number of pixels added to each side of the ToolHandle to get a useful target area.public int get_x_target()
public void set_y_target(int y_target)
y_target
- the number of pixels added to the top and bottom of the ToolHandle to get a useful target area.public int get_y_target()
public void draw(Graphics g)
g
- the graphics context for the drawing operation.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |