|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.diva.DrawFigureFactory
public class DrawFigureFactory
This class creates and enumerates the possible instance of Figures
that can be created on an instance of Draw
for use with a
DrawActions
instance.
Field Summary | |
---|---|
static int |
CURVE
|
static int |
ELLIPSE
|
static int |
FREEHAND
|
static int |
LINE
|
static int |
NUM_FIGURES
Number of figure types supported |
static int |
POLYGON
|
static int |
POLYLINE
|
static int |
RECTANGLE
|
static String[] |
SHORTNAMES
Simple names for the various figures |
static int |
TEXT
|
static int |
XRANGE
|
Method Summary | |
---|---|
DrawFigure |
create(FigureProps props)
Create a DrawFigure using the specified properties to
initialise it. |
DrawFigure |
create(int type,
FigureProps props)
Create a Figure of the given type using the specified
properties to initialise it. |
DrawFigure |
createCurve(double x1,
double y1,
Interpolator interpolator,
Paint outline,
double thickness,
AlphaComposite composite)
Create a curve DrawFigure using the given parameters |
DrawFigure |
createCurve(FigureProps props)
Create a curve DrawFigure using the given properties |
DrawFigure |
createEllipse(double x,
double y,
double width,
double height,
Paint outline,
Paint fill,
double thickness,
AlphaComposite composite)
Create an ellipse DrawFigure using the given parameters |
DrawFigure |
createEllipse(FigureProps props)
Create an ellipse DrawFigure using the given properties |
DrawFigure |
createFreehand(double[] x,
double[] y,
Paint outline,
double thickness,
AlphaComposite composite)
Create a freehand DrawFigure using the given parameters |
DrawFigure |
createFreehand(double x,
double y,
Paint outline,
double thickness,
AlphaComposite composite)
Create a freehand DrawFigure using the given parameters |
DrawFigure |
createFreehand(FigureProps props)
Create a freehand DrawFigure using the given properties |
DrawFigure |
createLine(double x1,
double y1,
double x2,
double y2)
Create a line DrawFigure using the given parameters |
DrawFigure |
createLine(double x1,
double y1,
double x2,
double y2,
Paint outline,
double thickness,
AlphaComposite composite)
Create a line DrawFigure using the given parameters |
DrawFigure |
createLine(FigureProps props)
Create a line DrawFigure using the given properties |
DrawFigure |
createPolygon(double[] x,
double[] y,
Paint fill,
Paint outline,
double thickness,
AlphaComposite composite)
Create a polygon DrawFigure using the given parameters |
DrawFigure |
createPolygon(double x,
double y,
Paint fill,
Paint outline,
double thickness,
AlphaComposite composite)
Create a polygon DrawFigure using the given parameters |
DrawFigure |
createPolygon(FigureProps props)
Create a polygon DrawFigure using the given properties |
DrawFigure |
createPolyline(double[] x,
double[] y,
Paint outline,
double thickness,
AlphaComposite composite)
Create a polyline DrawFigure using the given parameters |
DrawFigure |
createPolyline(double x,
double y,
Paint outline,
double thickness,
AlphaComposite composite)
Create a polyline DrawFigure using the given parameters |
DrawFigure |
createPolyline(FigureProps props)
Create a polyline DrawFigure using the given properties |
DrawFigure |
createRectangle(double x,
double y,
double width,
double height,
Paint outline,
Paint fill,
double thickness,
AlphaComposite composite)
Create a line DrawFigure using the given parameters |
DrawFigure |
createRectangle(FigureProps props)
Create a rectangle DrawFigure using the given properties |
DrawFigure |
createText(double x,
double y,
double width,
double height,
String text,
Paint fill,
Font font,
AlphaComposite composite)
Create a text DrawFigure using the given parameters,
width and height indicate that some "size" is required. |
DrawFigure |
createText(FigureProps props)
Create a text DrawFigure using the given properties |
DrawFigure |
createXRange(double x,
double y,
double width,
double height,
Paint fill,
Paint outline,
double thickness,
AlphaComposite composite)
Create an XRangeFigure DrawFigure using the given parameters |
DrawFigure |
createXRange(FigureProps props)
Create an XRangeFigure DrawFigure using the given properties |
FigureProps |
getFigureProps(DrawFigure figure)
Create a FigureProps instance that describes the given
DrawFigure . |
static DrawFigureFactory |
getReference()
Return reference to the only allowed instance of this class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LINE
public static final int RECTANGLE
public static final int ELLIPSE
public static final int POLYLINE
public static final int POLYGON
public static final int FREEHAND
public static final int TEXT
public static final int CURVE
public static final int XRANGE
public static final String[] SHORTNAMES
public static final int NUM_FIGURES
Method Detail |
---|
public static DrawFigureFactory getReference()
public DrawFigure create(int type, FigureProps props)
Figure
of the given type using the specified
properties to initialise it.
public DrawFigure create(FigureProps props)
DrawFigure
using the specified properties to
initialise it.
public DrawFigure createLine(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createLine(double x1, double y1, double x2, double y2, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createLine(double x1, double y1, double x2, double y2)
DrawFigure
using the given parameters
public DrawFigure createRectangle(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createRectangle(double x, double y, double width, double height, Paint outline, Paint fill, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createEllipse(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createEllipse(double x, double y, double width, double height, Paint outline, Paint fill, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createPolyline(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createPolyline(double x, double y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createPolyline(double[] x, double[] y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createPolygon(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createPolygon(double x, double y, Paint fill, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createPolygon(double[] x, double[] y, Paint fill, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createFreehand(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createFreehand(double x, double y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createFreehand(double[] x, double[] y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createText(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createText(double x, double y, double width, double height, String text, Paint fill, Font font, AlphaComposite composite)
DrawFigure
using the given parameters,
width and height indicate that some "size" is required.
public DrawFigure createCurve(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createCurve(double x1, double y1, Interpolator interpolator, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public DrawFigure createXRange(FigureProps props)
DrawFigure
using the given properties
public DrawFigure createXRange(double x, double y, double width, double height, Paint fill, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameters
public FigureProps getFigureProps(DrawFigure figure)
FigureProps
instance that describes the given
DrawFigure
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |