public class NodeStyleLabelStyleAdapter extends Object implements ILabelStyle, Cloneable
| Constructor and Description |
|---|
NodeStyleLabelStyleAdapter()
Initializes a new instance of the
NodeStyleLabelStyleAdapter class. |
NodeStyleLabelStyleAdapter(INodeStyle nodeStyle,
ILabelStyle labelStyle)
Creates a label style that uses the provided node style to render the background and the label style to render the
foreground of this style.
|
| Modifier and Type | Method and Description |
|---|---|
NodeStyleLabelStyleAdapter |
clone()
Creates a copy of this object and returns it.
|
ILabelStyle |
getLabelStyle()
Gets the
ILabelStyle that is used for rendering the foreground of the label. |
InsetsD |
getLabelStyleInsets()
Gets the insets to apply for the
LabelStyle as margins. |
INodeStyle |
getNodeStyle()
Gets the
INodeStyle that is used for rendering the background of the label. |
ILabelStyleRenderer |
getRenderer()
Gets the renderer implementation that can be queried for implementations that provide details about the visual
appearance and visual behavior for a given label and this style instance.
|
boolean |
isAutoFlippingEnabled()
Gets a value indicating whether the label should be flipped 180 degrees automatically, if it would be oriented
downwards, otherwise.
|
void |
setAutoFlippingEnabled(boolean value)
Sets a value indicating whether the label should be flipped 180 degrees automatically, if it would be oriented
downwards, otherwise.
|
void |
setLabelStyle(ILabelStyle value)
Sets the
ILabelStyle that is used for rendering the foreground of the label. |
void |
setLabelStyleInsets(InsetsD value)
Sets the insets to apply for the
LabelStyle as margins. |
void |
setNodeStyle(INodeStyle value)
Sets the
INodeStyle that is used for rendering the background of the label. |
public NodeStyleLabelStyleAdapter()
NodeStyleLabelStyleAdapter class.
This constructor uses a ShapeNodeStyle and a DefaultLabelStyle for the NodeStyle
and LabelStyle properties.
public NodeStyleLabelStyleAdapter(INodeStyle nodeStyle, ILabelStyle labelStyle)
Note that the styles will be stored by reference, thus modifying the style will directly affect the rendering of this instance.
nodeStyle - The style to use for rendering the background of the label.labelStyle - The style to use for rendering the foreground of the label.public final NodeStyleLabelStyleAdapter clone()
ICloneableclone in interface ICloneableclone in class ObjectObject.clone()public final ILabelStyle getLabelStyle()
ILabelStyle that is used for rendering the foreground of the label.setLabelStyle(ILabelStyle)public final InsetsD getLabelStyleInsets()
LabelStyle as margins.setLabelStyleInsets(InsetsD)public final INodeStyle getNodeStyle()
INodeStyle that is used for rendering the background of the label.setNodeStyle(INodeStyle)public final ILabelStyleRenderer getRenderer()
ILabelStyle
The idiom for retrieving, e.g. an IVisualCreator implementation for a given style is:
getRenderer in interface ILabelStylepublic final boolean isAutoFlippingEnabled()
true if the label should be flipped automatically otherwise, false. The default is true.setAutoFlippingEnabled(boolean)public final void setAutoFlippingEnabled(boolean value)
value - true if the label should be flipped automatically otherwise, false. The default is true.isAutoFlippingEnabled()public final void setLabelStyle(ILabelStyle value)
ILabelStyle that is used for rendering the foreground of the label.value - The LabelStyle to set.getLabelStyle()public final void setLabelStyleInsets(InsetsD value)
LabelStyle as margins.value - The label style insets. The default is (0,0,0,0).getLabelStyleInsets()public final void setNodeStyle(INodeStyle value)
INodeStyle that is used for rendering the background of the label.value - The NodeStyle to set.getNodeStyle()