|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.graphiti.services.impl.GaServiceImpl
public class GaServiceImpl
Provides the default implementation for the Graphiti
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.
Field Summary |
---|
Fields inherited from interface org.eclipse.graphiti.services.IGaService |
---|
DEFAULT_FONT, DEFAULT_FONT_SIZE |
Constructor Summary | |
---|---|
GaServiceImpl()
|
Method Summary | |
---|---|
private static IDimension |
calculatePolylineMinSize(Polyline polyline)
|
IDimension |
calculateSize(GraphicsAlgorithm ga)
Calculates the size of the given graphics algorithm. |
IDimension |
calculateSize(GraphicsAlgorithm ga,
boolean considerLineWidth)
Calculates the size of the given graphics algorithm. |
MultiText |
createDefaultMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer)
Creates a MultiText graphics algorithm with the default font
(Arial, size 8). |
MultiText |
createDefaultMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
String value)
Creates a MultiText graphics algorithm with the default font
(Arial, size 8) and the given text. |
Text |
createDefaultText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer)
Creates a Text graphics algorithm with the default font (Arial,
size 8). |
Text |
createDefaultText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
String value)
Creates a Text graphics algorithm with the default font (Arial,
size 8) and the given text. |
Ellipse |
createEllipse(GraphicsAlgorithmContainer gaContainer)
Creates an Ellipse graphics algorithm. |
Image |
createImage(GraphicsAlgorithmContainer gaContainer,
String imageId)
Creates a Image graphics algorithm with the given image id. |
Rectangle |
createInvisibleRectangle(PictogramElement pe)
Create an invisible Rectangle . |
MultiText |
createMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
String value,
String fontName,
int fontSize)
Creates a MultiText graphics algorithm with the given text and
font. |
MultiText |
createMultiText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
String value,
String fontName,
int fontSize,
boolean isFontItalic,
boolean isFontBold)
Creates a MultiText graphics algorithm with the given text and
font. |
MultiText |
createMultiText(GraphicsAlgorithmContainer gaContainer)
Creates a MultiText graphics algorithm. |
MultiText |
createMultiText(GraphicsAlgorithmContainer gaContainer,
String value)
Creates a MultiText graphics algorithm with the given text. |
Ellipse |
createPlainEllipse(GraphicsAlgorithmContainer gaContainer)
Creates a plain Ellipse graphics algorithm. |
Image |
createPlainImage(GraphicsAlgorithmContainer gaContainer,
String imageId)
Creates a plain Image graphics algorithm with the given image id. |
MultiText |
createPlainMultiText(GraphicsAlgorithmContainer gaContainer)
Creates a plain MultiText graphics algorithm. |
MultiText |
createPlainMultiText(GraphicsAlgorithmContainer gaContainer,
String value)
Creates a plain MultiText graphics algorithm with the given text. |
PlatformGraphicsAlgorithm |
createPlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer,
String id)
Creates the plain PlatformGraphicsAlgorithm . |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer)
Creates a plain Polygon graphics algorithm. |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer,
Collection<Point> points)
Creates a plain Polygon graphics algorithm with the given points. |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a plain Polygon graphics algorithm with the given points. |
Polygon |
createPlainPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a plain Polygon graphics algorithm with the given points. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer)
Creates a plain Polyline graphics algorithm. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer,
Collection<Point> points)
Creates a plain Polyline graphics algorithm with the given
points. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a plain polyline graphics algorithm with the given points. |
Polyline |
createPlainPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a plain Polyline graphics algorithm with the given
points. |
Rectangle |
createPlainRectangle(GraphicsAlgorithmContainer gaContainer)
Creates a plain Rectangle graphics algorithm. |
RoundedRectangle |
createPlainRoundedRectangle(GraphicsAlgorithmContainer gaContainer,
int cornerWidth,
int cornerHeight)
Creates a plain RoundedRectangle graphics algorithm with the
given corner dimensions. |
Style |
createPlainStyle(StyleContainer styleContainer,
String id)
Creates a Style with the given id. |
private AbstractText |
createPlainText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
boolean multiText,
String value)
|
Text |
createPlainText(GraphicsAlgorithmContainer gaContainer)
Creates a plain Text graphics algorithm with empty text. |
Text |
createPlainText(GraphicsAlgorithmContainer gaContainer,
String value)
Creates a plain Text graphics algorithm with the given text. |
PlatformGraphicsAlgorithm |
createPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer,
String id)
Creates the PlatformGraphicsAlgorithm . |
Point |
createPoint(int x,
int y)
Creates a Point datatype for the given x/y coordinates. |
Point |
createPoint(int x,
int y,
int before,
int after)
Creates a Point datatype for the given x/y coordinates. |
List<Point> |
createPointList(int[] xy)
Creates a list of Point datatypes for the given x/y coordinates. |
List<Point> |
createPointList(int[] xy,
int[] beforeAfter)
Creates a list of Point datatypes for the given x/y coordinates. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer)
Creates a Polygon graphics algorithm. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer,
Collection<Point> points)
Creates a Polygon graphics algorithm with the given points. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a Polygon graphics algorithm with the given points. |
Polygon |
createPolygon(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a Polygon graphics algorithm with the given points. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer)
Creates a Polyline graphics algorithm. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer,
Collection<Point> points)
Creates a Polyline graphics algorithm with the given points. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy)
Creates a Polyline graphics algorithm with the given points. |
Polyline |
createPolyline(GraphicsAlgorithmContainer gaContainer,
int[] xy,
int[] beforeAfter)
Creates a Polyline graphics algorithm with the given points. |
Rectangle |
createRectangle(GraphicsAlgorithmContainer gaContainer)
Creates a Rectangle graphics algorithm. |
RoundedRectangle |
createRoundedRectangle(GraphicsAlgorithmContainer gaContainer,
int cornerWidth,
int cornerHeight)
Creates a RoundedRectangle graphics algorithm with the given
corner dimensions. |
Color |
createShiftedColor(Color color,
int shift,
Diagram diagram)
Shifts the Color darker or lighter. |
IColorConstant |
createShiftedColor(IColorConstant colorConstant,
int shift)
Shifts the Color constant darker or lighter. |
Style |
createStyle(StyleContainer styleContainer,
String id)
Creates a Style with the given id. |
private AbstractText |
createText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
boolean multiText,
String value,
boolean createFont)
|
Text |
createText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
String value,
String fontName,
int fontSize)
Creates a Text graphics algorithm with the given text and font. |
Text |
createText(Diagram diagram,
GraphicsAlgorithmContainer gaContainer,
String value,
String fontName,
int fontSize,
boolean isFontItalic,
boolean isFontBold)
Creates a Text graphics algorithm with the given text and font. |
Text |
createText(GraphicsAlgorithmContainer gaContainer)
Creates a Text graphics algorithm with empty text. |
Text |
createText(GraphicsAlgorithmContainer gaContainer,
String value)
Creates a Text graphics algorithm with the given text. |
TextStyle |
createTextStyle(TextStyleRegion region)
Creates a TextStyle . |
TextStyle |
createTextStyle(TextStyleRegion region,
boolean underline,
boolean strikeout,
UnderlineStyle underlineStyle)
Creates a TextStyle with the given values. |
TextStyleRegion |
createTextStyleRegion(AbstractText abstractText)
Creates a TextStyleRegion . |
TextStyleRegion |
createTextStyleRegion(AbstractText abstractText,
int start,
int end)
Creates a TextStyleRegion with the given bounds. |
void |
deleteColor(Color color)
Deletes the given color. |
private void |
deleteEObject(EObject eo)
|
void |
deleteFont(AbstractText abstractText)
|
void |
deleteFont(Font font)
Deletes the given font. |
void |
deleteRenderingStyle(AbstractStyle abstractStyle)
Deletes the RenderingStyle from the given AbstractStyle. |
Style |
findStyle(StyleContainer styleContainer,
String id)
Searches for a style with the given id. |
private static int |
fitColorInt(int c)
|
int |
getAngle(AbstractText at,
boolean checkStyles)
Gets the angle. |
private static Integer |
getAngle(Style style)
|
Color |
getBackgroundColor(GraphicsAlgorithm ga,
boolean checkStyles)
Gets the background color. |
private static Color |
getBackgroundColor(Style style)
|
Font |
getFont(AbstractText at,
boolean checkStyles)
Gets the font. |
private static Font |
getFont(Style style)
|
Color |
getForegroundColor(GraphicsAlgorithm ga,
boolean checkStyles)
Gets the foreground color. |
private static Color |
getForegroundColor(Style style)
|
Orientation |
getHorizontalAlignment(AbstractText at,
boolean checkStyles)
Gets the horizontal alignment. |
private static Orientation |
getHorizontalAlignment(Style style)
|
LineStyle |
getLineStyle(GraphicsAlgorithm ga,
boolean checkStyles)
Gets the line style. |
private static LineStyle |
getLineStyle(Style style)
|
int |
getLineWidth(GraphicsAlgorithm ga,
boolean checkStyles)
Gets the line width. |
private static Integer |
getLineWidth(Style style)
|
RenderingStyle |
getRenderingStyle(GraphicsAlgorithm ga,
boolean checkStyles)
Gets the rendering style. |
private static RenderingStyle |
getRenderingStyle(Style style)
|
double |
getRotation(AbstractText at,
boolean checkStyles)
Gets the angle. |
private static Double |
getRotation(Style style)
|
double |
getTransparency(GraphicsAlgorithm ga,
boolean checkStyles)
Gets the transparency. |
private static Double |
getTransparency(Style style)
|
Orientation |
getVerticalAlignment(AbstractText at,
boolean checkStyles)
Gets the vertical alignment. |
private static Orientation |
getVerticalAlignment(Style style)
|
boolean |
isFilled(GraphicsAlgorithm ga,
boolean checkStyles)
Checks if is filled. |
private static Boolean |
isFilled(Style style)
|
boolean |
isLineVisible(GraphicsAlgorithm ga,
boolean checkStyles)
Checks if line is visible. |
private static Boolean |
isLineVisible(Style style)
|
boolean |
isProportional(Image image,
boolean checkStyles)
Checks if is proportional. |
private static Boolean |
isProportional(Style style)
|
boolean |
isStretchH(Image image,
boolean checkStyles)
Checks if is stretch h. |
private static Boolean |
isStretchH(Style style)
|
boolean |
isStretchV(Image image,
boolean checkStyles)
Checks if is stretch v. |
private static Boolean |
isStretchV(Style style)
|
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. |
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. |
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. |
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. |
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. |
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. |
void |
movePolylinePoint(Polyline polyline,
int index,
int deltaX,
int deltaY)
Move polyline point. |
void |
resetAll(AbstractStyle abstractStyle)
Sets the provided AbstractStyle (could be a
GraphicsAlgorithm or a Style ) to ignore all locally set
attributes and instead use the ones provided by the style set to the
AbstractStyle . |
private static void |
setContainer(GraphicsAlgorithm ga,
GraphicsAlgorithmContainer gaContainer)
|
protected void |
setDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm graphicsAlgorithm)
Sets the default attributes of the newly created Graphiti GraphicsAlgorithm s. |
protected void |
setDefaultTextAttributes(Diagram diagram,
AbstractText abstractText,
boolean createFont)
Sets the default attributes of newly created AbstractText
graphics algorithms (Text and MultiText ). |
void |
setHeight(GraphicsAlgorithm ga,
int height)
Sets the height of the given graphics algorithm. |
void |
setLocation(GraphicsAlgorithm ga,
int x,
int y)
Sets the location of the given graphics algorithm. |
void |
setLocation(GraphicsAlgorithm ga,
int x,
int y,
boolean avoidNegativeCoordinates)
Sets the location of the given graphics algorithm. |
void |
setLocationAndSize(GraphicsAlgorithm ga,
int x,
int y,
int width,
int height)
Sets location and size of the given graphics algorithm. |
void |
setLocationAndSize(GraphicsAlgorithm ga,
int x,
int y,
int width,
int height,
boolean avoidNegativeCoordinates)
Sets location and size of the given graphics algorithm. |
void |
setRenderingStyle(AbstractStyle abstractStyle,
AdaptedGradientColoredAreas adaptedGradientColoredAreas)
Sets a RenderingStyle with given adapted gradient colored areas for the given AbstractStyle . |
void |
setSize(GraphicsAlgorithm ga,
int width,
int height)
Sets the size of the given graphics algorithm. |
void |
setWidth(GraphicsAlgorithm ga,
int width)
Sets the width of the given graphics algorithm. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GaServiceImpl()
Method Detail |
---|
private static final IDimension calculatePolylineMinSize(Polyline polyline)
private static final int fitColorInt(int c)
private static final Integer getAngle(Style style)
private static final Double getRotation(Style style)
private static final Color getBackgroundColor(Style style)
private static final Font getFont(Style style)
private static final Color getForegroundColor(Style style)
private static final Orientation getHorizontalAlignment(Style style)
private static final LineStyle getLineStyle(Style style)
private static final Integer getLineWidth(Style style)
private static final RenderingStyle getRenderingStyle(Style style)
private static final Double getTransparency(Style style)
private static final Orientation getVerticalAlignment(Style style)
private static final Boolean isFilled(Style style)
private static final Boolean isLineVisible(Style style)
private static final Boolean isProportional(Style style)
private static final Boolean isStretchH(Style style)
private static final Boolean isStretchV(Style style)
private static final void setContainer(GraphicsAlgorithm ga, GraphicsAlgorithmContainer gaContainer)
public final IDimension calculateSize(GraphicsAlgorithm ga)
IGaLayoutService
calculateSize
in interface IGaLayoutService
ga
- graphics algorithm
public final IDimension calculateSize(GraphicsAlgorithm ga, boolean considerLineWidth)
IGaLayoutService
calculateSize
in interface IGaLayoutService
ga
- graphics algorithmconsiderLineWidth
- if TRUE, the line width will be considered in the dimension
public final MultiText createDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)
IGaCreateService
MultiText
graphics algorithm with the default font
(Arial, size 8). Use this method only if you want to use the default
text, otherwise use IGaCreateService.createMultiText(GraphicsAlgorithmContainer)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value:""
name: Arial
size: 8
italic: false
bold: false
createDefaultMultiText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithm
public final MultiText createDefaultMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value)
IGaCreateService
MultiText
graphics algorithm with the default font
(Arial, size 8) and the given text. Use this method only if you want to
use the default text, otherwise use
IGaCreateService.createMultiText(GraphicsAlgorithmContainer, String)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: Arial
size: 8
italic: false
bold: false
createDefaultMultiText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmvalue
- initial text
public final Text createDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Text
graphics algorithm with the default font (Arial,
size 8). Use this method only if you want to use the default text,
otherwise use IGaCreateService.createText(GraphicsAlgorithmContainer)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value:""
name: Arial
size: 8
italic: false
bold: false
createDefaultText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithm
public final Text createDefaultText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value)
IGaCreateService
Text
graphics algorithm with the default font (Arial,
size 8) and the given text. Use this method only if you want to use the
default text, otherwise use
IGaCreateService.createText(GraphicsAlgorithmContainer, String)
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: Arial
size: 8
italic: false
bold: false
createDefaultText
in interface IGaCreateService
diagram
- the diagram to manage the fontgaContainer
- the container for the new graphics algorithmvalue
- initial text
public final Ellipse createEllipse(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Ellipse
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createEllipse
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
public final Ellipse createPlainEllipse(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Ellipse
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.
createPlainEllipse
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Image createImage(GraphicsAlgorithmContainer gaContainer, String imageId)
IGaCreateService
Image
graphics algorithm with the given image id.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
id: TEST
stretchH: false
stretchV: false
proportional: false
createImage
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmimageId
- the image id
public final Image createPlainImage(GraphicsAlgorithmContainer gaContainer, String imageId)
IGaCreateService
Image
graphics algorithm with the given image id.
Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainImage
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmimageId
- the image id
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Rectangle createInvisibleRectangle(PictogramElement pe)
IGaCreateService
Rectangle
.
The following values are set by default when it is shown:
lineWidth: 1
lineStyle: SOLID
filled: false
lineVisible: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createInvisibleRectangle
in interface IGaCreateService
pe
- the pictogram element to create the rectangle
public final MultiText createMultiText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
MultiText
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: ""
createMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
public final MultiText createPlainMultiText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
MultiText
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.
createPlainMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final MultiText createMultiText(GraphicsAlgorithmContainer gaContainer, String value)
IGaCreateService
MultiText
graphics algorithm with the given text.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
createMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial text
public final MultiText createPlainMultiText(GraphicsAlgorithmContainer gaContainer, String value)
IGaCreateService
MultiText
graphics algorithm with the given text.
Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainMultiText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial text
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize)
IGaCreateService
MultiText
graphics algorithm with the given text and
font. The font will be displayed in straight (no italics or bold) and
will be managed within the given diagram; in case the font already exists
it will be reused, otherwise the corresponding font instance will be
created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: false
bold: false
createMultiText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text field
public final MultiText createMultiText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)
IGaCreateService
MultiText
graphics algorithm with the given text and
font. The font will be managed within the given diagram; in case the font
already exists it will be reused, otherwise the corresponding font
instance will be created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: isFontItalic
bold: isFontBold
createMultiText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text fieldisFontItalic
- flag if the font to use for the new text field should be
italic or notisFontBold
- flag if the font to use for the new text field should be bold
or not
public final PlatformGraphicsAlgorithm createPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, String id)
IGaCreateService
PlatformGraphicsAlgorithm
.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
id: id
createPlatformGraphicsAlgorithm
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmid
- the id
public final PlatformGraphicsAlgorithm createPlainPlatformGraphicsAlgorithm(GraphicsAlgorithmContainer gaContainer, String id)
IGaCreateService
PlatformGraphicsAlgorithm
. Default values have
been reset, so you can use your styles, see AbstractStyle
.
createPlainPlatformGraphicsAlgorithm
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmid
- the id
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Point createPoint(int x, int y)
IGaCreateService
Point
datatype for the given x/y coordinates.
createPoint
in interface IGaCreateService
x
- the x coordinatey
- the y coordinate
public final Point createPoint(int x, int y, int before, int after)
IGaCreateService
Point
datatype for the given x/y coordinates. The
additional before/after parameters defined at which distance before/after
the point a rounded curve will start/end.
Note, that before/after parameters have only an effect, if the graphics
algorithm support them, e.g. polygon and polyline.
createPoint
in interface IGaCreateService
x
- the x coordinatey
- the y coordinatebefore
- the distance before, if supportedafter
- the distance after, if supported
public final List<Point> createPointList(int[] xy)
IGaCreateService
Point
datatypes for the given x/y coordinates.
createPointList
in interface IGaCreateService
xy
- The x/y coordinates: [x0, y0, ...,xN, yN]
public final List<Point> createPointList(int[] xy, int[] beforeAfter)
IGaCreateService
Point
datatypes for the given x/y coordinates.
Note, that before/after parameters have only an effect, if the graphics
algorithm support them, e.g. polygon and polyline.
createPointList
in interface IGaCreateService
xy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polygon
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polygon
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.
createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, Collection<Point> points)
IGaCreateService
Polygon
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of point
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, Collection<Point> points)
IGaCreateService
Polygon
graphics algorithm with the given points.
Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of point
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
Polygon
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
Polygon
graphics algorithm with the given points.
Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polygon createPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polygon
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: true
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]
public final Polygon createPlainPolygon(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polygon
graphics algorithm with the given points.
Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainPolygon
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polyline
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Polyline
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.
createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, Collection<Point> points)
IGaCreateService
Polyline
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of point
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, Collection<Point> points)
IGaCreateService
Polyline
graphics algorithm with the given
points. Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmpoints
- collection of point
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
Polyline
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy)
IGaCreateService
AbstractStyle
.
createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Polyline createPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polyline
graphics algorithm with the given points.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]
public final Polyline createPlainPolyline(GraphicsAlgorithmContainer gaContainer, int[] xy, int[] beforeAfter)
IGaCreateService
Polyline
graphics algorithm with the given
points. Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainPolyline
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmxy
- The x/y coordinates: [x0, y0, ..., xN, yN]beforeAfter
- The before/after parameters: [before0, after0, ..., beforeN,
afterN]
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Rectangle createRectangle(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Rectangle
graphics algorithm.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
createRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
public final Rectangle createPlainRectangle(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Rectangle
graphics algorithm. Default values have
been reset, so you can use your styles, see AbstractStyle
.
createPlainRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final RoundedRectangle createRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)
IGaCreateService
RoundedRectangle
graphics algorithm with the given
corner dimensions.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
cornerHeight: cornerHeight
cornerWidth: cornerWidth
createRoundedRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmcornerWidth
- the corner widthcornerHeight
- the corner height
public final RoundedRectangle createPlainRoundedRectangle(GraphicsAlgorithmContainer gaContainer, int cornerWidth, int cornerHeight)
IGaCreateService
RoundedRectangle
graphics algorithm with the
given corner dimensions. Default values have been reset, so you can use
your styles, see AbstractStyle
.
createPlainRoundedRectangle
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmcornerWidth
- the corner widthcornerHeight
- the corner height
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Color createShiftedColor(Color color, int shift, Diagram diagram)
IGaCreateService
Color
darker or lighter.
createShiftedColor
in interface IGaCreateService
color
- the color to be changedshift
- negative shifts means darken the colordiagram
- the diagram
public final IColorConstant createShiftedColor(IColorConstant colorConstant, int shift)
IGaCreateService
Color
constant darker or lighter.
createShiftedColor
in interface IGaCreateService
colorConstant
- the color constant to be changedshift
- negative shifts means darken the color
public final Style createStyle(StyleContainer styleContainer, String id)
IGaCreateService
Style
with the given id. The style is aggregated under
the given container style.
The following values are set by default:
lineStyle: SOLID
id: id
horizontalAlignment: ALIGNMENT_CENTER
verticalAlignment: ALIGNMENT_CENTER
createStyle
in interface IGaCreateService
styleContainer
- container styleid
- style id
public final Style createPlainStyle(StyleContainer styleContainer, String id)
IGaCreateService
Style
with the given id. The style is aggregated under
the given container style. Default values have been reset, so you can use
your styles, see AbstractStyle
.
createPlainStyle
in interface IGaCreateService
styleContainer
- container styleid
- style id
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public final Text createText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Text
graphics algorithm with empty text.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: ""
createText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
public final Text createPlainText(GraphicsAlgorithmContainer gaContainer)
IGaCreateService
Text
graphics algorithm with empty text. Default
values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithm
Style
,
IGaCreateService.createStyle(StyleContainer, String)
private final AbstractText createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, boolean multiText, String value, boolean createFont)
private final AbstractText createPlainText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, boolean multiText, String value)
public final Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize)
IGaCreateService
Text
graphics algorithm with the given text and font.
The font will be displayed in straight (no italics or bold) and will be
managed within the given diagram; in case the font already exists it will
be reused, otherwise the corresponding font instance will be created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: false
bold: false
createText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text field
public final Text createText(Diagram diagram, GraphicsAlgorithmContainer gaContainer, String value, String fontName, int fontSize, boolean isFontItalic, boolean isFontBold)
IGaCreateService
Text
graphics algorithm with the given text and font.
The font will be managed within the given diagram; in case the font
already exists it will be reused, otherwise the corresponding font
instance will be created.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
name: fontNamel
size: fontSize
italic: isFontItalic
bold: isFontBold
createText
in interface IGaCreateService
diagram
- the diagram that shall be used for managing the font for the
new text fieldgaContainer
- the container for the new graphics algorithmvalue
- initial textfontName
- the name of the font to use for the new text fieldfontSize
- the size of the font to use for the new text fieldisFontItalic
- flag if the font to use for the new text field should be
italic or notisFontBold
- flag if the font to use for the new text field should be bold
or not
public final Text createText(GraphicsAlgorithmContainer gaContainer, String value)
IGaCreateService
Text
graphics algorithm with the given text.
The following values are set by default:
lineWidth: 1
lineStyle: SOLID
filled: false
transparency: 0.0
width: 0
height: 0
x: 0
y: 0
horizontalAlignment: ALIGNMENT_LEFT
verticalAlignment: ALIGNMENT_CENTER
angle: 0
value: value
createText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial text
public final Text createPlainText(GraphicsAlgorithmContainer gaContainer, String value)
IGaCreateService
Text
graphics algorithm with the given text.
Default values have been reset, so you can use your styles, see
AbstractStyle
.
createPlainText
in interface IGaCreateService
gaContainer
- the container for the new graphics algorithmvalue
- initial text
Style
,
IGaCreateService.createStyle(StyleContainer, String)
public TextStyleRegion createTextStyleRegion(AbstractText abstractText)
IGaCreateService
TextStyleRegion
. The style is aggregated under the
given abstract text.
createTextStyleRegion
in interface IGaCreateService
abstractText
- container text
TextStyleRegion
,
IGaCreateService.createTextStyleRegion(AbstractText, int, int)
public TextStyleRegion createTextStyleRegion(AbstractText abstractText, int start, int end)
IGaCreateService
TextStyleRegion
with the given bounds. The style is
aggregated under the given abstract text.
createTextStyleRegion
in interface IGaCreateService
abstractText
- container textstart
- region startend
- retion end
TextStyleRegion
public TextStyle createTextStyle(TextStyleRegion region)
IGaCreateService
TextStyle
. The style is aggregated under the given text
style region.
createTextStyle
in interface IGaCreateService
region
- container region
TextStyle
,
IGaCreateService.createTextStyle(TextStyleRegion, boolean, boolean, UnderlineStyle)
public TextStyle createTextStyle(TextStyleRegion region, boolean underline, boolean strikeout, UnderlineStyle underlineStyle)
IGaCreateService
TextStyle
with the given values. The style is
aggregated under the given text style region.
createTextStyle
in interface IGaCreateService
region
- container regionunderline
- the is underlinedstrikeout
- the is stroke outunderlineStyle
- the underline style
TextStyle
,
IGaCreateService.createStyle(StyleContainer, String)
public final void deleteFont(AbstractText abstractText)
public final void deleteFont(Font font)
IGaService
deleteFont
in interface IGaService
font
- the font to deletepublic final void deleteColor(Color color)
IGaService
deleteColor
in interface IGaService
color
- the color to deleteprivate final void deleteEObject(EObject eo)
public final void deleteRenderingStyle(AbstractStyle abstractStyle)
IGaService
deleteRenderingStyle
in interface IGaService
abstractStyle
- the abstract style from which to delete the RenderingStyle.public final Style findStyle(StyleContainer styleContainer, String id)
IGaService
findStyle
in interface IGaService
styleContainer
- the style containerid
- style id
public final int getAngle(AbstractText at, boolean checkStyles)
IGaService
getAngle
in interface IGaService
at
- the abstract textcheckStyles
- the check styles
public final double getRotation(AbstractText at, boolean checkStyles)
IGaService
getRotation
in interface IGaService
at
- the abstract textcheckStyles
- the check styles
public final Color getBackgroundColor(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
getBackgroundColor
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final Font getFont(AbstractText at, boolean checkStyles)
IGaService
getFont
in interface IGaService
at
- the abstract textcheckStyles
- the check styles
public final Color getForegroundColor(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
getForegroundColor
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final Orientation getHorizontalAlignment(AbstractText at, boolean checkStyles)
IGaService
getHorizontalAlignment
in interface IGaService
at
- the abstract textcheckStyles
- the check styles
public final LineStyle getLineStyle(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
getLineStyle
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final int getLineWidth(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
getLineWidth
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final RenderingStyle getRenderingStyle(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
getRenderingStyle
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final double getTransparency(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
getTransparency
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final Orientation getVerticalAlignment(AbstractText at, boolean checkStyles)
IGaService
getVerticalAlignment
in interface IGaService
at
- the abstract textcheckStyles
- the check styles
public final void resetAll(AbstractStyle abstractStyle)
IGaService
AbstractStyle
(could be a
GraphicsAlgorithm
or a Style
) to ignore all locally set
attributes and instead use the ones provided by the style set to the
AbstractStyle
.
resetAll
in interface IGaService
abstractStyle
- The abstract style (style or graphics algorithm)public final boolean isFilled(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
isFilled
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final boolean isLineVisible(GraphicsAlgorithm ga, boolean checkStyles)
IGaService
isLineVisible
in interface IGaService
ga
- the graphics algorithmcheckStyles
- the check styles
public final boolean isProportional(Image image, boolean checkStyles)
IGaService
isProportional
in interface IGaService
image
- the imagecheckStyles
- the check styles
public final boolean isStretchH(Image image, boolean checkStyles)
IGaService
isStretchH
in interface IGaService
image
- the imagecheckStyles
- the check styles
public final boolean isStretchV(Image image, boolean checkStyles)
IGaService
isStretchV
in interface IGaService
image
- the imagecheckStyles
- the check styles
public final Color manageColor(Diagram diagram, IColorConstant colorConstant)
IGaService
manageColor
in interface IGaService
diagram
- the diagram that aggregates the colorscolorConstant
- which contains the RGB values.
public final Color manageColor(Diagram diagram, int red, int green, int blue)
IGaService
manageColor
in interface IGaService
diagram
- the diagram that aggregates the colorsred
- the redgreen
- the greenblue
- the blue
public final Font manageDefaultFont(Diagram diagram)
IGaService
manageDefaultFont
in interface IGaService
diagram
- the diagram that aggregates the fonts
public final Font manageDefaultFont(Diagram diagram, boolean isItalic, boolean isBold)
IGaService
manageDefaultFont
in interface IGaService
diagram
- the diagram that aggregates the fontsisItalic
- the is italicisBold
- the is bold
public final Font manageFont(Diagram diagram, String name, int size)
IGaService
manageFont
in interface IGaService
diagram
- the diagram that aggregates the fontsname
- the name of the fontsize
- the size of the font
public final Font manageFont(Diagram diagram, String name, int size, boolean isItalic, boolean isBold)
IGaService
manageFont
in interface IGaService
diagram
- the diagram that aggregates the fontsname
- the name of the fontsize
- the size of the fontisItalic
- the is italicisBold
- the is bold
public final void movePolylinePoint(Polyline polyline, int index, int deltaX, int deltaY)
IGaService
movePolylinePoint
in interface IGaService
polyline
- the polylineindex
- the indexdeltaX
- the delta xdeltaY
- the delta yprotected void setDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm graphicsAlgorithm)
GraphicsAlgorithm
s. The default implementation sets the location
(X and Y values) and the size (Width and height values) to 0, the
LineStyle
to solid
, the line width to 1
and the transparency to 0.
graphicsAlgorithm
- the GraphicsAlgorithm
to set the defaults forprotected void setDefaultTextAttributes(Diagram diagram, AbstractText abstractText, boolean createFont)
AbstractText
graphics algorithms (Text
and MultiText
). The default
implementation sets the default attributes for all graphics algorithms
setDefaultGraphicsAlgorithmAttributes(GraphicsAlgorithm)
, filled
to false
and the font to IGaService.DEFAULT_FONT
with size IGaService.DEFAULT_FONT_SIZE
(Arial in size 8).
diagram
- the diagram to use for managing the Font
abstractText
- the AbstractText
to set the attributes forcreateFont
- true
in case the font shall be created,
false
otherwisepublic final void setHeight(GraphicsAlgorithm ga, int height)
IGaLayoutService
setHeight
in interface IGaLayoutService
ga
- graphics algorithmheight
- the new heightpublic final void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height)
IGaLayoutService
setLocationAndSize
in interface IGaLayoutService
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinatewidth
- the new widthheight
- the new heightpublic final void setLocationAndSize(GraphicsAlgorithm ga, int x, int y, int width, int height, boolean avoidNegativeCoordinates)
IGaLayoutService
setLocationAndSize
in interface IGaLayoutService
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.public final void setLocation(GraphicsAlgorithm ga, int x, int y)
IGaLayoutService
setLocation
in interface IGaLayoutService
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinatepublic final void setLocation(GraphicsAlgorithm ga, int x, int y, boolean avoidNegativeCoordinates)
IGaLayoutService
setLocation
in interface IGaLayoutService
ga
- graphics algorithmx
- the new x coordinatey
- the new y coordinateavoidNegativeCoordinates
- if TRUE, a negative coordinate will automatically set to 0.public final void setSize(GraphicsAlgorithm ga, int width, int height)
IGaLayoutService
setSize
in interface IGaLayoutService
ga
- graphics algorithmwidth
- the new widthheight
- the new heightpublic final void setWidth(GraphicsAlgorithm ga, int width)
IGaLayoutService
setWidth
in interface IGaLayoutService
ga
- graphics algorithmwidth
- the new widthpublic final void setRenderingStyle(AbstractStyle abstractStyle, AdaptedGradientColoredAreas adaptedGradientColoredAreas)
IGaService
AbstractStyle
. The AdaptedGradientColoredAreas
are
defined and created in PredefinedColoredAreas
.
setRenderingStyle
in interface IGaService
abstractStyle
- the abstract style for which to set the rendering style.adaptedGradientColoredAreas
- The AdaptedGradientColoredAreas
gradient colored
areas.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |