scale.visual
Class SGDRhombus
java.lang.Object
java.awt.geom.RectangularShape
scale.visual.SGDRhombus
- All Implemented Interfaces:
- java.awt.geom.PathIterator, java.awt.Shape, java.lang.Cloneable
- Direct Known Subclasses:
- SGDRhombus.Double, SGDRhombus.Float
public abstract class SGDRhombus
- extends java.awt.geom.RectangularShape
- implements java.awt.geom.PathIterator
This class represents diamond-shaped geometric display element.
$Id: SGDRhombus.java,v 1.3 2007-10-04 19:58:41 burrill Exp $
Copyright 2007 by the
Scale Compiler Group,
Department of Computer Science
University of Massachusetts,
Amherst MA. 01003, USA
All Rights Reserved.
Because this class implements the Shape interface it
can be passed directly to the draw() method of the
Graphicsclass. An instance of this class is its own
path iterator instance.
|
Nested Class Summary |
static class |
SGDRhombus.Double
A rhombus using double precision floating point coordinates. |
static class |
SGDRhombus.Float
A rhombus using single precision floating point coordinates. |
| Fields inherited from interface java.awt.geom.PathIterator |
SEG_CLOSE, SEG_CUBICTO, SEG_LINETO, SEG_MOVETO, SEG_QUADTO, WIND_EVEN_ODD, WIND_NON_ZERO |
|
Method Summary |
boolean |
contains(double x,
double y)
|
boolean |
contains(double x,
double y,
double w,
double h)
|
boolean |
contains(java.awt.geom.Rectangle2D r)
|
int |
currentSegment(double[] coords)
|
int |
currentSegment(float[] coords)
|
java.awt.geom.Rectangle2D |
getBounds2D()
|
abstract double |
getHeight()
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at)
|
java.awt.geom.PathIterator |
getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
|
abstract double |
getWidth()
|
int |
getWindingRule()
|
abstract double |
getX()
|
abstract double |
getY()
|
boolean |
intersects(double x,
double y,
double w,
double h)
|
boolean |
intersects(double x1,
double y1,
double x2,
double y2,
java.awt.geom.Rectangle2D r)
|
boolean |
intersects(java.awt.geom.Rectangle2D r)
|
boolean |
isDone()
|
void |
next()
|
abstract void |
setFrame(double x,
double y,
double w,
double h)
|
| Methods inherited from class java.awt.geom.RectangularShape |
clone, contains, getBounds, getCenterX, getCenterY, getFrame, getMaxX, getMaxY, getMinX, getMinY, isEmpty, setFrame, setFrame, setFrameFromCenter, setFrameFromCenter, setFrameFromDiagonal, setFrameFromDiagonal |
| Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SGDRhombus
public SGDRhombus()
getX
public abstract double getX()
- Specified by:
getX in class java.awt.geom.RectangularShape
getY
public abstract double getY()
- Specified by:
getY in class java.awt.geom.RectangularShape
getWidth
public abstract double getWidth()
- Specified by:
getWidth in class java.awt.geom.RectangularShape
getHeight
public abstract double getHeight()
- Specified by:
getHeight in class java.awt.geom.RectangularShape
setFrame
public abstract void setFrame(double x,
double y,
double w,
double h)
- Specified by:
setFrame in class java.awt.geom.RectangularShape
intersects
public boolean intersects(double x,
double y,
double w,
double h)
- Specified by:
intersects in interface java.awt.Shape
intersects
public boolean intersects(double x1,
double y1,
double x2,
double y2,
java.awt.geom.Rectangle2D r)
intersects
public boolean intersects(java.awt.geom.Rectangle2D r)
- Specified by:
intersects in interface java.awt.Shape- Overrides:
intersects in class java.awt.geom.RectangularShape
contains
public boolean contains(double x,
double y,
double w,
double h)
- Specified by:
contains in interface java.awt.Shape
contains
public boolean contains(java.awt.geom.Rectangle2D r)
- Specified by:
contains in interface java.awt.Shape- Overrides:
contains in class java.awt.geom.RectangularShape
contains
public boolean contains(double x,
double y)
- Specified by:
contains in interface java.awt.Shape
getBounds2D
public java.awt.geom.Rectangle2D getBounds2D()
- Specified by:
getBounds2D in interface java.awt.Shape
getPathIterator
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at)
- Specified by:
getPathIterator in interface java.awt.Shape
getPathIterator
public java.awt.geom.PathIterator getPathIterator(java.awt.geom.AffineTransform at,
double flatness)
- Specified by:
getPathIterator in interface java.awt.Shape- Overrides:
getPathIterator in class java.awt.geom.RectangularShape
next
public void next()
- Specified by:
next in interface java.awt.geom.PathIterator
isDone
public boolean isDone()
- Specified by:
isDone in interface java.awt.geom.PathIterator
getWindingRule
public int getWindingRule()
- Specified by:
getWindingRule in interface java.awt.geom.PathIterator
currentSegment
public int currentSegment(double[] coords)
- Specified by:
currentSegment in interface java.awt.geom.PathIterator
currentSegment
public int currentSegment(float[] coords)
- Specified by:
currentSegment in interface java.awt.geom.PathIterator