Class KContainerRenderingExtensions
java.lang.Object
de.cau.cs.kieler.klighd.krendering.extensions.KContainerRenderingExtensions
This class contains lots of convenient helper functions for composing and configuring
KRendering-based view models. In order to be consistent with the further extension classes
the extension methods are non-static ones requiring this class to be instantiated. Since this
class doesn't declare any fields (i.e. required memory) except the reference of further extensions
classes the instantiation should not be a problem. The instantiation may be done directly by calling
'new KContainerRenderingExtensions()' or by delegating that to a dependency injection framework.
NOTE: Do NOT introduce create extensions or other continuous memory in that class!
NOTE: Do NOT introduce create extensions or other continuous memory in that class!
- Author:
- chsch, alb
- This class contains Xtend extension methods.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends KRendering>
TaddChild(KContainerRendering parent, T child) addCustomRendering(KContainerRendering cr, Object figureObject) addEllipticalClip(KImage image) Sets aKEllipseclip shape on the providedimage.
Set area or point placement data on this (returned) ellipse as usual in order to determine the clip area.addGridBox(KContainerRendering cr, float widthHint, float heightHint, KPosition topLeft, KPosition bottomRight) addHorizontalLine(KContainerRendering cr, float leftRightAbsIndent) addHorizontalLine(KContainerRendering cr, float leftRightAbsIndent, float lineWidth) addHorizontalLine(KContainerRendering cr, PositionReferenceY y, float absIndent) addHorizontalLine(KContainerRendering cr, PositionReferenceY y, float absIndent, float lineWidth) addHorizontalSeperatorLine(KContainerRendering cr, float lineWidth, int spacing) addImage(KContainerRendering cr, Object imageObj) addImage(KContainerRendering cr, String bundleId, String imagePath) addPolygonClip(KImage image) Sets aKPolygonclip shape on the providedimage.
AddKPositionson this (returned) polygon as usual in order to determine the clip area.addPolyline(KContainerRendering cr, float lineWidth) addPolyline(KContainerRendering cr, float lineWidth, List<KPosition> points) addRectangularClip(KImage image) Sets aKRectangleclip shape on the providedimage.
Set area or point placement data on this (returned) rectangle as usual in order to determine the clip area.addRoundedRectangle(KContainerRendering cr, float cWidth, float cHeight) addRoundedRectangle(KContainerRendering cr, float cWidth, float cHeight, float lineWidth) addText(KContainerRendering cr, String text) addVerticalLine(KContainerRendering cr, PositionReferenceX x, float absIndent) addVerticalLine(KContainerRendering cr, PositionReferenceX x, float absIndent, float lineWidth) setGridPlacement(KContainerRendering cr, int cols)
-
Constructor Details
-
KContainerRenderingExtensions
public KContainerRenderingExtensions()
-
-
Method Details
-
addChild
- Returns:
- the child!
-
addChildArea
-
addArc
- Extension Category:
- composition
-
addEllipse
- Extension Category:
- composition
-
addPolygon
- Extension Category:
- composition
-
addRectangle
- Extension Category:
- composition
-
addRoundedRectangle
- Extension Category:
- composition
-
addRoundedRectangle
public KRoundedRectangle addRoundedRectangle(KContainerRendering cr, float cWidth, float cHeight, float lineWidth) - Extension Category:
- composition
-
addText
-
addImage
-
addImage
-
addRectangularClip
Sets aKRectangleclip shape on the providedimage.
Set area or point placement data on this (returned) rectangle as usual in order to determine the clip area.- Extension Category:
- composition
- Code Example:
- ...addImage(...).addRectangularClip .addAreaPlacementData.from(LEFT, 3, 0, TOP, 3, 0).to(RIGHT, 3, 0, BOTTOM, 3, 0);
-
addEllipticalClip
Sets aKEllipseclip shape on the providedimage.
Set area or point placement data on this (returned) ellipse as usual in order to determine the clip area.- Extension Category:
- composition
- Code Example:
- ...addImage(...).addEllipticalClip .addAreaPlacementData.from(LEFT, 3, 0, TOP, 3, 0).to(RIGHT, 3, 0, BOTTOM, 3, 0);
-
addPolygonClip
Sets aKPolygonclip shape on the providedimage.
AddKPositionson this (returned) polygon as usual in order to determine the clip area.- Extension Category:
- composition
- Code Example:
- ..addImage(...).addPolygonClip.addKPosition(LEFT, 3, 0, TOP, 3, 0) .addKPosition(RIGHT, 3, 0, TOP, 3, 0) .addKPosition(LEFT, 0, 0.5f, BOTTOM, 3, 0);
-
addCustomRendering
-
addCustomRendering
-
setGridPlacement
- Extension Category:
- microLayout
- Code Example:
- rectangle.setGridPlacement(1).from(LEFT, 0, 0, TOP, padding - 3, 0).to(RIGHT, 0, 0, BOTTOM, 0, 0)
-
addGridBox
public KRectangle addGridBox(KContainerRendering cr, float widthHint, float heightHint, KPosition topLeft, KPosition bottomRight) -
addPolyline
-
addPolyline
-
addPolyline
-
addHorizontalLine
-
addHorizontalLine
public KPolyline addHorizontalLine(KContainerRendering cr, float leftRightAbsIndent, float lineWidth) -
addHorizontalLine
-
addHorizontalLine
public KPolyline addHorizontalLine(KContainerRendering cr, PositionReferenceY y, float absIndent, float lineWidth) -
addVerticalLine
-
addVerticalLine
public KPolyline addVerticalLine(KContainerRendering cr, PositionReferenceX x, float absIndent, float lineWidth) -
addHorizontalSeperatorLine
-
drawArrow
-
drawTriangle
-