public abstract class AbstractLabel extends java.lang.Object implements LabelStyle, java.lang.Cloneable
CENTER, HORIZONTALPOS_CENTER, HORIZONTALPOS_LEFT, HORIZONTALPOS_RIGHT, LEFT, RIGHT, STYLE_BOLD, STYLE_ITALIC, STYLE_PLAIN, VERTICALPOS_BOTTOM, VERTICALPOS_CENTER, VERTICALPOS_TOP
Constructor and Description |
---|
AbstractLabel() |
Modifier and Type | Method and Description |
---|---|
AbstractLabel |
clone() |
LabelPlacement |
createLabelPlacement()
Create the label placement. it will only create a new one if the placement is null.
|
LabelPlacement |
createLabelPlacement(short placementModel)
Create the label placement.
|
short |
getAlignment()
Return the label alignment.
|
java.lang.String |
getFontFamily()
Return the label font Family.
|
int |
getFontSize()
Return the label font size.
|
short |
getFontStyle()
Return the label font style.
|
short |
getHorizontalTextPosition()
Return the label horizontal text position.
|
java.lang.String |
getLabel()
Return the label text.
|
LabeledElement |
getLabeledElement()
Return the labeled element on which this label is attached.
|
LabelPlacement |
getLabelPlacement()
Return the label placement.
|
short |
getLabelPlacementType()
Return the placement model type.
|
int |
getMinimumHeight()
Return the minimum height to show the label.
|
java.awt.Dimension |
getMinimumSize()
Return the minimum size to show the label.
|
int |
getMinimumWidth()
Return the minimum width to show the label.
|
java.lang.String |
getTextColor()
Return the text color.
|
short |
getVerticalTextPosition()
Return the label vertical text position.
|
boolean |
isEmpty()
Return true if the label is empty or null.
|
void |
setAlignment(short alignment)
Set the label alignment.
|
void |
setFontFamily(java.lang.String fontFamily)
Set the label font Family.
|
void |
setFontSize(int fontSize)
Set the label font size.
|
void |
setFontStyle(short fontStyle)
Set the label font style.
|
void |
setHorizontalTextPosition(short horizontalPosition)
Set the label horizontal text position.
|
void |
setLabel(java.lang.String label)
Set the label text.
|
void |
setLabeledElement(LabeledElement labeledElement)
Set the labeled element on which this label must be attached.
|
boolean |
setTextColor(java.awt.Color textColor)
Set the text color.
|
boolean |
setTextColor(java.lang.String textColor)
Set the text color.
|
void |
setVerticalTextPosition(short verticalPosition)
Set the label vertical text position.
|
public void setLabeledElement(LabeledElement labeledElement)
labeledElement
- the labeled elementpublic LabelPlacement createLabelPlacement(short placementModel)
placementModel
- the placement modelpublic LabelPlacement createLabelPlacement()
public LabelPlacement getLabelPlacement()
public short getLabelPlacementType()
public LabeledElement getLabeledElement()
public AbstractLabel clone()
clone
in class java.lang.Object
public java.awt.Dimension getMinimumSize()
public int getMinimumWidth()
public int getMinimumHeight()
public boolean isEmpty()
public void setLabel(java.lang.String label)
label
- the label textpublic java.lang.String getLabel()
public void setFontFamily(java.lang.String fontFamily)
fontFamily
- the font Familypublic java.lang.String getFontFamily()
public void setAlignment(short alignment)
alignment
- the alignmentpublic short getAlignment()
public void setHorizontalTextPosition(short horizontalPosition)
horizontalPosition
- the horizontal text positionpublic short getHorizontalTextPosition()
public void setVerticalTextPosition(short verticalPosition)
verticalPosition
- the vertical text positionpublic short getVerticalTextPosition()
public void setFontSize(int fontSize)
fontSize
- the font sizepublic int getFontSize()
public void setFontStyle(short fontStyle)
fontStyle
- the font stylepublic short getFontStyle()
public boolean setTextColor(java.awt.Color textColor)
textColor
- the colorpublic boolean setTextColor(java.lang.String textColor)
textColor
- the colorpublic java.lang.String getTextColor()
Copyright © 2021, 2022 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence