public final class CreateServiceImpl extends java.lang.Object implements ICreateService
Constructor and Description |
---|
CreateServiceImpl() |
Modifier and Type | Method and Description |
---|---|
BoxRelativeAnchor |
createBoxRelativeAnchor(AnchorContainer anchorContainer)
Creates a box relative anchor inside the given anchor container.
|
ChopboxAnchor |
createChopboxAnchor(AnchorContainer anchorContainer)
Creates a chop box anchor inside the given anchor container.
|
CompositeConnection |
createCompositeConnection(Diagram diagram)
Creates a composite connection (a connection that is made of several
other connections) inside the given diagram.
|
ConnectionDecorator |
createConnectionDecorator(Connection connection,
boolean active,
double location,
boolean isRelative)
Creates a connection decorator and adds it to the given connection.
|
ContainerShape |
createContainerShape(ContainerShape parentContainerShape,
boolean active)
Creates a container shape inside the given parent container shape.
|
CurvedConnection |
createCurvedConnection(double[] controllPoints,
Diagram diagram)
Creates a curved connection (Bezier curve) inside the given diagram.
|
MultiText |
createDefaultMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer)
Creates a
MultiText graphics algorithm with the default font
(Arial, size 8). |
MultiText |
createDefaultMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
java.lang.String value)
Creates a
MultiText graphics algorithm with the default font
(Arial, size 8) and the given text. |
Text |
createDefaultText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer)
Creates a
Text graphics algorithm with the default font (Arial,
size 8). |
Text |
createDefaultText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
java.lang.String value)
Creates a
Text graphics algorithm with the default font (Arial,
size 8) and the given text. |
Diagram |
createDiagram(java.lang.String diagramTypeId,
java.lang.String diagramName)
Creates a diagram.
|
Diagram |
createDiagram(java.lang.String diagramTypeId,
java.lang.String diagramName,
boolean snap)
Creates a diagram.
|
Diagram |
createDiagram(java.lang.String diagramTypeId,
java.lang.String diagramName,
int gridUnit,
boolean snap)
Creates a diagram.
|
Diagram |
createDiagram(java.lang.String diagramTypeId,
java.lang.String diagramName,
int horizontalGridUnit,
int verticalGridUint,
boolean snap)
Creates a diagram.
|
Ellipse |
createEllipse(GraphicsAlgorithmContainer gaContainer)
Creates an
Ellipse graphics algorithm. |
FixPointAnchor |
createFixPointAnchor(AnchorContainer anchorContainer)
Creates a fix point anchor inside the given anchor container.
|
FreeFormConnection |
createFreeFormConnection(Diagram diagram)
Creates a free form connection inside the given diagram.
|
Image |
createImage(GraphicsAlgorithmContainer gaContainer,
java.lang.String imageId)
Creates a
Image graphics algorithm with the given image id. |
Rectangle |
createInvisibleRectangle(PictogramElement pe)
Create an invisible
Rectangle . |
ManhattanConnection |
createManhattanConnection(Diagram diagram)
Creates a manhattan connection inside the given diagram.
|
MultiText |
createMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
java.lang.String value,
java.lang.String fontName,
int fontSize)
Creates a
MultiText graphics algorithm with the given text and
font. |
MultiText |
createMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
java.lang.String value,
java.lang.String fontName,
int fontSize,
boolean isFontItalic,
boolean isFontBold)
Creates a
MultiText graphics algorithm with the given text and
font. |
MultiText |
createMultiText(GraphicsAlgorithmContainer gaContainer)
Creates a
MultiText graphics algorithm. |
MultiText |
createMultiText(GraphicsAlgorithmContainer gaContainer,
java.lang.String value)
Creates a
MultiText graphics algorithm with the given text. |
Ellipse |
createPlainEllipse(GraphicsAlgorithmContainer gaContainer)
Creates a plain
Ellipse graphics algorithm. |
Image |
createPlainImage(GraphicsAlgorithmContainer gaContainer,
java.lang.String imageId)
Creates a plain
Image graphics algorithm with the given image id. |
MultiText |
createPlainMultiText(GraphicsAlgorithmContainer gaContainer)
Creates a plain
MultiText graphics algorithm. |
MultiText |
createPlainMultiText(GraphicsAlgorithmContainer gaContainer,
java.lang.String value)
Creates a plain
MultiText graphics algorithm with the given text. |
PlatformGraphicsAlgorithm |
createPlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer,
java.lang.String id)
Creates the plain
PlatformGraphicsAlgorithm . |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer)
Creates a plain
Polygon graphics algorithm. |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer,
java.util.Collection<Point> points)
Creates a plain
Polygon graphics algorithm with the given points. |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a plain
Polygon graphics algorithm with the given points. |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a plain
Polygon graphics algorithm with the given points. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer)
Creates a plain
Polyline graphics algorithm. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer,
java.util.Collection<Point> points)
Creates a plain
Polyline graphics algorithm with the given
points. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a plain polyline graphics algorithm with the given points.
|
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a plain
Polyline graphics algorithm with the given
points. |
Rectangle |
createPlainRectangle(GraphicsAlgorithmContainer gaContainer)
Creates a plain
Rectangle graphics algorithm. |
RoundedRectangle |
createPlainRoundedRectangle(GraphicsAlgorithmContainer gaContainer,
int cornerWidth,
int cornerHeight)
Creates a plain
RoundedRectangle graphics algorithm with the
given corner dimensions. |
Style |
createPlainStyle(StyleContainer styleContainer,
java.lang.String id)
Creates a
Style with the given id. |
Text |
createPlainText(GraphicsAlgorithmContainer gaContainer)
Creates a plain
Text graphics algorithm with empty text. |
Text |
createPlainText(GraphicsAlgorithmContainer gaContainer,
java.lang.String value)
Creates a plain
Text graphics algorithm with the given text. |
PlatformGraphicsAlgorithm |
createPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer,
java.lang.String id)
Creates the
PlatformGraphicsAlgorithm . |
Point |
createPoint(int x,
int y)
Creates a
Point datatype for the given x/y coordinates. |
Point |
createPoint(int x,
int y,
int before,
int after)
Creates a
Point datatype for the given x/y coordinates. |
java.util.List<Point> |
createPointList(int[] xy)
Creates a list of
Point datatypes for the given x/y coordinates. |
java.util.List<Point> |
createPointList(int[] xy,
int[] beforeAfter)
Creates a list of
Point datatypes for the given x/y coordinates. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer)
Creates a
Polygon graphics algorithm. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer,
java.util.Collection<Point> points)
Creates a
Polygon graphics algorithm with the given points. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a
Polygon graphics algorithm with the given points. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a
Polygon graphics algorithm with the given points. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer)
Creates a
Polyline graphics algorithm. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer,
java.util.Collection<Point> points)
Creates a
Polyline graphics algorithm with the given points. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a
Polyline graphics algorithm with the given points. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a
Polyline graphics algorithm with the given points. |
Rectangle |
createRectangle(GraphicsAlgorithmContainer gaContainer)
Creates a
Rectangle graphics algorithm. |
RoundedRectangle |
createRoundedRectangle(GraphicsAlgorithmContainer gaContainer,
int cornerWidth,
int cornerHeight)
Creates a
RoundedRectangle graphics algorithm with the given
corner dimensions. |
Shape |
createShape(ContainerShape parentContainerShape,
boolean active)
Creates a shape inside the given parent container shape.
|
Color |
createShiftedColor(Color color,
int shift,
Diagram diagram)
Shifts the
Color darker or lighter. |
IColorConstant |
createShiftedColor(IColorConstant colorConstant,
int shift)
Shifts the
Color constant darker or lighter. |
Style |
createStyle(StyleContainer styleContainer,
java.lang.String id)
Creates a
Style with the given id. |
Text |
createText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
java.lang.String value,
java.lang.String fontName,
int fontSize)
Creates a
Text graphics algorithm with the given text and font. |
Text |
createText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
java.lang.String value,
java.lang.String fontName,
int fontSize,
boolean isFontItalic,
boolean isFontBold)
Creates a
Text graphics algorithm with the given text and font. |
Text |
createText(GraphicsAlgorithmContainer gaContainer)
Creates a
Text graphics algorithm with empty text. |
Text |
createText(GraphicsAlgorithmContainer gaContainer,
java.lang.String value)
Creates a
Text graphics algorithm with the given text. |
TextStyle |
createTextStyle(TextStyleRegion region)
Creates a
TextStyle . |
TextStyle |
createTextStyle(TextStyleRegion region,
boolean underline,
boolean strikeout,
UnderlineStyle underlineStyle)
Creates a
TextStyle with the given values. |
TextStyleRegion |
createTextStyleRegion(AbstractText abstractText)
Creates a
TextStyleRegion . |
TextStyleRegion |
createTextStyleRegion(AbstractText abstractText,
int start,
int end)
Creates a
TextStyleRegion with the given bounds. |
public MultiText createDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value)
IGaCreateService
MultiText
graphics algorithm with the default font
(Arial, size 8) and the given text. Use this method only if you want to
use the default text, otherwise use
IGaCreateService.createMultiText(GraphicsAlgorithmContainer, String)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: Arial
size: 8
italic: false
bold: false
createDefaultMultiText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmvalue
- initial textpublic MultiText createDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)
IGaCreateService
MultiText
graphics algorithm with the default font
(Arial, size 8). Use this method only if you want to use the default
text, otherwise use IGaCreateService.createMultiText(GraphicsAlgorithmContainer)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value:""
name: Arial
size: 8
italic: false
bold: false
createDefaultMultiText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmpublic Text createDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value)
IGaCreateService
Text
graphics algorithm with the default font (Arial,
size 8) and the given text. Use this method only if you want to use the
default text, otherwise use
IGaCreateService.createText(GraphicsAlgorithmContainer, String)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: Arial
size: 8
italic: false
bold: false
createDefaultText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmvalue
- initial textpublic Text createDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Text
graphics algorithm with the default font (Arial,
size 8). Use this method only if you want to use the default text,
otherwise use IGaCreateService.createText(GraphicsAlgorithmContainer)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value:""
name: Arial
size: 8
italic: false
bold: false
createDefaultText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmpublic Ellipse createEllipse(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Ellipse
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createEllipse
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpublic Ellipse createPlainEllipse(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Ellipse
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.createPlainEllipse
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Image createImage(GraphicsAlgorithmContainer gaContainer, java.lang.String imageId)
IGaCreateService
Image
graphics algorithm with the given image id.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
id: TEST
stretchH: false
stretchV: false
proportional: false
createImage
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmimageId
- the image idpublic Image createPlainImage(GraphicsAlgorithmContainer gaContainer, java.lang.String imageId)
IGaCreateService
Image
graphics algorithm with the given image id.
Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainImage
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmimageId
- the image idStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Rectangle createInvisibleRectangle(PictogramElement pe)
IGaCreateService
Rectangle
.
The following values are set by default when it is shown:
lineWidth: 1
lineStyle: SOLID
filled: false
lineVisible: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createInvisibleRectangle
in interface IGaCreateService
pe
- the pictogram element to create the rectanglepublic MultiText createMultiText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
IGaCreateService
MultiText
graphics algorithm with the given text.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
createMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial textpublic MultiText createPlainMultiText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
IGaCreateService
MultiText
graphics algorithm with the given text.
Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial textStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public MultiText createMultiText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
MultiText
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: ""
createMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpublic MultiText createPlainMultiText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
MultiText
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.createPlainMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize)
IGaCreateService
MultiText
graphics algorithm with the given text and
font. The font will be displayed in straight (no italics or bold) and
will be managed within the given diagram; in case the font already exists
it will be reused, otherwise the corresponding font instance will be
created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: false
bold: false
createMultiText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text fieldpublic MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)
IGaCreateService
MultiText
graphics algorithm with the given text and
font. The font will be managed within the given diagram; in case the font
already exists it will be reused, otherwise the corresponding font
instance will be created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: isFontItalic
bold: isFontBold
createMultiText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text fieldisFontItalic
- flag if the font to use for the new text field should be
italic or notisFontBold
- flag if the font to use for the new text field should be bold
or notpublic PlatformGraphicsAlgorithm createPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, java.lang.String id)
IGaCreateService
PlatformGraphicsAlgorithm
.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
id: id
createPlatformGraphicsAlgorithm
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmid
- the idpublic PlatformGraphicsAlgorithm createPlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, java.lang.String id)
IGaCreateService
PlatformGraphicsAlgorithm
. Default values have
been reset, so you can use your styles, see AbstractStyle
.createPlainPlatformGraphicsAlgorithm
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmid
- the idStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Point createPoint(int x, int y, int before, int after)
IGaCreateService
Point
datatype for the given x/y coordinates. The
additional before/after parameters defined at which distance before/after
the point a rounded curve will start/end.
Note, that before/after parameters have only an effect, if the graphics
algorithm support them, e.g. polygon and polyline.createPoint
in interface IGaCreateService
x
- the x coordinatey
- the y coordinatebefore
- the distance before, if supportedafter
- the distance after, if supportedpublic Point createPoint(int x, int y)
IGaCreateService
Point
datatype for the given x/y coordinates.createPoint
in interface IGaCreateService
x
- the x coordinatey
- the y coordinatepublic java.util.List<Point> createPointList(int[] xy, int[] beforeAfter)
IGaCreateService
Point
datatypes for the given x/y coordinates.
Note, that before/after parameters have only an effect, if the graphics
algorithm support them, e.g. polygon and polyline.createPointList
in interface IGaCreateService
xy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]public java.util.List<Point> createPointList(int[] xy)
IGaCreateService
Point
datatypes for the given x/y coordinates.createPointList
in interface IGaCreateService
xy
- The x/y coordinates: [x0, y0, ...,xN, yN]public Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
IGaCreateService
Polygon
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of pointpublic Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
IGaCreateService
Polygon
graphics algorithm with the given points.
Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of pointStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polygon
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]public Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polygon
graphics algorithm with the given points.
Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]Style
,
IGaCreateService.createStyle(StyleContainer, String)
public Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
Polygon
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]public Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
Polygon
graphics algorithm with the given points.
Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]Style
,
IGaCreateService.createStyle(StyleContainer, String)
public Polygon createPolygon(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polygon
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpublic Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polygon
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
IGaCreateService
Polyline
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of pointpublic Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
IGaCreateService
Polyline
graphics algorithm with the given
points. Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of pointStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polyline
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]public Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polyline
graphics algorithm with the given
points. Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]Style
,
IGaCreateService.createStyle(StyleContainer, String)
public Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
Polyline
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]public Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
AbstractStyle
.createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]Style
,
IGaCreateService.createStyle(StyleContainer, String)
public Polyline createPolyline(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polyline
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpublic Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polyline
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Rectangle createRectangle(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Rectangle
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpublic Rectangle createPlainRectangle(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Rectangle
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.createPlainRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public RoundedRectangle createRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)
IGaCreateService
RoundedRectangle
graphics algorithm with the given
corner dimensions.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
cornerHeight: cornerHeight
cornerWidth: cornerWidth
createRoundedRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmcornerWidth
- the corner widthcornerHeight
- the corner heightpublic RoundedRectangle createPlainRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)
IGaCreateService
RoundedRectangle
graphics algorithm with the
given corner dimensions. Default values have been reset, so you can use
your styles, see AbstractStyle
.createPlainRoundedRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmcornerWidth
- the corner widthcornerHeight
- the corner heightStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Color createShiftedColor(Color color, int shift, Diagram diagram)
IGaCreateService
Color
darker or lighter.createShiftedColor
in interface IGaCreateService
color
- the color to be changedshift
- negative shifts means darken the colordiagram
- the diagrampublic IColorConstant createShiftedColor(IColorConstant colorConstant, int shift)
IGaCreateService
Color
constant darker or lighter.createShiftedColor
in interface IGaCreateService
colorConstant
- the color constant to be changedshift
- negative shifts means darken the colorpublic Style createStyle(StyleContainer styleContainer, java.lang.String id)
IGaCreateService
Style
with the given id. The style is aggregated under
the given container style.
The following values are set by default:
lineStyle: SOLID
id: id
horizontalAlignment: ALIGNMENT_CENTER
verticalAlignment: ALIGNMENT_CENTER
createStyle
in interface IGaCreateService
styleContainer
- container styleid
- style idpublic Style createPlainStyle(StyleContainer styleContainer, java.lang.String id)
IGaCreateService
Style
with the given id. The style is aggregated under
the given container style. Default values have been reset, so you can use
your styles, see AbstractStyle
.createPlainStyle
in interface IGaCreateService
styleContainer
- container styleid
- style idStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Text createText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
IGaCreateService
Text
graphics algorithm with the given text.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
createText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial textpublic Text createPlainText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
IGaCreateService
Text
graphics algorithm with the given text.
Default values have been reset, so you can use your styles, see
AbstractStyle
.createPlainText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial textStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Text createText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Text
graphics algorithm with empty text.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: ""
createText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpublic Text createPlainText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Text
graphics algorithm with empty text. Default
values have been reset, so you can use your styles, see
AbstractStyle
.createPlainText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize)
IGaCreateService
Text
graphics algorithm with the given text and font.
The font will be displayed in straight (no italics or bold) and will be
managed within the given diagram; in case the font already exists it will
be reused, otherwise the corresponding font instance will be created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: false
bold: false
createText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text fieldpublic Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)
IGaCreateService
Text
graphics algorithm with the given text and font.
The font will be managed within the given diagram; in case the font
already exists it will be reused, otherwise the corresponding font
instance will be created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: isFontItalic
bold: isFontBold
createText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text fieldisFontItalic
- flag if the font to use for the new text field should be
italic or notisFontBold
- flag if the font to use for the new text field should be bold
or notpublic BoxRelativeAnchor createBoxRelativeAnchor(AnchorContainer anchorContainer)
IPeCreateService
createBoxRelativeAnchor
in interface IPeCreateService
anchorContainer
- the anchors parentpublic ChopboxAnchor createChopboxAnchor(AnchorContainer anchorContainer)
IPeCreateService
createChopboxAnchor
in interface IPeCreateService
anchorContainer
- the anchors parentpublic ConnectionDecorator createConnectionDecorator(Connection connection, boolean active, double location, boolean isRelative)
IPeCreateService
createConnectionDecorator
in interface IPeCreateService
connection
- the connectionactive
- TRUE, if decorator is active, FALSE otherwiselocation
- location of the decorator (must be between 0 and 1)isRelative
- true if the decorator should be positioned relative to the
connection's midpointpublic ContainerShape createContainerShape(ContainerShape parentContainerShape, boolean active)
IPeCreateService
createContainerShape
in interface IPeCreateService
parentContainerShape
- the parent container shapeactive
- true
, if the created shape should be active,
false
otherwise. An active shape can be selected
in the diagram editor and it is also relevant for layouting:
an active shape opens a coordinate system relative to its next
active parent which can be used for layouting its
PictogramElement
children, while an inactive one uses
the coordinate system of its next direct parent for layouting
its children.
By default all shapes should be active, inactive shapes should be used for grouping purposes or for linking a group of graphical objects to the domain world only.
For those familiar with GEF: only for active shapes a GEF EditPart will be created by the Graphiti framework, not for inactive ones.
public Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName)
IPeCreateService
createDiagram
in interface IPeCreateService
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramIPeCreateService.createDiagram(String diagramTypeId, String diagramName, boolean
snap)
public Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, boolean snap)
IPeCreateService
createDiagram
in interface IPeCreateService
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramsnap
- TRUE enables snap to gridIPeCreateService.createDiagram(String diagramTypeId, String diagramName, int
gridUnit, boolean snap)
public Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int gridUnit, boolean snap)
IPeCreateService
createDiagram
in interface IPeCreateService
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramgridUnit
- grid size (in both directions) in pixel; if 0 then no grid
will be drawnsnap
- TRUE enables snap to gridpublic Diagram createDiagram(java.lang.String diagramTypeId, java.lang.String diagramName, int horizontalGridUnit, int verticalGridUint, boolean snap)
IPeCreateService
createDiagram
in interface IPeCreateService
diagramTypeId
- the type id of the diagramdiagramName
- the name of the diagramhorizontalGridUnit
- horizontal grid size in pixel; if 0 then no grid will be drawnverticalGridUint
- vertical grid size in pixel; if 0 then no grid will be drawnsnap
- TRUE enables snap to gridpublic FixPointAnchor createFixPointAnchor(AnchorContainer anchorContainer)
IPeCreateService
createFixPointAnchor
in interface IPeCreateService
anchorContainer
- the anchors parentpublic FreeFormConnection createFreeFormConnection(Diagram diagram)
IPeCreateService
createFreeFormConnection
in interface IPeCreateService
diagram
- the diagrampublic ManhattanConnection createManhattanConnection(Diagram diagram)
IPeCreateService
createManhattanConnection
in interface IPeCreateService
diagram
- the diagrampublic CurvedConnection createCurvedConnection(double[] controllPoints, Diagram diagram)
IPeCreateService
createCurvedConnection
in interface IPeCreateService
controllPoints
- an array of double value pairs defining the control points
(two values - x and y - define the point) of the Bezier curvediagram
- the diagrampublic CompositeConnection createCompositeConnection(Diagram diagram)
IPeCreateService
CompositeConnection
s
can be used to combine any number of CurvedConnection
s into one
semantical connection using its CompositeConnection.getChildren()
relation. Note that the composite connection itself needs to have an
associated GraphicsAlgorithm
(usually a Polyline
) for its
visualization, although it might be invisible and only the child
connections have a visible polyline as their visualization.createCompositeConnection
in interface IPeCreateService
diagram
- the diagrampublic Shape createShape(ContainerShape parentContainerShape, boolean active)
IPeCreateService
createShape
in interface IPeCreateService
parentContainerShape
- the parent container shapeactive
- true
, if the created shape should be active,
false
otherwise. An active shape can be selected
in the diagram editor and it is also relevant for layouting:
an active shape opens a coordinate system which can be used
for layouting its PictogramElement
children, while an
inactive one does not provide one but uses the coordinate
system of its next active parent for layouting its children.
By default all shapes should be active, inactive shapes should be used for grouping purposes or for linking a group of graphical objects to the domain world only.
For those familiar with GEF: only for active shapes a GEF EditPart will be created by the Graphiti framework, not for inactive ones.
public TextStyleRegion createTextStyleRegion(AbstractText abstractText)
IGaCreateService
TextStyleRegion
. The style is aggregated under the
given abstract text.createTextStyleRegion
in interface IGaCreateService
abstractText
- container textTextStyleRegion
,
IGaCreateService.createTextStyleRegion(AbstractText, int, int)
public TextStyleRegion createTextStyleRegion(AbstractText abstractText, int start, int end)
IGaCreateService
TextStyleRegion
with the given bounds. The style is
aggregated under the given abstract text.createTextStyleRegion
in interface IGaCreateService
abstractText
- container textstart
- region startend
- retion endTextStyleRegion
public TextStyle createTextStyle(TextStyleRegion region)
IGaCreateService
TextStyle
. The style is aggregated under the given text
style region.createTextStyle
in interface IGaCreateService
region
- container regionTextStyle
,
IGaCreateService.createTextStyle(TextStyleRegion, boolean, boolean, UnderlineStyle)
public TextStyle createTextStyle(TextStyleRegion region, boolean underline, boolean strikeout, UnderlineStyle underlineStyle)
IGaCreateService
TextStyle
with the given values. The style is
aggregated under the given text style region.createTextStyle
in interface IGaCreateService
region
- container regionunderline
- the is underlinedstrikeout
- the is stroke outunderlineStyle
- the underline styleTextStyle
,
IGaCreateService.createStyle(StyleContainer, String)