public class DefaultLabelStyle extends Object implements ILabelStyle, Cloneable
| Constructor and Description |
|---|
DefaultLabelStyle()
Creates a new instance using
DefaultLabelStyleRenderer as renderer. |
DefaultLabelStyle(DefaultLabelStyleRenderer renderer)
Creates a new instance using the provided renderer.
|
| Modifier and Type | Method and Description |
|---|---|
DefaultLabelStyle |
clone()
Creates a copy of this object and returns it.
|
Paint |
getBackgroundPaint()
Gets the brush to use for the background box of the label.
|
Pen |
getBackgroundPen()
Gets the pen to use for the background box of the label.
|
NodeOrientation |
getFlowDirection()
Gets the flow direction.
|
Font |
getFont()
Gets the typeface to use for the label.
|
FontSmoothingType |
getFontSmoothingType()
Returns the smoothing type for the Font that is used for the text.
|
InsetsD |
getInsets()
Gets the insets for this label.
|
double |
getLineSpacing()
Returns the value for the lineSpacing property of the JavaFX text.
|
DefaultLabelStyleRenderer |
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.
|
TextAlignment |
getTextAlignment()
Gets the text alignment.
|
Paint |
getTextPaint()
Gets the brush to use for the label's text.
|
TextWrapping |
getTextWrapping()
Gets the text wrapping mode.
|
VPos |
getVerticalTextAlignment()
Gets the vertical text alignment to use if the label is assigned more space than needed.
|
boolean |
isAutoFlippingEnabled()
Gets a value indicating whether the label should be flipped 180 degrees automatically, if it would be oriented
downwards, otherwise.
|
boolean |
isStrikethrough()
Indicates whether or not each line of text should have a line through it.
|
boolean |
isTextClippingEnabled()
Gets a value that determines whether text should be clipped.
|
boolean |
isUnderline()
Indicates whether or not the text is underlined.
|
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 |
setBackgroundPaint(Paint value)
Sets the brush to use for the background box of the label.
|
void |
setBackgroundPen(Pen value)
Sets the pen to use for the background box of the label.
|
void |
setFlowDirection(NodeOrientation value)
Sets the flow direction.
|
void |
setFont(Font value)
Sets the typeface to use for the label.
|
void |
setFontSmoothingType(FontSmoothingType fontSmoothingType)
Sets he smoothing type for the Font that to use for the text.
|
void |
setInsets(InsetsD insets)
Sets the insets for this label.
|
void |
setLineSpacing(double lineSpacing)
Sets the value for the lineSpacing property of the JavaFX text.
|
void |
setStrikethrough(boolean strikethrough)
Sets whether or not each line of text should have a line through it.
|
void |
setTextAlignment(TextAlignment value)
Sets the text alignment.
|
void |
setTextClippingEnabled(boolean value)
Sets a value that determines whether text should be clipped.
|
void |
setTextPaint(Paint value)
Sets the brush to use for the label's text.
|
void |
setTextWrapping(TextWrapping value)
Sets the text wrapping mode.
|
void |
setUnderline(boolean underline)
Sets whether or not the text is underlined.
|
void |
setVerticalTextAlignment(VPos value)
Sets the vertical text alignment to use if the label is assigned more space than needed.
|
public DefaultLabelStyle()
DefaultLabelStyleRenderer as renderer.public DefaultLabelStyle(DefaultLabelStyleRenderer renderer)
renderer - The custom renderer for this style instance.public DefaultLabelStyle clone()
ICloneableclone in interface ICloneableclone in class ObjectObject.clone()public final Paint getBackgroundPaint()
The default value is null.
null.setBackgroundPaint(Paint)public final Pen getBackgroundPen()
The default value is null.
null.setBackgroundPen(Pen)public final NodeOrientation getFlowDirection()
The default is NodeOrientation.LEFT_TO_RIGHT.
setFlowDirection(NodeOrientation)public final Font getFont()
The default value is an instance of Font for Arial".
IllegalArgumentException - value cannot be null!setFont(Font)public FontSmoothingType getFontSmoothingType()
The default value is FontSmoothingType.GRAY
public InsetsD getInsets()
InsetsD with uniform value 2.InsetsD for this label.public double getLineSpacing()
The default value is 0.
public final DefaultLabelStyleRenderer getRenderer()
ILabelStyle
The idiom for retrieving, e.g. an IVisualCreator implementation for a given style is:
getRenderer in interface ILabelStylepublic final TextAlignment getTextAlignment()
The default value is TextAlignment.LEFT.
setTextAlignment(TextAlignment)public final Paint getTextPaint()
The default value is Color.BLACK.
IllegalArgumentException - value cannot be null!null.setTextPaint(Paint)public final TextWrapping getTextWrapping()
The default is TextWrapping.WRAP.
setTextWrapping(TextWrapping)public final VPos getVerticalTextAlignment()
The default value is VPos.TOP.
setVerticalTextAlignment(VPos)public final boolean isAutoFlippingEnabled()
The default value is true.
true if the label should be flipped automatically otherwise, false.setAutoFlippingEnabled(boolean)public boolean isStrikethrough()
The default value is false
public final boolean isTextClippingEnabled()
The default value is true.
setTextClippingEnabled(boolean)public boolean isUnderline()
The default value is false
public final void setAutoFlippingEnabled(boolean value)
The default value is true.
value - true if the label should be flipped automatically otherwise, false.isAutoFlippingEnabled()public final void setBackgroundPaint(Paint value)
The default value is null.
value - The background brush or null.getBackgroundPaint()public final void setBackgroundPen(Pen value)
The default value is null.
value - The background pen or null.getBackgroundPen()public final void setFlowDirection(NodeOrientation value)
The default is NodeOrientation.LEFT_TO_RIGHT.
value - The flow direction.getFlowDirection()public final void setFont(Font value)
The default value is an instance of Font for Arial".
IllegalArgumentException - value cannot be null!value - The typeface.getFont()public void setFontSmoothingType(FontSmoothingType fontSmoothingType)
fontSmoothingType - The JavaFX FontSmoothingType to set.public void setInsets(InsetsD insets)
InsetsD with uniform value 2.public void setLineSpacing(double lineSpacing)
The default value is 0.
public void setStrikethrough(boolean strikethrough)
public final void setTextAlignment(TextAlignment value)
The default value is TextAlignment.LEFT.
value - The text decorations.getTextAlignment()public final void setTextClippingEnabled(boolean value)
The default value is true.
value - The TextClippingEnabled to set.isTextClippingEnabled()public final void setTextPaint(Paint value)
The default value is Color.BLACK.
IllegalArgumentException - value cannot be null!value - The font brush or null.getTextPaint()public final void setTextWrapping(TextWrapping value)
The default is TextWrapping.WRAP.
value - The text wrapping mode.getTextWrapping()public void setUnderline(boolean underline)
public final void setVerticalTextAlignment(VPos value)
The default value is VPos.TOP.
value - The vertical text alignment.getVerticalTextAlignment()