Class GaServiceImpl
- java.lang.Object
-
- org.eclipse.graphiti.services.impl.GaServiceImpl
-
- All Implemented Interfaces:
IGaCreateService,IGaLayoutService,IGaService
public class GaServiceImpl extends java.lang.Object implements IGaService
Provides the default implementation for the GraphitiGraphicsAlgorithmrelated services. Usually clients consume this service viaGraphiti.getGaService()orGraphiti.getGaCreateService()and get the default behavior, but Clients can subclass this to modify the default attributes that will be set forTextorMultiTextgraphics algorithms like the default font by overriding#setDefaultTextAttributes(Diagram, AbstractText, String, boolean). Also default attributes of other graphics algorithms can be influenced by overridingsetDefaultGraphicsAlgorithmAttributes(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
Constructors Constructor Description GaServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDimensioncalculateSize(GraphicsAlgorithm ga)Calculates the size of the given graphics algorithm.IDimensioncalculateSize(GraphicsAlgorithm ga, boolean considerLineWidth)Calculates the size of the given graphics algorithm.MultiTextcreateDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)Creates aMultiTextgraphics algorithm with the default font (Arial, size 8).MultiTextcreateDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value)Creates aMultiTextgraphics algorithm with the default font (Arial, size 8) and the given text.TextcreateDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)Creates aTextgraphics algorithm with the default font (Arial, size 8).TextcreateDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value)Creates aTextgraphics algorithm with the default font (Arial, size 8) and the given text.EllipsecreateEllipse(GraphicsAlgorithmContainer gaContainer)Creates anEllipsegraphics algorithm.ImagecreateImage(GraphicsAlgorithmContainer gaContainer, java.lang.String imageId)Creates aImagegraphics algorithm with the given image id.RectanglecreateInvisibleRectangle(PictogramElement pe)Create an invisibleRectangle.MultiTextcreateMultiText(GraphicsAlgorithmContainer gaContainer)Creates aMultiTextgraphics algorithm.MultiTextcreateMultiText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)Creates aMultiTextgraphics algorithm with the given text.MultiTextcreateMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize)Creates aMultiTextgraphics algorithm with the given text and font.MultiTextcreateMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)Creates aMultiTextgraphics algorithm with the given text and font.EllipsecreatePlainEllipse(GraphicsAlgorithmContainer gaContainer)Creates a plainEllipsegraphics algorithm.ImagecreatePlainImage(GraphicsAlgorithmContainer gaContainer, java.lang.String imageId)Creates a plainImagegraphics algorithm with the given image id.MultiTextcreatePlainMultiText(GraphicsAlgorithmContainer gaContainer)Creates a plainMultiTextgraphics algorithm.MultiTextcreatePlainMultiText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)Creates a plainMultiTextgraphics algorithm with the given text.PlatformGraphicsAlgorithmcreatePlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, java.lang.String id)Creates the plainPlatformGraphicsAlgorithm.PolygoncreatePlainPolygon(GraphicsAlgorithmContainer gaContainer)Creates a plainPolygongraphics algorithm.PolygoncreatePlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)Creates a plainPolygongraphics algorithm with the given points.PolygoncreatePlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)Creates a plainPolygongraphics algorithm with the given points.PolygoncreatePlainPolygon(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)Creates a plainPolygongraphics algorithm with the given points.PolylinecreatePlainPolyline(GraphicsAlgorithmContainer gaContainer)Creates a plainPolylinegraphics algorithm.PolylinecreatePlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)Creates a plain polyline graphics algorithm with the given points.PolylinecreatePlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)Creates a plainPolylinegraphics algorithm with the given points.PolylinecreatePlainPolyline(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)Creates a plainPolylinegraphics algorithm with the given points.RectanglecreatePlainRectangle(GraphicsAlgorithmContainer gaContainer)Creates a plainRectanglegraphics algorithm.RoundedRectanglecreatePlainRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)Creates a plainRoundedRectanglegraphics algorithm with the given corner dimensions.StylecreatePlainStyle(StyleContainer styleContainer, java.lang.String id)Creates aStylewith the given id.TextcreatePlainText(GraphicsAlgorithmContainer gaContainer)Creates a plainTextgraphics algorithm with empty text.TextcreatePlainText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)Creates a plainTextgraphics algorithm with the given text.PlatformGraphicsAlgorithmcreatePlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, java.lang.String id)Creates thePlatformGraphicsAlgorithm.PointcreatePoint(int x, int y)Creates aPointdatatype for the given x/y coordinates.PointcreatePoint(int x, int y, int before, int after)Creates aPointdatatype for the given x/y coordinates.java.util.List<Point>createPointList(int[] xy)Creates a list ofPointdatatypes for the given x/y coordinates.java.util.List<Point>createPointList(int[] xy, int[] beforeAfter)Creates a list ofPointdatatypes for the given x/y coordinates.PolygoncreatePolygon(GraphicsAlgorithmContainer gaContainer)Creates aPolygongraphics algorithm.PolygoncreatePolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)Creates aPolygongraphics algorithm with the given points.PolygoncreatePolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)Creates aPolygongraphics algorithm with the given points.PolygoncreatePolygon(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)Creates aPolygongraphics algorithm with the given points.PolylinecreatePolyline(GraphicsAlgorithmContainer gaContainer)Creates aPolylinegraphics algorithm.PolylinecreatePolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)Creates aPolylinegraphics algorithm with the given points.PolylinecreatePolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)Creates aPolylinegraphics algorithm with the given points.PolylinecreatePolyline(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)Creates aPolylinegraphics algorithm with the given points.RectanglecreateRectangle(GraphicsAlgorithmContainer gaContainer)Creates aRectanglegraphics algorithm.RoundedRectanglecreateRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)Creates aRoundedRectanglegraphics algorithm with the given corner dimensions.ColorcreateShiftedColor(Color color, int shift, Diagram diagram)Shifts theColordarker or lighter.IColorConstantcreateShiftedColor(IColorConstant colorConstant, int shift)Shifts theColorconstant darker or lighter.StylecreateStyle(StyleContainer styleContainer, java.lang.String id)Creates aStylewith the given id.TextcreateText(GraphicsAlgorithmContainer gaContainer)Creates aTextgraphics algorithm with empty text.TextcreateText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)Creates aTextgraphics algorithm with the given text.TextcreateText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize)Creates aTextgraphics algorithm with the given text and font.TextcreateText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)Creates aTextgraphics algorithm with the given text and font.TextStylecreateTextStyle(TextStyleRegion region)Creates aTextStyle.TextStylecreateTextStyle(TextStyleRegion region, boolean underline, boolean strikeout, UnderlineStyle underlineStyle)Creates aTextStylewith the given values.TextStyleRegioncreateTextStyleRegion(AbstractText abstractText)Creates aTextStyleRegion.TextStyleRegioncreateTextStyleRegion(AbstractText abstractText, int start, int end)Creates aTextStyleRegionwith the given bounds.voiddeleteColor(Color color)Deletes the given color.voiddeleteFont(AbstractText abstractText)voiddeleteFont(Font font)Deletes the given font.voiddeleteRenderingStyle(AbstractStyle abstractStyle)Deletes the RenderingStyle from the given AbstractStyle.StylefindStyle(StyleContainer styleContainer, java.lang.String id)Searches for a style with the given id.ColorgetBackgroundColor(GraphicsAlgorithm ga, boolean checkStyles)Gets the background color.FontgetFont(AbstractText at, boolean checkStyles)Gets the font.ColorgetForegroundColor(GraphicsAlgorithm ga, boolean checkStyles)Gets the foreground color.OrientationgetHorizontalAlignment(AbstractText at, boolean checkStyles)Gets the horizontal alignment.LineStylegetLineStyle(GraphicsAlgorithm ga, boolean checkStyles)Gets the line style.intgetLineWidth(GraphicsAlgorithm ga, boolean checkStyles)Gets the line width.RenderingStylegetRenderingStyle(GraphicsAlgorithm ga, boolean checkStyles)Gets the rendering style.doublegetRotation(AbstractText at, boolean checkStyles)Gets the rotation angle.doublegetTransparency(GraphicsAlgorithm ga, boolean checkStyles)Gets the transparency.OrientationgetVerticalAlignment(AbstractText at, boolean checkStyles)Gets the vertical alignment.booleanisFilled(GraphicsAlgorithm ga, boolean checkStyles)Checks if is filled.booleanisLineVisible(GraphicsAlgorithm ga, boolean checkStyles)Checks if line is visible.booleanisProportional(Image image, boolean checkStyles)Checks if is proportional.booleanisStretchH(Image image, boolean checkStyles)Checks if is stretch h.booleanisStretchV(Image image, boolean checkStyles)Checks if is stretch v.ColormanageColor(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.ColormanageColor(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.FontmanageDefaultFont(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.FontmanageDefaultFont(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.FontmanageFont(Diagram diagram, java.lang.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.FontmanageFont(Diagram diagram, java.lang.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.voidmovePolylinePoint(Polyline polyline, int index, int deltaX, int deltaY)Move polyline point.voidresetAll(AbstractStyle abstractStyle)Sets the providedAbstractStyle(could be aGraphicsAlgorithmor aStyle) to ignore all locally set attributes and instead use the ones provided by the style set to theAbstractStyle.protected voidsetDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm graphicsAlgorithm)Sets the default attributes of the newly created GraphitiGraphicsAlgorithms.protected voidsetDefaultTextAttributes(Diagram diagram, AbstractText abstractText, boolean createFont)voidsetHeight(GraphicsAlgorithm ga, int height)Sets the height of the given graphics algorithm.voidsetLocation(GraphicsAlgorithm ga, int x, int y)Sets the location of the given graphics algorithm.voidsetLocation(GraphicsAlgorithm ga, int x, int y, boolean avoidNegativeCoordinates)Sets the location of the given graphics algorithm.voidsetLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height)Sets location and size of the given graphics algorithm.voidsetLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates)Sets location and size of the given graphics algorithm.voidsetRenderingStyle(AbstractStyle abstractStyle, AdaptedGradientColoredAreas adaptedGradientColoredAreas)Sets a RenderingStyle with given adapted gradient colored areas for the givenAbstractStyle.voidsetSize(GraphicsAlgorithm ga, int width, int height)Sets the size of the given graphics algorithm.voidsetWidth(GraphicsAlgorithm ga, int width)Sets the width of the given graphics algorithm.
-
-
-
Method Detail
-
calculateSize
public final IDimension calculateSize(GraphicsAlgorithm ga)
Description copied from interface:IGaLayoutServiceCalculates 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:
calculateSizein interfaceIGaLayoutService- Parameters:
ga- graphics algorithm- Returns:
- the dimension of the given graphics algorithm
-
calculateSize
public final IDimension calculateSize(GraphicsAlgorithm ga, boolean considerLineWidth)
Description copied from interface:IGaLayoutServiceCalculates 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:
calculateSizein 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:IGaCreateServiceCreates aMultiTextgraphics 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:
createDefaultMultiTextin 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, java.lang.String value)
Description copied from interface:IGaCreateServiceCreates aMultiTextgraphics 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:
createDefaultMultiTextin interfaceIGaCreateService- Parameters:
diagram- the diagram to manage the fontgaContainer- the container for the new graphics algorithmvalue- initial text- Returns:
- the new multiline text
-
createDefaultText
public final Text createDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates aTextgraphics 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:
createDefaultTextin 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, java.lang.String value)
Description copied from interface:IGaCreateServiceCreates aTextgraphics 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:
createDefaultTextin interfaceIGaCreateService- Parameters:
diagram- the diagram to manage the fontgaContainer- the container for the new graphics algorithmvalue- initial text- Returns:
- the new text
-
createEllipse
public final Ellipse createEllipse(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates anEllipsegraphics 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:
createEllipsein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new ellipse
-
createPlainEllipse
public final Ellipse createPlainEllipse(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates a plainEllipsegraphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainEllipsein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new ellipse
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createImage
public final Image createImage(GraphicsAlgorithmContainer gaContainer, java.lang.String imageId)
Description copied from interface:IGaCreateServiceCreates aImagegraphics 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:
createImagein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmimageId- the image id- Returns:
- the new image
-
createPlainImage
public final Image createPlainImage(GraphicsAlgorithmContainer gaContainer, java.lang.String imageId)
Description copied from interface:IGaCreateServiceCreates a plainImagegraphics algorithm with the given image id. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainImagein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmimageId- the image id- Returns:
- the new image
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createInvisibleRectangle
public final Rectangle createInvisibleRectangle(PictogramElement pe)
Description copied from interface:IGaCreateServiceCreate 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:
createInvisibleRectanglein interfaceIGaCreateService- Parameters:
pe- the pictogram element to create the rectangle- Returns:
- the rectangle
-
createMultiText
public final MultiText createMultiText(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates aMultiTextgraphics 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:
createMultiTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new multiline text
-
createPlainMultiText
public final MultiText createPlainMultiText(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates a plainMultiTextgraphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainMultiTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new multiline text
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createMultiText
public final MultiText createMultiText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
Description copied from interface:IGaCreateServiceCreates aMultiTextgraphics 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:
createMultiTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmvalue- initial text- Returns:
- the new multiline text
-
createPlainMultiText
public final MultiText createPlainMultiText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
Description copied from interface:IGaCreateServiceCreates a plainMultiTextgraphics algorithm with the given text. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainMultiTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmvalue- initial text- Returns:
- the new multiline text
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createMultiText
public final MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize)
Description copied from interface:IGaCreateServiceCreates aMultiTextgraphics 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:
createMultiTextin 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, java.lang.String value, java.lang.String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)
Description copied from interface:IGaCreateServiceCreates aMultiTextgraphics 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:
createMultiTextin 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, java.lang.String id)
Description copied from interface:IGaCreateServiceCreates 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:
createPlatformGraphicsAlgorithmin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmid- the id- Returns:
- the platform graphics algorithm
-
createPlainPlatformGraphicsAlgorithm
public final PlatformGraphicsAlgorithm createPlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, java.lang.String id)
Description copied from interface:IGaCreateServiceCreates the plainPlatformGraphicsAlgorithm. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPlatformGraphicsAlgorithmin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmid- the id- Returns:
- the platform graphics algorithm
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPoint
public final Point createPoint(int x, int y)
Description copied from interface:IGaCreateServiceCreates aPointdatatype for the given x/y coordinates.- Specified by:
createPointin interfaceIGaCreateService- Parameters:
x- the x coordinatey- the y coordinate- Returns:
- the new point
-
createPoint
public final Point createPoint(int x, int y, int before, int after)
Description copied from interface:IGaCreateServiceCreates aPointdatatype 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:
createPointin interfaceIGaCreateService- Parameters:
x- the x coordinatey- the y coordinatebefore- the distance before, if supportedafter- the distance after, if supported- Returns:
- the new point
-
createPointList
public final java.util.List<Point> createPointList(int[] xy)
Description copied from interface:IGaCreateServiceCreates a list ofPointdatatypes for the given x/y coordinates.- Specified by:
createPointListin interfaceIGaCreateService- Parameters:
xy- The x/y coordinates: [x0, y0, ...,xN, yN]- Returns:
- the point list
-
createPointList
public final java.util.List<Point> createPointList(int[] xy, int[] beforeAfter)
Description copied from interface:IGaCreateServiceCreates a list ofPointdatatypes 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:
createPointListin 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
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates aPolygongraphics 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:
createPolygonin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new polygon
-
createPlainPolygon
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates a plainPolygongraphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolygonin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new polygon
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolygon
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
Description copied from interface:IGaCreateServiceCreates aPolygongraphics 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:
createPolygonin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmpoints- collection of point- Returns:
- the new polygon
-
createPlainPolygon
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
Description copied from interface:IGaCreateServiceCreates a plainPolygongraphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolygonin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmpoints- collection of point- Returns:
- the new polygon
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolygon
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)
Description copied from interface:IGaCreateServiceCreates aPolygongraphics 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:
createPolygonin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmxy- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polygon
-
createPlainPolygon
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)
Description copied from interface:IGaCreateServiceCreates a plainPolygongraphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolygonin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmxy- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polygon
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolygon
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
Description copied from interface:IGaCreateServiceCreates aPolygongraphics 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:
createPolygonin 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:IGaCreateServiceCreates a plainPolygongraphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolygonin 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:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolyline
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates aPolylinegraphics 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:
createPolylinein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new polyline
-
createPlainPolyline
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates a plainPolylinegraphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolylinein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new polyline
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolyline
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
Description copied from interface:IGaCreateServiceCreates aPolylinegraphics 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:
createPolylinein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmpoints- collection of point- Returns:
- the new polyline
-
createPlainPolyline
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, java.util.Collection<Point> points)
Description copied from interface:IGaCreateServiceCreates a plainPolylinegraphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolylinein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmpoints- collection of point- Returns:
- the new polyline
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolyline
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)
Description copied from interface:IGaCreateServiceCreates aPolylinegraphics 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:
createPolylinein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmxy- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polyline
-
createPlainPolyline
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)
Description copied from interface:IGaCreateServiceCreates a plain polyline graphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolylinein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmxy- The x/y coordinates: [x0, y0, ..., xN, yN]- Returns:
- the new polyline
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createPolyline
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
Description copied from interface:IGaCreateServiceCreates aPolylinegraphics 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:
createPolylinein 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:IGaCreateServiceCreates a plainPolylinegraphics algorithm with the given points. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainPolylinein 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:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createRectangle
public final Rectangle createRectangle(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates aRectanglegraphics 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:
createRectanglein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new rectangle
-
createPlainRectangle
public final Rectangle createPlainRectangle(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates a plainRectanglegraphics algorithm. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainRectanglein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new rectangle
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createRoundedRectangle
public final RoundedRectangle createRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)
Description copied from interface:IGaCreateServiceCreates aRoundedRectanglegraphics 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:
createRoundedRectanglein 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:IGaCreateServiceCreates a plainRoundedRectanglegraphics algorithm with the given corner dimensions. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainRoundedRectanglein interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmcornerWidth- the corner widthcornerHeight- the corner height- Returns:
- the new rounded rectangle
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createShiftedColor
public final Color createShiftedColor(Color color, int shift, Diagram diagram)
Description copied from interface:IGaCreateServiceShifts theColordarker or lighter.- Specified by:
createShiftedColorin 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
public final IColorConstant createShiftedColor(IColorConstant colorConstant, int shift)
Description copied from interface:IGaCreateServiceShifts theColorconstant darker or lighter.- Specified by:
createShiftedColorin interfaceIGaCreateService- Parameters:
colorConstant- the color constant to be changedshift- negative shifts means darken the color- Returns:
- the color constant with the shifted values
-
createStyle
public final Style createStyle(StyleContainer styleContainer, java.lang.String id)
Description copied from interface:IGaCreateServiceCreates aStylewith 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
- Specified by:
createStylein interfaceIGaCreateService- Parameters:
styleContainer- container styleid- style id- Returns:
- the newly created style
-
createPlainStyle
public final Style createPlainStyle(StyleContainer styleContainer, java.lang.String id)
Description copied from interface:IGaCreateServiceCreates aStylewith 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:
createPlainStylein interfaceIGaCreateService- Parameters:
styleContainer- container styleid- style id- Returns:
- the newly created style
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createText
public final Text createText(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates aTextgraphics 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:
createTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new text
-
createPlainText
public final Text createPlainText(GraphicsAlgorithmContainer gaContainer)
Description copied from interface:IGaCreateServiceCreates a plainTextgraphics algorithm with empty text. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithm- Returns:
- the new text
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createText
public final Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, java.lang.String value, java.lang.String fontName, int fontSize)
Description copied from interface:IGaCreateServiceCreates aTextgraphics 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:
createTextin 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, java.lang.String value, java.lang.String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)
Description copied from interface:IGaCreateServiceCreates aTextgraphics 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:
createTextin 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
public final Text createText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
Description copied from interface:IGaCreateServiceCreates aTextgraphics 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:
createTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmvalue- initial text- Returns:
- the new text
-
createPlainText
public final Text createPlainText(GraphicsAlgorithmContainer gaContainer, java.lang.String value)
Description copied from interface:IGaCreateServiceCreates a plainTextgraphics algorithm with the given text. Default values have been reset, so you can use your styles, seeAbstractStyle.- Specified by:
createPlainTextin interfaceIGaCreateService- Parameters:
gaContainer- the container for the new graphics algorithmvalue- initial text- Returns:
- the new text
- See Also:
Style,IGaCreateService.createStyle(StyleContainer, String)
-
createTextStyleRegion
public TextStyleRegion createTextStyleRegion(AbstractText abstractText)
Description copied from interface:IGaCreateServiceCreates aTextStyleRegion. The style is aggregated under the given abstract text.- Specified by:
createTextStyleRegionin interfaceIGaCreateService- Parameters:
abstractText- container text- Returns:
- the newly created text style region
- Since:
- 0.10
- See Also:
TextStyleRegion,IGaCreateService.createTextStyleRegion(AbstractText, int, int)
-
createTextStyleRegion
public TextStyleRegion createTextStyleRegion(AbstractText abstractText, int start, int end)
Description copied from interface:IGaCreateServiceCreates aTextStyleRegionwith the given bounds. The style is aggregated under the given abstract text.- Specified by:
createTextStyleRegionin interfaceIGaCreateService- Parameters:
abstractText- container textstart- region startend- retion end- Returns:
- the newly created text style region
- Since:
- 0.10
- See Also:
TextStyleRegion
-
createTextStyle
public TextStyle createTextStyle(TextStyleRegion region)
Description copied from interface:IGaCreateServiceCreates aTextStyle. The style is aggregated under the given text style region.- Specified by:
createTextStylein interfaceIGaCreateService- Parameters:
region- container region- Returns:
- the newly created text style
- Since:
- 0.10
- See Also:
TextStyle,IGaCreateService.createTextStyle(TextStyleRegion, boolean, boolean, UnderlineStyle)
-
createTextStyle
public TextStyle createTextStyle(TextStyleRegion region, boolean underline, boolean strikeout, UnderlineStyle underlineStyle)
Description copied from interface:IGaCreateServiceCreates aTextStylewith the given values. The style is aggregated under the given text style region.- Specified by:
createTextStylein 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:
TextStyle,IGaCreateService.createStyle(StyleContainer, String)
-
deleteFont
public final void deleteFont(AbstractText abstractText)
-
deleteFont
public final void deleteFont(Font font)
Description copied from interface:IGaServiceDeletes the given font.- Specified by:
deleteFontin interfaceIGaService- Parameters:
font- the font to delete
-
deleteColor
public final void deleteColor(Color color)
Description copied from interface:IGaServiceDeletes the given color.- Specified by:
deleteColorin interfaceIGaService- Parameters:
color- the color to delete
-
deleteRenderingStyle
public final void deleteRenderingStyle(AbstractStyle abstractStyle)
Description copied from interface:IGaServiceDeletes the RenderingStyle from the given AbstractStyle.- Specified by:
deleteRenderingStylein interfaceIGaService- Parameters:
abstractStyle- the abstract style from which to delete the RenderingStyle.
-
findStyle
public final Style findStyle(StyleContainer styleContainer, java.lang.String id)
Description copied from interface:IGaServiceSearches for a style with the given id. The search scope is the given style container (which will usually be the diagram).- Specified by:
findStylein interfaceIGaService- Parameters:
styleContainer- the style containerid- style id- Returns:
- the found style; null if not found
-
getRotation
public final double getRotation(AbstractText at, boolean checkStyles)
Description copied from interface:IGaServiceGets the rotation angle.- Specified by:
getRotationin interfaceIGaService- Parameters:
at- the abstract textcheckStyles- the check styles- Returns:
- the angle
- Since:
- 0.11
-
getBackgroundColor
public final Color getBackgroundColor(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceGets the background color.- Specified by:
getBackgroundColorin interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- the background color
-
getFont
public final Font getFont(AbstractText at, boolean checkStyles)
Description copied from interface:IGaServiceGets the font.- Specified by:
getFontin interfaceIGaService- Parameters:
at- the abstract textcheckStyles- the check styles- Returns:
- the font
-
getForegroundColor
public final Color getForegroundColor(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceGets the foreground color.- Specified by:
getForegroundColorin interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- the foreground color
-
getHorizontalAlignment
public final Orientation getHorizontalAlignment(AbstractText at, boolean checkStyles)
Description copied from interface:IGaServiceGets the horizontal alignment.- Specified by:
getHorizontalAlignmentin interfaceIGaService- Parameters:
at- the abstract textcheckStyles- the check styles- Returns:
- the horizontal alignment
-
getLineStyle
public final LineStyle getLineStyle(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceGets the line style.- Specified by:
getLineStylein interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- the line style
-
getLineWidth
public final int getLineWidth(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceGets the line width.- Specified by:
getLineWidthin interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- the line width
-
getRenderingStyle
public final RenderingStyle getRenderingStyle(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceGets the rendering style.- Specified by:
getRenderingStylein interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- the rendering style
-
getTransparency
public final double getTransparency(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceGets the transparency.- Specified by:
getTransparencyin interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- the transparency
-
getVerticalAlignment
public final Orientation getVerticalAlignment(AbstractText at, boolean checkStyles)
Description copied from interface:IGaServiceGets the vertical alignment.- Specified by:
getVerticalAlignmentin interfaceIGaService- Parameters:
at- the abstract textcheckStyles- the check styles- Returns:
- the vertical alignment
-
resetAll
public final void resetAll(AbstractStyle abstractStyle)
Description copied from interface:IGaServiceSets the providedAbstractStyle(could be aGraphicsAlgorithmor aStyle) to ignore all locally set attributes and instead use the ones provided by the style set to theAbstractStyle.- Specified by:
resetAllin interfaceIGaService- Parameters:
abstractStyle- The abstract style (style or graphics algorithm)
-
isFilled
public final boolean isFilled(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceChecks if is filled.- Specified by:
isFilledin interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- true, if is filled
-
isLineVisible
public final boolean isLineVisible(GraphicsAlgorithm ga, boolean checkStyles)
Description copied from interface:IGaServiceChecks if line is visible.- Specified by:
isLineVisiblein interfaceIGaService- Parameters:
ga- the graphics algorithmcheckStyles- the check styles- Returns:
- true, if line is visible
-
isProportional
public final boolean isProportional(Image image, boolean checkStyles)
Description copied from interface:IGaServiceChecks if is proportional.- Specified by:
isProportionalin interfaceIGaService- Parameters:
image- the imagecheckStyles- the check styles- Returns:
- true, if is proportional
-
isStretchH
public final boolean isStretchH(Image image, boolean checkStyles)
Description copied from interface:IGaServiceChecks if is stretch h.- Specified by:
isStretchHin interfaceIGaService- Parameters:
image- the imagecheckStyles- the check styles- Returns:
- true, if is stretch h
-
isStretchV
public final boolean isStretchV(Image image, boolean checkStyles)
Description copied from interface:IGaServiceChecks if is stretch v.- Specified by:
isStretchVin interfaceIGaService- Parameters:
image- the imagecheckStyles- the check styles- Returns:
- true, if is stretch v
-
manageColor
public final Color manageColor(Diagram diagram, IColorConstant colorConstant)
Description copied from interface:IGaServiceProvides 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:
manageColorin interfaceIGaService- Parameters:
diagram- the diagram that aggregates the colorscolorConstant- which contains the RGB values.- Returns:
- the color instance
-
manageColor
public final Color manageColor(Diagram diagram, int red, int green, int blue)
Description copied from interface:IGaServiceProvides 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:
manageColorin interfaceIGaService- Parameters:
diagram- the diagram that aggregates the colorsred- the redgreen- the greenblue- the blue- Returns:
- the color instance
-
manageDefaultFont
public final Font manageDefaultFont(Diagram diagram)
Description copied from interface:IGaServiceProvides 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:
manageDefaultFontin interfaceIGaService- Parameters:
diagram- the diagram that aggregates the fonts- Returns:
- the font instance
-
manageDefaultFont
public final Font manageDefaultFont(Diagram diagram, boolean isItalic, boolean isBold)
Description copied from interface:IGaServiceProvides 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:
manageDefaultFontin interfaceIGaService- Parameters:
diagram- the diagram that aggregates the fontsisItalic- the is italicisBold- the is bold- Returns:
- the font instance
-
manageFont
public final Font manageFont(Diagram diagram, java.lang.String name, int size)
Description copied from interface:IGaServiceProvides 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:
manageFontin 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, java.lang.String name, int size, boolean isItalic, boolean isBold)
Description copied from interface:IGaServiceProvides 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:
manageFontin 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
public final void movePolylinePoint(Polyline polyline, int index, int deltaX, int deltaY)
Description copied from interface:IGaServiceMove polyline point.- Specified by:
movePolylinePointin interfaceIGaService- Parameters:
polyline- the polylineindex- the indexdeltaX- the delta xdeltaY- the delta y
-
setDefaultGraphicsAlgorithmAttributes
protected void setDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm graphicsAlgorithm)
Sets the default attributes of the newly created GraphitiGraphicsAlgorithms. The default implementation sets the location (X and Y values) and the size (Width and height values) to 0, theLineStyletosolid, the line width to 1 and the transparency to 0.- Parameters:
graphicsAlgorithm- theGraphicsAlgorithmto set the defaults for
-
setDefaultTextAttributes
protected void setDefaultTextAttributes(Diagram diagram, AbstractText abstractText, boolean createFont)
Sets the default attributes of newly createdAbstractTextgraphics algorithms (TextandMultiText). The default implementation sets the default attributes for all graphics algorithmssetDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm), filled tofalseand the font toIGaService.DEFAULT_FONTwith sizeIGaService.DEFAULT_FONT_SIZE(Arial in size 8).- Parameters:
diagram- the diagram to use for managing theFontabstractText- theAbstractTextto set the attributes forcreateFont-truein case the font shall be created,falseotherwise
-
setHeight
public final void setHeight(GraphicsAlgorithm ga, int height)
Description copied from interface:IGaLayoutServiceSets the height of the given graphics algorithm.- Specified by:
setHeightin interfaceIGaLayoutService- Parameters:
ga- graphics algorithmheight- the new height
-
setLocationAndSize
public final void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height)
Description copied from interface:IGaLayoutServiceSets location and size of the given graphics algorithm.- Specified by:
setLocationAndSizein 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:IGaLayoutServiceSets location and size of the given graphics algorithm.- Specified by:
setLocationAndSizein 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
public final void setLocation(GraphicsAlgorithm ga, int x, int y)
Description copied from interface:IGaLayoutServiceSets the location of the given graphics algorithm.- Specified by:
setLocationin interfaceIGaLayoutService- Parameters:
ga- graphics algorithmx- the new x coordinatey- the new y coordinate
-
setLocation
public final void setLocation(GraphicsAlgorithm ga, int x, int y, boolean avoidNegativeCoordinates)
Description copied from interface:IGaLayoutServiceSets the location of the given graphics algorithm.- Specified by:
setLocationin interfaceIGaLayoutService- Parameters:
ga- graphics algorithmx- the new x coordinatey- the new y coordinateavoidNegativeCoordinates- if TRUE, a negative coordinate will automatically set to 0.
-
setSize
public final void setSize(GraphicsAlgorithm ga, int width, int height)
Description copied from interface:IGaLayoutServiceSets the size of the given graphics algorithm.- Specified by:
setSizein interfaceIGaLayoutService- Parameters:
ga- graphics algorithmwidth- the new widthheight- the new height
-
setWidth
public final void setWidth(GraphicsAlgorithm ga, int width)
Description copied from interface:IGaLayoutServiceSets the width of the given graphics algorithm.- Specified by:
setWidthin interfaceIGaLayoutService- Parameters:
ga- graphics algorithmwidth- the new width
-
setRenderingStyle
public final void setRenderingStyle(AbstractStyle abstractStyle, AdaptedGradientColoredAreas adaptedGradientColoredAreas)
Description copied from interface:IGaServiceSets a RenderingStyle with given adapted gradient colored areas for the givenAbstractStyle. TheAdaptedGradientColoredAreasare defined and created inPredefinedColoredAreas.- Specified by:
setRenderingStylein interfaceIGaService- Parameters:
abstractStyle- the abstract style for which to set the rendering style.adaptedGradientColoredAreas- TheAdaptedGradientColoredAreasgradient colored areas.
-
-