public class DrawFigureFactory extends Object
Draw
for use with a
DrawActions
instance.Modifier and Type | Field and Description |
---|---|
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 |
Modifier and Type | Method and Description |
---|---|
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.
|
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
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 propertiespublic DrawFigure createLine(double x1, double y1, double x2, double y2, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createLine(double x1, double y1, double x2, double y2)
DrawFigure
using the given parameterspublic DrawFigure createRectangle(FigureProps props)
DrawFigure
using the given propertiespublic DrawFigure createRectangle(double x, double y, double width, double height, Paint outline, Paint fill, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createEllipse(FigureProps props)
DrawFigure
using the given propertiespublic DrawFigure createEllipse(double x, double y, double width, double height, Paint outline, Paint fill, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createPolyline(FigureProps props)
DrawFigure
using the given propertiespublic DrawFigure createPolyline(double x, double y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createPolyline(double[] x, double[] y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createPolygon(FigureProps props)
DrawFigure
using the given propertiespublic DrawFigure createPolygon(double x, double y, Paint fill, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createPolygon(double[] x, double[] y, Paint fill, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createFreehand(FigureProps props)
DrawFigure
using the given propertiespublic DrawFigure createFreehand(double x, double y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createFreehand(double[] x, double[] y, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createText(FigureProps props)
DrawFigure
using the given propertiespublic 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 propertiespublic DrawFigure createCurve(double x1, double y1, Interpolator interpolator, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic DrawFigure createXRange(FigureProps props)
DrawFigure
using the given propertiespublic DrawFigure createXRange(double x, double y, double width, double height, Paint fill, Paint outline, double thickness, AlphaComposite composite)
DrawFigure
using the given parameterspublic FigureProps getFigureProps(DrawFigure figure)
FigureProps
instance that describes the given
DrawFigure
.Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.