|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.geom.RectangularShape
org.openbp.jaspira.gui.interaction.RectangleSegment
public class RectangleSegment
A rectangular shape that corresponds to one of the five main regions of a Rectangle (4 sides and center). Side segments are trapez-shaped, while the center is a rectangle.
| Field Summary | |
|---|---|
static java.lang.String |
CENTER
Constraint: Center segment |
static java.lang.String |
EAST
Constraint: East segment |
static java.lang.String |
NORTH
Constraint: North segment |
static java.lang.String |
SOUTH
Constraint: South segment |
static java.lang.String |
WEST
Constraint: West segment |
| Constructor Summary | |
|---|---|
RectangleSegment(java.awt.Component comp,
int width,
java.lang.String constraint)
Constructor. |
|
RectangleSegment(int x,
int y,
int width,
java.lang.String constraint)
Constructor. |
|
RectangleSegment(java.awt.Point p,
int width,
java.lang.String constraint)
Constructor. |
|
RectangleSegment(java.awt.Rectangle rectangle,
int width,
java.lang.String constraint)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
java.awt.geom.Rectangle2D |
getBounds2D()
|
double |
getHeight()
Gets the height. |
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
|
double |
getWidth()
Gets the width. |
double |
getX()
Gets the left coordinate. |
double |
getY()
Gets the top coordinate. |
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
isEmpty()
|
void |
setFrame(double x,
double y,
double w,
double h)
We ignore the size part of setFrame and move it only to the given position. |
| Methods inherited from class java.awt.geom.RectangularShape |
|---|
clone, contains, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, getPathIterator, intersects, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String CENTER
public static final java.lang.String NORTH
public static final java.lang.String SOUTH
public static final java.lang.String EAST
public static final java.lang.String WEST
| Constructor Detail |
|---|
public RectangleSegment(java.awt.Point p,
int width,
java.lang.String constraint)
p - Creates a rectangle segment of the rectangle between 0,0 and pwidth - Controls the thickness of the border segementsconstraint - Type of the segment (see above)
public RectangleSegment(java.awt.Component comp,
int width,
java.lang.String constraint)
comp - Creates a rectangle segment of the component's bounding boxwidth - Controls the thickness of the border segementsconstraint - Type of the segment (see above)
public RectangleSegment(java.awt.Rectangle rectangle,
int width,
java.lang.String constraint)
rectangle - Creates a rectangle segment of the given rectanglewidth - Controls the thickness of the border segementsconstraint - Type of the segment (see above)
public RectangleSegment(int x,
int y,
int width,
java.lang.String constraint)
x - X coordinatedy - Y coordinatedwidth - Width of the rectangleconstraint - Type of the segment (see above)| Method Detail |
|---|
public double getX()
getX in class java.awt.geom.RectangularShapepublic double getY()
getY in class java.awt.geom.RectangularShapepublic double getWidth()
getWidth in class java.awt.geom.RectangularShapepublic double getHeight()
getHeight in class java.awt.geom.RectangularShapepublic boolean isEmpty()
isEmpty in class java.awt.geom.RectangularShapeRectangularShape.isEmpty()
public void setFrame(double x,
double y,
double w,
double h)
setFrame in class java.awt.geom.RectangularShapeRectangularShape.setFrame(double, double, double, double)public java.awt.geom.Rectangle2D getBounds2D()
Shape.getBounds2D()
public boolean contains(double x,
double y)
Shape.contains(double, double)
public boolean intersects(double x,
double y,
double w,
double h)
Shape.intersects(double, double, double, double)
public boolean contains(double x,
double y,
double w,
double h)
Shape.contains(double, double, double, double)public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
Shape.getPathIterator(AffineTransform)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||