protected static enum DragRect.Side extends java.lang.Enum<DragRect.Side>
Modifier and Type | Method and Description |
---|---|
protected void |
draw(java.awt.Graphics2D g2,
java.awt.Rectangle r,
java.awt.Color col,
int j)
Draw The edge for the j'th ring around the rectangle.
|
protected int |
hit(java.awt.Point p,
java.awt.Rectangle r)
check for a mouse hit within a rectangle.
|
static DragRect.Side |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static DragRect.Side[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final DragRect.Side LEFT
public static final DragRect.Side TOP
public static final DragRect.Side RIGHT
public static final DragRect.Side BOTTOM
public static DragRect.Side[] values()
for (DragRect.Side c : DragRect.Side.values()) System.out.println(c);
public static DragRect.Side valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant with the specified namejava.lang.NullPointerException
- if the argument is nullprotected void draw(java.awt.Graphics2D g2, java.awt.Rectangle r, java.awt.Color col, int j)
g2
- Graphic for drawingr
- The rectangle to drawcol
- Color to draw it inj
- Index of rings round the actual edge:
-1 (outside), 0 (the rectangle itself),
1 (first inner ring), or 2 (2nd inner ring)protected int hit(java.awt.Point p, java.awt.Rectangle r)
p
- a Point in mousable spacer
- a Rectangle in the same space