|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IShapeFactory
Defines an interface to implement an abstract factory.
This file is part of LaTeXDraw.
Copyright (c) 2005-2012 Arnaud BLOUIN
LaTeXDraw is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
Foundation; either version 2 of the License, or (at your option) any later version.
LaTeXDraw is distributed without any warranty; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
01/04/2011
Method Summary | ||
---|---|---|
IArc |
createArc(boolean isUniqueID)
Creates a circled arc with a 1 radius. |
|
IArc |
createArc(IPoint tl,
IPoint br,
boolean uniqueID)
Creates an arc. |
|
IArrow |
createArrow(IArrow arrow,
IShape owner)
Creates an arrow from an other arrow. |
|
IArrow |
createArrow(IShape owner)
Creates an arrow. |
|
IAxes |
createAxes(boolean isUniqueID,
IPoint pt)
Creates axes with default values. |
|
IBezierCurve |
createBezierCurve(boolean isUniqueID)
Creates a model with no point. |
|
IBezierCurve |
createBezierCurve(IPoint point,
IPoint point2,
boolean uniqueID)
Creates a bezier curve with two points. |
|
ICircle |
createCircle(boolean isUniqueID)
|
|
ICircle |
createCircle(IPoint pt,
double radius,
boolean isUniqueID)
Creates a circle. |
|
ICircleArc |
createCircleArc(boolean isUniqueID)
Creates a circled arc with a 1 radius. |
|
ICircleArc |
createCircleArc(IPoint tl,
IPoint br,
boolean uniqueID)
Creates a circled arc. |
|
IDot |
createDot(IPoint pt,
boolean isUniqueID)
|
|
IDrawing |
createDrawing()
|
|
IEllipse |
createEllipse(boolean isUniqueID)
|
|
IEllipse |
createEllipse(IPoint tl,
IPoint br,
boolean isUniqueID)
Creates an ellipse. |
|
IFreehand |
createFreeHand(IPoint pt,
boolean uniqueID)
Creates and initialises a freehand model. |
|
IGrid |
createGrid(boolean isUniqueID,
IPoint pt)
Creates a grid with a predefined point. |
|
IGroup |
createGroup(boolean uniqueID)
|
|
ILine |
createLine(double x1,
double y1,
double x2,
double y2)
Constructs a line from the specified coordinates. |
|
ILine |
createLine(double b,
IPoint p1)
Creates a line by creating a second point with: |
|
ILine |
createLine(IPoint p1,
IPoint p2)
Constructs a line from the specified Point2D objects. |
|
IPicture |
createPicture(boolean isUniqueID,
IPoint pt)
Creates a picture and the corresponding EPS picture. |
|
IPoint |
createPoint()
|
|
IPoint |
createPoint(double x,
double y)
Creates a Point2D with the specified coordinates. |
|
IPoint |
createPoint(IPoint pt)
Creates a Point2D with the specified coordinates. |
|
IPoint |
createPoint(java.awt.Point pt)
Creates a point from the java Point. |
|
IPolygon |
createPolygon(boolean uniqueID)
|
|
IPolygon |
createPolygon(IPoint point,
IPoint point2,
boolean uniqueID)
Creates a polygon with two points. |
|
IPolyline |
createPolyline(boolean uniqueID)
|
|
IPolyline |
createPolyline(IPoint point,
IPoint point2,
boolean uniqueID)
Creates a model with two points. |
|
IRectangle |
createRectangle(boolean uniqueID)
|
|
IRectangle |
createRectangle(IPoint pos,
double width,
double height,
boolean uniqueID)
Creates a rectangle. |
|
IRectangle |
createRectangle(IPoint tl,
IPoint br,
boolean uniqueID)
Creates a rectangle. |
|
IRhombus |
createRhombus(boolean isUniqueID)
|
|
IRhombus |
createRhombus(IPoint centre,
double width,
double height,
boolean uniqueID)
Creates a rhombus. |
|
ISquare |
createSquare(boolean uniqueID)
Creates a square at position (0,0) which width equals 10. |
|
ISquare |
createSquare(IPoint pos,
double width,
boolean uniqueID)
Creates a square. |
|
IText |
createText(boolean uniqueID)
Create a text at position (0,0) which text is "text". |
|
IText |
createText(boolean isUniqueID,
IPoint pt,
java.lang.String text)
Creates a text. |
|
ITriangle |
createTriangle(boolean isUniqueID)
|
|
ITriangle |
createTriangle(IPoint pos,
double width,
double height,
boolean uniqueID)
Creates a triangle. |
|
IShape |
duplicate(IShape shape)
Duplicates the given shape. |
|
|
newShape(java.lang.Class<T> shapeClass)
|
Method Detail |
---|
<T extends IShape> T newShape(java.lang.Class<T> shapeClass)
shapeClass
- The class of the shape to instantiated.
IDrawing createDrawing()
IArrow createArrow(IArrow arrow, IShape owner)
arrow
- The arrow to copy.owner
- The shape that contains the arrow.
java.lang.IllegalArgumentException
- If the given arrow is null.IArrow createArrow(IShape owner)
owner
- The shape that contains the arrow.
IAxes createAxes(boolean isUniqueID, IPoint pt)
pt
- The bottom left position of the axes.isUniqueID
- True: the model will have a unique ID.
IDot createDot(IPoint pt, boolean isUniqueID)
isUniqueID
- True: the shape will have a unique ID.pt
- The centre of the dot.
IBezierCurve createBezierCurve(boolean isUniqueID)
isUniqueID
- True: the model will have a unique ID.
IBezierCurve createBezierCurve(IPoint point, IPoint point2, boolean uniqueID)
point
- The first point of the curve.point2
- The second point of the curve.uniqueID
- uniqueID True: the model will have a unique ID.
IEllipse createEllipse(IPoint tl, IPoint br, boolean isUniqueID)
tl
- The top-left point of the ellipse.br
- The bottom-right point of the ellipse.isUniqueID
- True: the ellipse will have a unique ID.
java.lang.IllegalArgumentException
- If a or b is not valid.IEllipse createEllipse(boolean isUniqueID)
isUniqueID
- True: the ellipse will have a unique ID.
ITriangle createTriangle(IPoint pos, double width, double height, boolean uniqueID)
pos
- The north-west point of the triangle.width
- The width of the triangle.height
- The height of the triangle.uniqueID
- True: the triangle will have a unique ID.
java.lang.IllegalArgumentException
- If the width or the height is not valid.ITriangle createTriangle(boolean isUniqueID)
isUniqueID
- True: the shape will have a unique ID.
IRhombus createRhombus(IPoint centre, double width, double height, boolean uniqueID)
centre
- The centre of the rhombus.width
- The width of the rhombus.height
- The height of the rhombus.uniqueID
- True: the rhombus will have a unique ID.
java.lang.IllegalArgumentException
- If the width, the height or the centre is not valid.IRhombus createRhombus(boolean isUniqueID)
isUniqueID
- True: the shape will have a unique ID.
IPicture createPicture(boolean isUniqueID, IPoint pt)
isUniqueID
- True: the shape will have a unique ID.pt
- The position of the top-left point of the picture.
java.lang.IllegalArgumentException
- If the given picture path is not valid.IGrid createGrid(boolean isUniqueID, IPoint pt)
isUniqueID
- True: the shape will have a unique ID.pt
- The position.
IFreehand createFreeHand(IPoint pt, boolean uniqueID)
pt
- The first point.uniqueID
- True: the model will have a unique ID.
java.lang.IllegalArgumentException
- If the given point is not valid.ICircle createCircle(IPoint pt, double radius, boolean isUniqueID)
pt
- The centre of the circle.radius
- The radius.isUniqueID
- True: the model will have a unique ID.
java.lang.IllegalArgumentException
- If the radius is not valid.ICircle createCircle(boolean isUniqueID)
isUniqueID
- True: the circle will have a unique ID.
IGroup createGroup(boolean uniqueID)
uniqueID
- True: the model will have a unique ID.
ILine createLine(double x1, double y1, double x2, double y2)
x1
- the X coordinate of the start point.y1
- the Y coordinate of the start point.x2
- the X coordinate of the end point.y2
- the Y coordinate of the end point.
java.lang.IllegalArgumentException
- If one of the given coordinate is not valid.ILine createLine(double b, IPoint p1)
b
- y = ax+ bp1
- The first point.
java.lang.IllegalArgumentException
- If one of the given parameter is not valid.ILine createLine(IPoint p1, IPoint p2)
Point2D
objects.
p1
- the start Point2D
of this line segment.p2
- the end Point2D
of this line segment.
java.lang.IllegalArgumentException
- If one of the given points is not valid.IPoint createPoint()
IPoint createPoint(double x, double y)
x
- The X-coordinate to set.y
- The Y-coordinate to set.
IPoint createPoint(java.awt.Point pt)
pt
- The java point.
IPoint createPoint(IPoint pt)
pt
- The IPoint, if null the default value (0,0) will be used.
IPolyline createPolyline(boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.
IPolyline createPolyline(IPoint point, IPoint point2, boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.point
- The first point of the shape.point2
- The second point of the shape.
IPolygon createPolygon(boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.
IPolygon createPolygon(IPoint point, IPoint point2, boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.point
- The first point of the shape.point2
- The second point of the shape.
IRectangle createRectangle(boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.
IRectangle createRectangle(IPoint pos, double width, double height, boolean uniqueID)
pos
- The north-west point of the rectangle.width
- The width of the rectangle.height
- The height of the rectangle.uniqueID
- True: the rectangle will have a unique ID.
java.lang.IllegalArgumentException
- If the width or the height is not valid.IRectangle createRectangle(IPoint tl, IPoint br, boolean uniqueID)
tl
- The top left point of the rectangle.br
- The bottom right point of the rectangle.uniqueID
- True: the rectangle will have a unique ID.
IText createText(boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.
IText createText(boolean isUniqueID, IPoint pt, java.lang.String text)
isUniqueID
- True: the model will have a unique ID.pt
- The position of the text.text
- The text.
java.lang.IllegalArgumentException
- If pt is not valid.ISquare createSquare(boolean uniqueID)
uniqueID
- True: the shape will have a unique ID.
ISquare createSquare(IPoint pos, double width, boolean uniqueID)
pos
- The north-west point of the square.width
- The width of the square.uniqueID
- True: the shape will have a unique ID.
java.lang.IllegalArgumentException
- If the width or the height is not valid.ICircleArc createCircleArc(IPoint tl, IPoint br, boolean uniqueID)
tl
- The top left point of the circled arc.br
- The bottom right point of the circled arc.uniqueID
- True: the circled arc will have a unique ID.
ICircleArc createCircleArc(boolean isUniqueID)
isUniqueID
- True: the model will have a unique ID.
IArc createArc(IPoint tl, IPoint br, boolean uniqueID)
tl
- The top left point of the arc.br
- The bottom right point of the arc.uniqueID
- True: the arc will have a unique ID.
IArc createArc(boolean isUniqueID)
isUniqueID
- True: the model will have a unique ID.
IShape duplicate(IShape shape)
shape
- The shape to duplicate
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |