public class NodeStyleDecorationInstaller extends Object implements ISelectionIndicatorInstaller, IHighlightIndicatorInstaller, IFocusIndicatorInstaller
INodeStyle
to render the selection, highlight or focus indicator of nodes.
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 |
---|
NodeStyleDecorationInstaller()
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 INode . |
InsetsD |
getMargin()
Specifies the margin around the node layout.
|
INodeStyle |
getNodeStyle()
The style to use for the rendering.
|
StyleDecorationZoomPolicy |
getZoomPolicy()
Specifies how the style is affected by the current zoom level.
|
void |
setMargin(InsetsD value)
Specifies the margin around the node layout.
|
void |
setNodeStyle(INodeStyle value)
The style to use for the rendering.
|
void |
setZoomPolicy(StyleDecorationZoomPolicy value)
Specifies how the style is affected by the current zoom level.
|
public NodeStyleDecorationInstaller()
public final ICanvasObject addCanvasObject(ICanvasContext context, ICanvasObjectGroup group, Object item)
item
if it is an INode
.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 InsetsD getMargin()
Actually, the bounds rendered by the style is the original node 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 INodeStyle getNodeStyle()
Changes of the value of this property are not propagated to already created styles.
setNodeStyle(INodeStyle)
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 setMargin(InsetsD value)
Actually, the bounds rendered by the style is the original node 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 setNodeStyle(INodeStyle value)
Changes of the value of this property are not propagated to already created styles.
value
- The NodeStyle to set.getNodeStyle()
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()