public class LabelStyleDecorationInstaller extends Object implements ISelectionIndicatorInstaller, IHighlightIndicatorInstaller, IFocusIndicatorInstaller
ILabelStyle
to render the selection, highlight or focus indicator of labels.
The ZoomPolicy
property defines how the zoom level affects the rendering of the indicator. It
can either scale according to the zoom level similar to regular graph items or have always to same thickness regardless
of the zoom, similar to the default yFiles indicators.
Constructor and Description |
---|
LabelStyleDecorationInstaller()
Create a new instance of this class.
|
Modifier and Type | Method and Description |
---|---|
ICanvasObject |
addCanvasObject(ICanvasContext context,
ICanvasObjectGroup group,
Object item)
Installs a rendering for the
item if it is an ILabel . |
ILabelStyle |
getLabelStyle()
The style to use for the rendering.
|
InsetsD |
getMargin()
Specifies the margin around the label layout.
|
StyleDecorationZoomPolicy |
getZoomPolicy()
Specifies how the style is affected by the current zoom level.
|
void |
setLabelStyle(ILabelStyle value)
The style to use for the rendering.
|
void |
setMargin(InsetsD value)
Specifies the margin around the label layout.
|
void |
setZoomPolicy(StyleDecorationZoomPolicy value)
Specifies how the style is affected by the current zoom level.
|
public LabelStyleDecorationInstaller()
public final ICanvasObject addCanvasObject(ICanvasContext context, ICanvasObjectGroup group, Object item)
item
if it is an ILabel
.addCanvasObject
in interface ICanvasObjectInstaller
context
- The canvas context.group
- The canvas object group to add the newly created canvas object to.item
- The item to install.public final ILabelStyle getLabelStyle()
Changes of the value of this property are not propagated to already created styles.
setLabelStyle(ILabelStyle)
public final InsetsD getMargin()
Actually, the bounds rendered by the style is the original label layout enlarged by this margin.
Changes of the value of this property are propagated to all styles created by this instance and become immediately visible.
setMargin(InsetsD)
public final StyleDecorationZoomPolicy getZoomPolicy()
Changes of the value of this property are propagated to all styles created by this instance and become immediately visible.
setZoomPolicy(StyleDecorationZoomPolicy)
public final void setLabelStyle(ILabelStyle value)
Changes of the value of this property are not propagated to already created styles.
value
- The LabelStyle to set.getLabelStyle()
public final void setMargin(InsetsD value)
Actually, the bounds rendered by the style is the original label layout enlarged by this margin.
Changes of the value of this property are propagated to all styles created by this instance and become immediately visible.
value
- The Margin to set.getMargin()
public final void setZoomPolicy(StyleDecorationZoomPolicy value)
Changes of the value of this property are propagated to all styles created by this instance and become immediately visible.
value
- The ZoomPolicy to set.getZoomPolicy()