Package org.eclipse.graphiti.ui.services
Interface IUiLayoutService
-
- All Superinterfaces:
IGaLayoutService
,ILayoutService
,IPeLayoutService
- All Known Implementing Classes:
UiLayoutService
public interface IUiLayoutService extends ILayoutService
Extends the layout service interface to be able to offer layout methods which depend on UI.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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.IDimension
calculateTextSize(AbstractText text)
Calculates the width and height of the given text in the font of the gievn text.-
Methods inherited from interface org.eclipse.graphiti.services.IGaLayoutService
calculateSize, calculateSize, setHeight, setLocation, setLocation, setLocationAndSize, setLocationAndSize, setSize, setWidth
-
Methods inherited from interface org.eclipse.graphiti.services.IPeLayoutService
getConnectionMidpoint, getGaBoundsForAnchor, getLocationInfo, getLocationRelativeToDiagram, getLocationRelativeToDiagram
-
-
-
-
Method Detail
-
calculateTextSize
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.- Parameters:
text
- the string to calculate the rendering size forfont
- the font which should be considered for the string- Returns:
- See Also:
IGaLayoutService.calculateSize(org.eclipse.graphiti.mm.algorithms.GraphicsAlgorithm, boolean)
-
calculateTextSize
IDimension calculateTextSize(java.lang.String text, Font font, boolean handleMultiline)
Calculates the width and height of the given text in the given font.- Parameters:
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 casetrue
, a new line character in the string will increase the size of the returned dimensions by one line, in casefalse
a new line character will be ignored.- Returns:
- Since:
- 0.11
-
calculateTextSize
IDimension calculateTextSize(AbstractText text)
Calculates the width and height of the given text in the font of the gievn text. In case the given text is aMultiText
new line characters in the string will increase the height of the returned size, otherwise (text is aText
) any new line characters will be ignored.- Parameters:
text
- theAbstractText
to calculate the rendering size for- Returns:
- Since:
- 0.11
-
-