public interface IUiLayoutService extends ILayoutService
Modifier and Type | Method and Description |
---|---|
IDimension |
calculateTextSize(AbstractText text)
Calculates the width and height of the given text in the font of the
gievn text.
|
IDimension |
calculateTextSize(java.lang.String text,
Font font)
Calculates the width and height of the given text in the given font
ignoring any new line characters in the string.
|
IDimension |
calculateTextSize(java.lang.String text,
Font font,
boolean handleMultiline)
Calculates the width and height of the given text in the given font.
|
getConnectionMidpoint, getGaBoundsForAnchor, getLocationInfo, getLocationRelativeToDiagram, getLocationRelativeToDiagram
calculateSize, calculateSize, setHeight, setLocation, setLocation, setLocationAndSize, setLocationAndSize, setSize, setWidth
IDimension calculateTextSize(java.lang.String text, Font font)
text
- the string to calculate the rendering size forfont
- the font which should be considered for the stringIGaLayoutService.calculateSize(org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm,
boolean)
IDimension calculateTextSize(java.lang.String text, Font font, boolean handleMultiline)
text
- the string to calculate the rendering size forfont
- the font which should be considered for the stringhandleMultiline
- Defines if line breaks in the string should be used in the
calculation of the size or not. In case true
, a
new line character in the string will increase the size of the
returned dimensions by one line, in case false
a
new line character will be ignored.IDimension calculateTextSize(AbstractText text)
MultiText
new line
characters in the string will increase the height of the returned size,
otherwise (text is a Text
) any new line characters will be
ignored.text
- the AbstractText
to calculate the rendering size for