Class GaServiceImpl
- All Implemented Interfaces:
IGaCreateService
,IGaLayoutService
,IGaService
GraphicsAlgorithm
related services. Usually clients consume this
service via Graphiti.getGaService()
or
Graphiti.getGaCreateService()
and get the default behavior, but
Clients can subclass this to modify the default attributes that will be set
for Text
or MultiText
graphics algorithms like the default
font by overriding
#setDefaultTextAttributes(Diagram, AbstractText, String, boolean)
.
Also default attributes of other graphics algorithms can be influenced by
overriding setDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm)
.
Note that in this case Graphiti does not provide any means to manage the
service class instance and to access it from any place.- Since:
- 0.9
-
Field Summary
Fields inherited from interface org.eclipse.graphiti.services.IGaService
DEFAULT_FONT, DEFAULT_FONT_SIZE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal IDimension
Calculates the size of the given graphics algorithm.final IDimension
calculateSize
(GraphicsAlgorithm ga, boolean considerLineWidth) Calculates the size of the given graphics algorithm.final MultiText
createDefaultMultiText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer) Creates aMultiText
graphics algorithm with the default font (Arial, size 8).final MultiText
createDefaultMultiText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value) Creates aMultiText
graphics algorithm with the default font (Arial, size 8) and the given text.final Text
createDefaultText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer) Creates aText
graphics algorithm with the default font (Arial, size 8).final Text
createDefaultText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value) Creates aText
graphics algorithm with the default font (Arial, size 8) and the given text.final Ellipse
createEllipse
(GraphicsAlgorithmContainer gaContainer) Creates anEllipse
graphics algorithm.final Image
createImage
(GraphicsAlgorithmContainer gaContainer, String imageId) Creates aImage
graphics algorithm with the given image id.final Rectangle
Create an invisibleRectangle
.final MultiText
createMultiText
(GraphicsAlgorithmContainer gaContainer) Creates aMultiText
graphics algorithm.final MultiText
createMultiText
(GraphicsAlgorithmContainer gaContainer, String value) Creates aMultiText
graphics algorithm with the given text.final MultiText
createMultiText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize) Creates aMultiText
graphics algorithm with the given text and font.final MultiText
createMultiText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize, boolean isFontItalic, boolean isFontBold) Creates aMultiText
graphics algorithm with the given text and font.final Ellipse
createPlainEllipse
(GraphicsAlgorithmContainer gaContainer) Creates a plainEllipse
graphics algorithm.final Image
createPlainImage
(GraphicsAlgorithmContainer gaContainer, String imageId) Creates a plainImage
graphics algorithm with the given image id.final MultiText
createPlainMultiText
(GraphicsAlgorithmContainer gaContainer) Creates a plainMultiText
graphics algorithm.final MultiText
createPlainMultiText
(GraphicsAlgorithmContainer gaContainer, String value) Creates a plainMultiText
graphics algorithm with the given text.createPlainPlatformGraphicsAlgorithm
(GraphicsAlgorithmContainer gaContainer, String id) Creates the plainPlatformGraphicsAlgorithm
.final Polygon
createPlainPolygon
(GraphicsAlgorithmContainer gaContainer) Creates a plainPolygon
graphics algorithm.final Polygon
createPlainPolygon
(GraphicsAlgorithmContainer gaContainer, int[] xy) Creates a plainPolygon
graphics algorithm with the given points.final Polygon
createPlainPolygon
(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Creates a plainPolygon
graphics algorithm with the given points.final Polygon
createPlainPolygon
(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Creates a plainPolygon
graphics algorithm with the given points.final Polyline
createPlainPolyline
(GraphicsAlgorithmContainer gaContainer) Creates a plainPolyline
graphics algorithm.final Polyline
createPlainPolyline
(GraphicsAlgorithmContainer gaContainer, int[] xy) Creates a plain polyline graphics algorithm with the given points.final Polyline
createPlainPolyline
(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Creates a plainPolyline
graphics algorithm with the given points.final Polyline
createPlainPolyline
(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Creates a plainPolyline
graphics algorithm with the given points.final Rectangle
createPlainRectangle
(GraphicsAlgorithmContainer gaContainer) Creates a plainRectangle
graphics algorithm.final RoundedRectangle
createPlainRoundedRectangle
(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight) Creates a plainRoundedRectangle
graphics algorithm with the given corner dimensions.final Style
createPlainStyle
(StyleContainer styleContainer, String id) Creates aStyle
with the given id.final Text
createPlainText
(GraphicsAlgorithmContainer gaContainer) Creates a plainText
graphics algorithm with empty text.final Text
createPlainText
(GraphicsAlgorithmContainer gaContainer, String value) Creates a plainText
graphics algorithm with the given text.createPlatformGraphicsAlgorithm
(GraphicsAlgorithmContainer gaContainer, String id) Creates thePlatformGraphicsAlgorithm
.final Point
createPoint
(int x, int y) Creates aPoint
datatype for the given x/y coordinates.final Point
createPoint
(int x, int y, int before, int after) Creates aPoint
datatype for the given x/y coordinates.createPointList
(int[] xy) Creates a list ofPoint
datatypes for the given x/y coordinates.createPointList
(int[] xy, int[] beforeAfter) Creates a list ofPoint
datatypes for the given x/y coordinates.final Polygon
createPolygon
(GraphicsAlgorithmContainer gaContainer) Creates aPolygon
graphics algorithm.final Polygon
createPolygon
(GraphicsAlgorithmContainer gaContainer, int[] xy) Creates aPolygon
graphics algorithm with the given points.final Polygon
createPolygon
(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Creates aPolygon
graphics algorithm with the given points.final Polygon
createPolygon
(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Creates aPolygon
graphics algorithm with the given points.final Polyline
createPolyline
(GraphicsAlgorithmContainer gaContainer) Creates aPolyline
graphics algorithm.final Polyline
createPolyline
(GraphicsAlgorithmContainer gaContainer, int[] xy) Creates aPolyline
graphics algorithm with the given points.final Polyline
createPolyline
(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Creates aPolyline
graphics algorithm with the given points.final Polyline
createPolyline
(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Creates aPolyline
graphics algorithm with the given points.final Rectangle
createRectangle
(GraphicsAlgorithmContainer gaContainer) Creates aRectangle
graphics algorithm.final RoundedRectangle
createRoundedRectangle
(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight) Creates aRoundedRectangle
graphics algorithm with the given corner dimensions.final Color
createShiftedColor
(Color color, int shift, Diagram diagram) Shifts theColor
darker or lighter.final IColorConstant
createShiftedColor
(IColorConstant colorConstant, int shift) Shifts theColor
constant darker or lighter.final Style
createStyle
(StyleContainer styleContainer, String id) Creates aStyle
with the given id.final Text
createText
(GraphicsAlgorithmContainer gaContainer) Creates aText
graphics algorithm with empty text.final Text
createText
(GraphicsAlgorithmContainer gaContainer, String value) Creates aText
graphics algorithm with the given text.final Text
createText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize) Creates aText
graphics algorithm with the given text and font.final Text
createText
(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize, boolean isFontItalic, boolean isFontBold) Creates aText
graphics algorithm with the given text and font.createTextStyle
(TextStyleRegion region) Creates aTextStyle
.createTextStyle
(TextStyleRegion region, boolean underline, boolean strikeout, UnderlineStyle underlineStyle) Creates aTextStyle
with the given values.createTextStyleRegion
(AbstractText abstractText) Creates aTextStyleRegion
.createTextStyleRegion
(AbstractText abstractText, int start, int end) Creates aTextStyleRegion
with the given bounds.final void
deleteColor
(Color color) Deletes the given color.final void
deleteFont
(AbstractText abstractText) final void
deleteFont
(Font font) Deletes the given font.final void
deleteRenderingStyle
(AbstractStyle abstractStyle) Deletes the RenderingStyle from the given AbstractStyle.final Style
findStyle
(StyleContainer styleContainer, String id) Searches for a style with the given id.final Color
getBackgroundColor
(GraphicsAlgorithm ga, boolean checkStyles) Gets the background color.final Font
getFont
(AbstractText at, boolean checkStyles) Gets the font.final Color
getForegroundColor
(GraphicsAlgorithm ga, boolean checkStyles) Gets the foreground color.final Orientation
getHorizontalAlignment
(AbstractText at, boolean checkStyles) Gets the horizontal alignment.final LineStyle
getLineStyle
(GraphicsAlgorithm ga, boolean checkStyles) Gets the line style.final int
getLineWidth
(GraphicsAlgorithm ga, boolean checkStyles) Gets the line width.final RenderingStyle
getRenderingStyle
(GraphicsAlgorithm ga, boolean checkStyles) Gets the rendering style.final double
getRotation
(AbstractText at, boolean checkStyles) Gets the rotation angle.final double
getTransparency
(GraphicsAlgorithm ga, boolean checkStyles) Gets the transparency.final Orientation
getVerticalAlignment
(AbstractText at, boolean checkStyles) Gets the vertical alignment.final boolean
isFilled
(GraphicsAlgorithm ga, boolean checkStyles) Checks if is filled.final boolean
isLineVisible
(GraphicsAlgorithm ga, boolean checkStyles) Checks if line is visible.final boolean
isProportional
(Image image, boolean checkStyles) Checks if is proportional.final boolean
isStretchH
(Image image, boolean checkStyles) Checks if is stretch h.final boolean
isStretchV
(Image image, boolean checkStyles) Checks if is stretch v.final Color
manageColor
(Diagram diagram, int red, int green, int blue) Provides a color instance with the given RGB values by either creating a new one and aggregating it to the diagram or finding it in the diagrams palette of colors.final Color
manageColor
(Diagram diagram, IColorConstant colorConstant) Provides a color instance with the given color constant by either creating a new one and aggregating it to the diagram or finding it in the diagrams palette of colors.final Font
manageDefaultFont
(Diagram diagram) Provides the font instance for the default font (Arial in size 8) by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.final Font
manageDefaultFont
(Diagram diagram, boolean isItalic, boolean isBold) Provides the font instance for the default font (Arial in size 8) by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.final Font
manageFont
(Diagram diagram, String name, int size) Provides a font instance by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.final Font
manageFont
(Diagram diagram, String name, int size, boolean isItalic, boolean isBold) Provides a font instance by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.final void
movePolylinePoint
(Polyline polyline, int index, int deltaX, int deltaY) Move polyline point.final void
resetAll
(AbstractStyle abstractStyle) Sets the providedAbstractStyle
(could be aGraphicsAlgorithm
or aStyle
) to ignore all locally set attributes and instead use the ones provided by the style set to theAbstractStyle
.protected void
setDefaultGraphicsAlgorithmAttributes
(GraphicsAlgorithm graphicsAlgorithm) Sets the default attributes of the newly created GraphitiGraphicsAlgorithm
s.protected void
setDefaultTextAttributes
(Diagram diagram, AbstractText abstractText, boolean createFont) final void
setHeight
(GraphicsAlgorithm ga, int height) Sets the height of the given graphics algorithm.final void
setLocation
(GraphicsAlgorithm ga, int x, int y) Sets the location of the given graphics algorithm.final void
setLocation
(GraphicsAlgorithm ga, int x, int y, boolean avoidNegativeCoordinates) Sets the location of the given graphics algorithm.final void
setLocationAndSize
(GraphicsAlgorithm ga, int x, int y, int width, int height) Sets location and size of the given graphics algorithm.final void
setLocationAndSize
(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates) Sets location and size of the given graphics algorithm.final void
setRenderingStyle
(AbstractStyle abstractStyle, AdaptedGradientColoredAreas adaptedGradientColoredAreas) Sets a RenderingStyle with given adapted gradient colored areas for the givenAbstractStyle
.final void
setSize
(GraphicsAlgorithm ga, int width, int height) Sets the size of the given graphics algorithm.final void
setWidth
(GraphicsAlgorithm ga, int width) Sets the width of the given graphics algorithm.
-
Constructor Details
-
GaServiceImpl
public GaServiceImpl()
-
-
Method Details
-
calculateSize
Description copied from interface:IGaLayoutService
Calculates the size of the given graphics algorithm. If the graphics algorithm is a polyline or polygon then the size will be calculated. Otherwise the size of the graphics algorithm is simply returned.- Specified by:
calculateSize
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithm- Returns:
- the dimension of the given graphics algorithm
-
calculateSize
Description copied from interface:IGaLayoutService
Calculates the size of the given graphics algorithm. If the graphics algorithm is a polyline or polygon then the size will be calculated. Otherwise the size of the graphics algorithm is simply returned.- Specified by:
calculateSize
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmconsiderLineWidth
- if TRUE, the line width will be considered in the dimension- Returns:
- the dimension of the given graphics algorithm
-
createDefaultMultiText
public final MultiText createDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer) Description copied from interface:IGaCreateService
Creates aMultiText
graphics algorithm with the default font (Arial, size 8). Use this method only if you want to use the default text, otherwise useIGaCreateService.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- Specified by:
createDefaultMultiText
in interfaceIGaCreateService
- Parameters:
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithm- Returns:
- the new multiline text
-
createDefaultMultiText
public final MultiText createDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value) Description copied from interface:IGaCreateService
Creates aMultiText
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 useIGaCreateService.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- Specified by:
createDefaultMultiText
in interfaceIGaCreateService
- Parameters:
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmvalue
- initial text- Returns:
- the new multiline text
-
createDefaultText
Description copied from interface:IGaCreateService
Creates aText
graphics algorithm with the default font (Arial, size 8). Use this method only if you want to use the default text, otherwise useIGaCreateService.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- Specified by:
createDefaultText
in interfaceIGaCreateService
- Parameters:
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithm- Returns:
- the new text
-
createDefaultText
public final Text createDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value) Description copied from interface:IGaCreateService
Creates aText
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 useIGaCreateService.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- Specified by:
createDefaultText
in interfaceIGaCreateService
- Parameters:
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmvalue
- initial text- Returns:
- the new text
-
createEllipse
Description copied from interface:IGaCreateService
Creates anEllipse
graphics algorithm.The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0- Specified by:
createEllipse
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new ellipse
-
createPlainEllipse
Description copied from interface:IGaCreateService
Creates a plainEllipse
graphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainEllipse
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new ellipse
- See Also:
-
createImage
Description copied from interface:IGaCreateService
Creates aImage
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- Specified by:
createImage
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmimageId
- the image id- Returns:
- the new image
-
createPlainImage
Description copied from interface:IGaCreateService
Creates a plainImage
graphics algorithm with the given image id. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainImage
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmimageId
- the image id- Returns:
- the new image
- See Also:
-
createInvisibleRectangle
Description copied from interface:IGaCreateService
Create an invisibleRectangle
.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- Specified by:
createInvisibleRectangle
in interfaceIGaCreateService
- Parameters:
pe
- the pictogram element to create the rectangle- Returns:
- the rectangle
-
createMultiText
Description copied from interface:IGaCreateService
Creates aMultiText
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: ""- Specified by:
createMultiText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new multiline text
-
createPlainMultiText
Description copied from interface:IGaCreateService
Creates a plainMultiText
graphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainMultiText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new multiline text
- See Also:
-
createMultiText
Description copied from interface:IGaCreateService
Creates aMultiText
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- Specified by:
createMultiText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmvalue
- initial text- Returns:
- the new multiline text
-
createPlainMultiText
Description copied from interface:IGaCreateService
Creates a plainMultiText
graphics algorithm with the given text. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainMultiText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmvalue
- initial text- Returns:
- the new multiline text
- See Also:
-
createMultiText
public final MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize) Description copied from interface:IGaCreateService
Creates aMultiText
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- Specified by:
createMultiText
in interfaceIGaCreateService
- Parameters:
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 field- Returns:
- the new multiline text
-
createMultiText
public final MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize, boolean isFontItalic, boolean isFontBold) Description copied from interface:IGaCreateService
Creates aMultiText
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- Specified by:
createMultiText
in interfaceIGaCreateService
- Parameters:
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 not- Returns:
- the new multiline text
-
createPlatformGraphicsAlgorithm
public final PlatformGraphicsAlgorithm createPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, String id) Description copied from interface:IGaCreateService
Creates thePlatformGraphicsAlgorithm
.The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
id: id- Specified by:
createPlatformGraphicsAlgorithm
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmid
- the id- Returns:
- the platform graphics algorithm
-
createPlainPlatformGraphicsAlgorithm
public final PlatformGraphicsAlgorithm createPlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, String id) Description copied from interface:IGaCreateService
Creates the plainPlatformGraphicsAlgorithm
. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPlatformGraphicsAlgorithm
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmid
- the id- Returns:
- the platform graphics algorithm
- See Also:
-
createPoint
Description copied from interface:IGaCreateService
Creates aPoint
datatype for the given x/y coordinates.- Specified by:
createPoint
in interfaceIGaCreateService
- Parameters:
x
- the x coordinatey
- the y coordinate- Returns:
- the new point
-
createPoint
Description copied from interface:IGaCreateService
Creates aPoint
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.- Specified by:
createPoint
in interfaceIGaCreateService
- Parameters:
x
- the x coordinatey
- the y coordinatebefore
- the distance before, if supportedafter
- the distance after, if supported- Returns:
- the new point
-
createPointList
Description copied from interface:IGaCreateService
Creates a list ofPoint
datatypes for the given x/y coordinates.- Specified by:
createPointList
in interfaceIGaCreateService
- Parameters:
xy
- The x/y coordinates: [x0, y0, ...,xN, yN]- Returns:
- the point list
-
createPointList
Description copied from interface:IGaCreateService
Creates a list ofPoint
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.- Specified by:
createPointList
in interfaceIGaCreateService
- Parameters:
xy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN, afterN]- Returns:
- the point list
-
createPolygon
Description copied from interface:IGaCreateService
Creates aPolygon
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- Specified by:
createPolygon
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new polygon
-
createPlainPolygon
Description copied from interface:IGaCreateService
Creates a plainPolygon
graphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolygon
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new polygon
- See Also:
-
createPolygon
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Description copied from interface:IGaCreateService
Creates aPolygon
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- Specified by:
createPolygon
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmpoints
- collection of point- Returns:
- the new polygon
-
createPlainPolygon
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Description copied from interface:IGaCreateService
Creates a plainPolygon
graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolygon
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmpoints
- collection of point- Returns:
- the new polygon
- See Also:
-
createPolygon
Description copied from interface:IGaCreateService
Creates aPolygon
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- Specified by:
createPolygon
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polygon
-
createPlainPolygon
Description copied from interface:IGaCreateService
Creates a plainPolygon
graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolygon
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polygon
- See Also:
-
createPolygon
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Description copied from interface:IGaCreateService
Creates aPolygon
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- Specified by:
createPolygon
in interfaceIGaCreateService
- Parameters:
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]- Returns:
- the new polygon
-
createPlainPolygon
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Description copied from interface:IGaCreateService
Creates a plainPolygon
graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolygon
in interfaceIGaCreateService
- Parameters:
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]- Returns:
- the new polygon
- See Also:
-
createPolyline
Description copied from interface:IGaCreateService
Creates aPolyline
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- Specified by:
createPolyline
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new polyline
-
createPlainPolyline
Description copied from interface:IGaCreateService
Creates a plainPolyline
graphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolyline
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new polyline
- See Also:
-
createPolyline
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Description copied from interface:IGaCreateService
Creates aPolyline
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- Specified by:
createPolyline
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmpoints
- collection of point- Returns:
- the new polyline
-
createPlainPolyline
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, Collection<Point> points) Description copied from interface:IGaCreateService
Creates a plainPolyline
graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolyline
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmpoints
- collection of point- Returns:
- the new polyline
- See Also:
-
createPolyline
Description copied from interface:IGaCreateService
Creates aPolyline
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- Specified by:
createPolyline
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polyline
-
createPlainPolyline
Description copied from interface:IGaCreateService
Creates a plain polyline graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolyline
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polyline
- See Also:
-
createPolyline
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Description copied from interface:IGaCreateService
Creates aPolyline
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- Specified by:
createPolyline
in interfaceIGaCreateService
- Parameters:
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]- Returns:
- the new polyline
-
createPlainPolyline
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter) Description copied from interface:IGaCreateService
Creates a plainPolyline
graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainPolyline
in interfaceIGaCreateService
- Parameters:
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]- Returns:
- the new polyline
- See Also:
-
createRectangle
Description copied from interface:IGaCreateService
Creates aRectangle
graphics algorithm.The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0- Specified by:
createRectangle
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new rectangle
-
createPlainRectangle
Description copied from interface:IGaCreateService
Creates a plainRectangle
graphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainRectangle
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new rectangle
- See Also:
-
createRoundedRectangle
public final RoundedRectangle createRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight) Description copied from interface:IGaCreateService
Creates aRoundedRectangle
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- Specified by:
createRoundedRectangle
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmcornerWidth
- the corner widthcornerHeight
- the corner height- Returns:
- the new rounded rectangle
-
createPlainRoundedRectangle
public final RoundedRectangle createPlainRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight) Description copied from interface:IGaCreateService
Creates a plainRoundedRectangle
graphics algorithm with the given corner dimensions. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainRoundedRectangle
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmcornerWidth
- the corner widthcornerHeight
- the corner height- Returns:
- the new rounded rectangle
- See Also:
-
createShiftedColor
Description copied from interface:IGaCreateService
Shifts theColor
darker or lighter.- Specified by:
createShiftedColor
in interfaceIGaCreateService
- Parameters:
color
- the color to be changedshift
- negative shifts means darken the colordiagram
- the diagram- Returns:
- a new color datatype with the shiftet values
-
createShiftedColor
Description copied from interface:IGaCreateService
Shifts theColor
constant darker or lighter.- Specified by:
createShiftedColor
in interfaceIGaCreateService
- Parameters:
colorConstant
- the color constant to be changedshift
- negative shifts means darken the color- Returns:
- the color constant with the shifted values
-
createStyle
Description copied from interface:IGaCreateService
Creates aStyle
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<br<- Specified by:
createStyle
in interfaceIGaCreateService
- Parameters:
styleContainer
- container styleid
- style id- Returns:
- the newly created style
-
createPlainStyle
Description copied from interface:IGaCreateService
Creates aStyle
with the given id. The style is aggregated under the given container style. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainStyle
in interfaceIGaCreateService
- Parameters:
styleContainer
- container styleid
- style id- Returns:
- the newly created style
- See Also:
-
createText
Description copied from interface:IGaCreateService
Creates aText
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: ""- Specified by:
createText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new text
-
createPlainText
Description copied from interface:IGaCreateService
Creates a plainText
graphics algorithm with empty text. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithm- Returns:
- the new text
- See Also:
-
createText
public final Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize) Description copied from interface:IGaCreateService
Creates aText
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- Specified by:
createText
in interfaceIGaCreateService
- Parameters:
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 field- Returns:
- the new text
-
createText
public final Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize, boolean isFontItalic, boolean isFontBold) Description copied from interface:IGaCreateService
Creates aText
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- Specified by:
createText
in interfaceIGaCreateService
- Parameters:
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 not- Returns:
- the new text
-
createText
Description copied from interface:IGaCreateService
Creates aText
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- Specified by:
createText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmvalue
- initial text- Returns:
- the new text
-
createPlainText
Description copied from interface:IGaCreateService
Creates a plainText
graphics algorithm with the given text. Default values have been reset, so you can use your styles, seeAbstractStyle
.- Specified by:
createPlainText
in interfaceIGaCreateService
- Parameters:
gaContainer
- the container for the new graphics algorithmvalue
- initial text- Returns:
- the new text
- See Also:
-
createTextStyleRegion
Description copied from interface:IGaCreateService
Creates aTextStyleRegion
. The style is aggregated under the given abstract text.- Specified by:
createTextStyleRegion
in interfaceIGaCreateService
- Parameters:
abstractText
- container text- Returns:
- the newly created text style region
- Since:
- 0.10
- See Also:
-
createTextStyleRegion
Description copied from interface:IGaCreateService
Creates aTextStyleRegion
with the given bounds. The style is aggregated under the given abstract text.- Specified by:
createTextStyleRegion
in interfaceIGaCreateService
- Parameters:
abstractText
- container textstart
- region startend
- retion end- Returns:
- the newly created text style region
- Since:
- 0.10
- See Also:
-
createTextStyle
Description copied from interface:IGaCreateService
Creates aTextStyle
. The style is aggregated under the given text style region.- Specified by:
createTextStyle
in interfaceIGaCreateService
- Parameters:
region
- container region- Returns:
- the newly created text style
- Since:
- 0.10
- See Also:
-
createTextStyle
public TextStyle createTextStyle(TextStyleRegion region, boolean underline, boolean strikeout, UnderlineStyle underlineStyle) Description copied from interface:IGaCreateService
Creates aTextStyle
with the given values. The style is aggregated under the given text style region.- Specified by:
createTextStyle
in interfaceIGaCreateService
- Parameters:
region
- container regionunderline
- the is underlinedstrikeout
- the is stroke outunderlineStyle
- the underline style- Returns:
- the newly created text style
- Since:
- 0.10
- See Also:
-
deleteFont
-
deleteFont
Description copied from interface:IGaService
Deletes the given font.- Specified by:
deleteFont
in interfaceIGaService
- Parameters:
font
- the font to delete
-
deleteColor
Description copied from interface:IGaService
Deletes the given color.- Specified by:
deleteColor
in interfaceIGaService
- Parameters:
color
- the color to delete
-
deleteRenderingStyle
Description copied from interface:IGaService
Deletes the RenderingStyle from the given AbstractStyle.- Specified by:
deleteRenderingStyle
in interfaceIGaService
- Parameters:
abstractStyle
- the abstract style from which to delete the RenderingStyle.
-
findStyle
Description copied from interface:IGaService
Searches for a style with the given id. The search scope is the given style container (which will usually be the diagram).- Specified by:
findStyle
in interfaceIGaService
- Parameters:
styleContainer
- the style containerid
- style id- Returns:
- the found style; null if not found
-
getRotation
Description copied from interface:IGaService
Gets the rotation angle.- Specified by:
getRotation
in interfaceIGaService
- Parameters:
at
- the abstract textcheckStyles
- the check styles- Returns:
- the angle
- Since:
- 0.11
-
getBackgroundColor
Description copied from interface:IGaService
Gets the background color.- Specified by:
getBackgroundColor
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- the background color
-
getFont
Description copied from interface:IGaService
Gets the font.- Specified by:
getFont
in interfaceIGaService
- Parameters:
at
- the abstract textcheckStyles
- the check styles- Returns:
- the font
-
getForegroundColor
Description copied from interface:IGaService
Gets the foreground color.- Specified by:
getForegroundColor
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- the foreground color
-
getHorizontalAlignment
Description copied from interface:IGaService
Gets the horizontal alignment.- Specified by:
getHorizontalAlignment
in interfaceIGaService
- Parameters:
at
- the abstract textcheckStyles
- the check styles- Returns:
- the horizontal alignment
-
getLineStyle
Description copied from interface:IGaService
Gets the line style.- Specified by:
getLineStyle
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- the line style
-
getLineWidth
Description copied from interface:IGaService
Gets the line width.- Specified by:
getLineWidth
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- the line width
-
getRenderingStyle
Description copied from interface:IGaService
Gets the rendering style.- Specified by:
getRenderingStyle
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- the rendering style
-
getTransparency
Description copied from interface:IGaService
Gets the transparency.- Specified by:
getTransparency
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- the transparency
-
getVerticalAlignment
Description copied from interface:IGaService
Gets the vertical alignment.- Specified by:
getVerticalAlignment
in interfaceIGaService
- Parameters:
at
- the abstract textcheckStyles
- the check styles- Returns:
- the vertical alignment
-
resetAll
Description copied from interface:IGaService
Sets the providedAbstractStyle
(could be aGraphicsAlgorithm
or aStyle
) to ignore all locally set attributes and instead use the ones provided by the style set to theAbstractStyle
.- Specified by:
resetAll
in interfaceIGaService
- Parameters:
abstractStyle
- The abstract style (style or graphics algorithm)
-
isFilled
Description copied from interface:IGaService
Checks if is filled.- Specified by:
isFilled
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- true, if is filled
-
isLineVisible
Description copied from interface:IGaService
Checks if line is visible.- Specified by:
isLineVisible
in interfaceIGaService
- Parameters:
ga
- the graphics algorithmcheckStyles
- the check styles- Returns:
- true, if line is visible
-
isProportional
Description copied from interface:IGaService
Checks if is proportional.- Specified by:
isProportional
in interfaceIGaService
- Parameters:
image
- the imagecheckStyles
- the check styles- Returns:
- true, if is proportional
-
isStretchH
Description copied from interface:IGaService
Checks if is stretch h.- Specified by:
isStretchH
in interfaceIGaService
- Parameters:
image
- the imagecheckStyles
- the check styles- Returns:
- true, if is stretch h
-
isStretchV
Description copied from interface:IGaService
Checks if is stretch v.- Specified by:
isStretchV
in interfaceIGaService
- Parameters:
image
- the imagecheckStyles
- the check styles- Returns:
- true, if is stretch v
-
manageColor
Description copied from interface:IGaService
Provides a color instance with the given color constant by either creating a new one and aggregating it to the diagram or finding it in the diagrams palette of colors.- Specified by:
manageColor
in interfaceIGaService
- Parameters:
diagram
- the diagram that aggregates the colorscolorConstant
- which contains the RGB values.- Returns:
- the color instance
-
manageColor
Description copied from interface:IGaService
Provides a color instance with the given RGB values by either creating a new one and aggregating it to the diagram or finding it in the diagrams palette of colors.- Specified by:
manageColor
in interfaceIGaService
- Parameters:
diagram
- the diagram that aggregates the colorsred
- the redgreen
- the greenblue
- the blue- Returns:
- the color instance
-
manageDefaultFont
Description copied from interface:IGaService
Provides the font instance for the default font (Arial in size 8) by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.- Specified by:
manageDefaultFont
in interfaceIGaService
- Parameters:
diagram
- the diagram that aggregates the fonts- Returns:
- the font instance
-
manageDefaultFont
Description copied from interface:IGaService
Provides the font instance for the default font (Arial in size 8) by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.- Specified by:
manageDefaultFont
in interfaceIGaService
- Parameters:
diagram
- the diagram that aggregates the fontsisItalic
- the is italicisBold
- the is bold- Returns:
- the font instance
-
manageFont
Description copied from interface:IGaService
Provides a font instance by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.- Specified by:
manageFont
in interfaceIGaService
- Parameters:
diagram
- the diagram that aggregates the fontsname
- the name of the fontsize
- the size of the font- Returns:
- the font instance
-
manageFont
public final Font manageFont(Diagram diagram, String name, int size, boolean isItalic, boolean isBold) Description copied from interface:IGaService
Provides a font instance by either creating a new one and aggregating it to the diagram or finding it in the diagrams list of fonts.- Specified by:
manageFont
in interfaceIGaService
- Parameters:
diagram
- the diagram that aggregates the fontsname
- the name of the fontsize
- the size of the fontisItalic
- the is italicisBold
- the is bold- Returns:
- the font instance
-
movePolylinePoint
Description copied from interface:IGaService
Move polyline point.- Specified by:
movePolylinePoint
in interfaceIGaService
- Parameters:
polyline
- the polylineindex
- the indexdeltaX
- the delta xdeltaY
- the delta y
-
setDefaultGraphicsAlgorithmAttributes
Sets the default attributes of the newly created GraphitiGraphicsAlgorithm
s. The default implementation sets the location (X and Y values) and the size (Width and height values) to 0, theLineStyle
tosolid
, the line width to 1 and the transparency to 0.- Parameters:
graphicsAlgorithm
- theGraphicsAlgorithm
to set the defaults for
-
setDefaultTextAttributes
protected void setDefaultTextAttributes(Diagram diagram, AbstractText abstractText, boolean createFont) Sets the default attributes of newly createdAbstractText
graphics algorithms (Text
andMultiText
). The default implementation sets the default attributes for all graphics algorithmssetDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm)
, filled tofalse
and the font toIGaService.DEFAULT_FONT
with sizeIGaService.DEFAULT_FONT_SIZE
(Arial in size 8).- Parameters:
diagram
- the diagram to use for managing theFont
abstractText
- theAbstractText
to set the attributes forcreateFont
-true
in case the font shall be created,false
otherwise
-
setHeight
Description copied from interface:IGaLayoutService
Sets the height of the given graphics algorithm.- Specified by:
setHeight
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmheight
- the new height
-
setLocationAndSize
Description copied from interface:IGaLayoutService
Sets location and size of the given graphics algorithm.- Specified by:
setLocationAndSize
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinatewidth
- the new widthheight
- the new height
-
setLocationAndSize
public final void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates) Description copied from interface:IGaLayoutService
Sets location and size of the given graphics algorithm.- Specified by:
setLocationAndSize
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinatewidth
- the new widthheight
- the new heightavoidNegativeCoordinates
- if TRUE, a negative coordinate will automatically set to 0.
-
setLocation
Description copied from interface:IGaLayoutService
Sets the location of the given graphics algorithm.- Specified by:
setLocation
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinate
-
setLocation
Description copied from interface:IGaLayoutService
Sets the location of the given graphics algorithm.- Specified by:
setLocation
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinateavoidNegativeCoordinates
- if TRUE, a negative coordinate will automatically set to 0.
-
setSize
Description copied from interface:IGaLayoutService
Sets the size of the given graphics algorithm.- Specified by:
setSize
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmwidth
- the new widthheight
- the new height
-
setWidth
Description copied from interface:IGaLayoutService
Sets the width of the given graphics algorithm.- Specified by:
setWidth
in interfaceIGaLayoutService
- Parameters:
ga
- graphics algorithmwidth
- the new width
-
setRenderingStyle
public final void setRenderingStyle(AbstractStyle abstractStyle, AdaptedGradientColoredAreas adaptedGradientColoredAreas) Description copied from interface:IGaService
Sets a RenderingStyle with given adapted gradient colored areas for the givenAbstractStyle
. TheAdaptedGradientColoredAreas
are defined and created inPredefinedColoredAreas
.- Specified by:
setRenderingStyle
in interfaceIGaService
- Parameters:
abstractStyle
- the abstract style for which to set the rendering style.adaptedGradientColoredAreas
- TheAdaptedGradientColoredAreas
gradient colored areas.
-