|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdiva.canvas.AbstractFigure
diva.canvas.toolbox.BasicFigure
uk.ac.starlink.diva.DrawBasicFigure
uk.ac.starlink.diva.XRangeFigure
public class XRangeFigure
A figure that displays a optionally fixed height rectangle that can
only be moved side to side, or a plain rectangle. This is meant to
represent a "range" along the X axis of a Draw
instance.
DrawBasicFigure
Field Summary | |
---|---|
protected boolean |
constrain
Whether XRangeFigures are free to transform. |
Fields inherited from class uk.ac.starlink.diva.DrawBasicFigure |
---|
listeners, transformFreely |
Constructor Summary | |
---|---|
XRangeFigure(double x,
double y,
double width,
double height)
Create a new rectangle with the given origin and size, a unit-width continuous stroke and no paint pattern. |
|
XRangeFigure(double x,
double y,
double width,
double height,
float lineWidth)
Create a new rectangle with the given origin, size, and outline width. |
|
XRangeFigure(double x,
double y,
double width,
double height,
Paint fill)
Create a new rectangle with the given origin, size, and fill paint. |
|
XRangeFigure(double x,
double y,
double width,
double height,
Paint fill,
float lineWidth)
Create a new rectangle with the given origin, size, fill, and outline width. |
|
XRangeFigure(double x,
double y,
double width,
double height,
Paint fill,
Paint outline,
float lineWidth,
AlphaComposite composite)
Create a new rectangle with the given origin, size, fill, outline outline width and composite. |
|
XRangeFigure(Rectangle2D rect)
Create a new rectangle with the given rectangle shape, a unit-width continuous stroke and no paint pattern. |
Method Summary | |
---|---|
boolean |
getConstrain()
Find out if the XRangeFigures are contrained. |
void |
setConstrain(boolean constrain)
Whether figures are XRangeFigure with a free or constrained geometry or not. |
void |
transform(AffineTransform at)
Transform the figure. |
void |
translate(double x,
double y)
Translate the rectangle the given distance, but only in X, unless we're unconstrained. |
Methods inherited from class uk.ac.starlink.diva.DrawBasicFigure |
---|
addListener, fireChanged, fireCreated, fireRemoved, isTransformFreely, removeListener, setTransformFreely, setVisible |
Methods inherited from class diva.canvas.toolbox.BasicFigure |
---|
getBounds, getComposite, getDashArray, getFillPaint, getLineWidth, getShape, getStrokePaint, hit, paint, setComposite, setDashArray, setFillPaint, setLineWidth, setShape, setStroke, setStrokePaint |
Methods inherited from class diva.canvas.AbstractFigure |
---|
contains, getInteractor, getLayer, getOrigin, getParent, getToolTipText, getTransformContext, getUserObject, intersects, isVisible, paint, repaint, repaint, setInteractor, setParent, setToolTipText, setUserObject |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface uk.ac.starlink.diva.DrawFigure |
---|
getComposite, getFillPaint, getLineWidth, getStrokePaint, setComposite, setFillPaint, setLineWidth, setShape, setStrokePaint |
Methods inherited from interface diva.canvas.Figure |
---|
contains, getBounds, getInteractor, getLayer, getOrigin, getParent, getShape, getToolTipText, hit, intersects, setInteractor, setParent, setToolTipText |
Methods inherited from interface diva.canvas.VisibleComponent |
---|
isVisible, paint, paint |
Methods inherited from interface diva.canvas.CanvasComponent |
---|
getTransformContext, repaint, repaint |
Methods inherited from interface diva.util.UserObjectContainer |
---|
getUserObject, setUserObject |
Field Detail |
---|
protected boolean constrain
Constructor Detail |
---|
public XRangeFigure(Rectangle2D rect)
public XRangeFigure(double x, double y, double width, double height)
public XRangeFigure(double x, double y, double width, double height, Paint fill)
public XRangeFigure(double x, double y, double width, double height, float lineWidth)
public XRangeFigure(double x, double y, double width, double height, Paint fill, float lineWidth)
public XRangeFigure(double x, double y, double width, double height, Paint fill, Paint outline, float lineWidth, AlphaComposite composite)
Method Detail |
---|
public void setConstrain(boolean constrain)
public boolean getConstrain()
public void translate(double x, double y)
translate
in interface Figure
translate
in class DrawBasicFigure
public void transform(AffineTransform at)
transform
in interface Figure
transform
in class DrawBasicFigure
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |