DynamicPDF by ceTe Software

com.cete.dynamicpdf.pageelements
Class Label

java.lang.Object
  extended by com.cete.dynamicpdf.PageElement
      extended by com.cete.dynamicpdf.pageelements.TaggablePageElement
          extended by com.cete.dynamicpdf.pageelements.RotatingPageElement
              extended by com.cete.dynamicpdf.pageelements.Label
All Implemented Interfaces:
IArea, ICoordinate

public class Label
extends RotatingPageElement
implements IArea, ICoordinate

This class can be used to place labels of text on a page.

Licensing:
This class is a DynamicPDF Generator Community Edition feature.

View Example


Constructor Summary
Label(java.lang.String text, float x, float y, float width, float height)
          Creates a new instance of Label.
Label(java.lang.String text, float x, float y, float width, float height, Font font)
          Creates a new instance of Label.
Label(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize)
          Creates a new instance of Label.
Label(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize, Color textColor)
          Creates a new instance of Label.
Label(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize, TextAlign align)
          Creates a new instance of Label.
Label(java.lang.String text, float x, float y, float width, float height, Font font, float fontSize, TextAlign align, Color textColor)
          Creates a new instance of Label.
 
Method Summary
protected  void drawRotated(PageWriter writer)
          Draws the label to the given PageWriter object.
 TextAlign getAlign()
          Gets the TextAlign enumeration that specifies the text alignment of the label.
 Font getFont()
          Gets the Font object to use for the text of the label.
 float getFontSize()
          Gets the font size for the text of the label.
 float getHeight()
          Gets the height of the label.
 boolean getRightToLeft()
          Gets a value indicating if text should be displayed right to left.
 boolean getStrikethrough()
          Gets the strikeThrough for the text outline of the label..
 java.lang.String getText()
          Gets the text of the label.
 Color getTextColor()
          Gets the Color object to use for the text of the label.
 Color getTextOutlineColor()
          Gets the Color object to use for the text outline of the label.
 float getTextOutlineWidth()
          Gets the line width to use for the text outline of the label..
 boolean getUnderline()
          Gets a value indicating if the label is underlined.
 VAlign getVAlign()
          Gets the VAlign enumeration that specifies the vertical text alignment of the label.
 float getWidth()
          Gets the width of the label.
 void setAlign(TextAlign value)
          Sets the TextAlign enumeration that specifies the text alignment of the label.
 void setFont(Font value)
          Sets the Font object to use for the text of the label.
 void setFontSize(float value)
          Sets the font size for the text of the label.
 void setHeight(float value)
          Sets the height of the label.
 void setRightToLeft(boolean value)
          Sets a value indicating if text should be displayed right to left.
 void setStrikethrough(boolean value)
          Sets the strikeThrough for the text outline of the label..
 void setText(java.lang.String value)
          Sets the text of the label.
 void setTextColor(Color value)
          Sets the Color object to use for the text of the label.
 void setTextOutlineColor(Color value)
          Sets the Color object to use for the text outline of the label.
 void setTextOutlineWidth(float value)
          Sets the line width to use for the text outline of the label..
 void setUnderline(boolean value)
          Sets a value indicating if the label is underlined.
 void setVAlign(VAlign value)
          Sets the VAlign enumeration that specifies the vertical text alignment of the label.
 void setWidth(float value)
          Sets the width of the label.
 
Methods inherited from class com.cete.dynamicpdf.pageelements.RotatingPageElement
draw, getAngle, getX, getY, setAngle, setX, setY
 
Methods inherited from class com.cete.dynamicpdf.pageelements.TaggablePageElement
getTag, getTagOrder, setTag, setTagOrder
 
Methods inherited from class com.cete.dynamicpdf.PageElement
getRequiredLicenseLevel, getStrID, setRequiredLicenseLevel, setStrID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.cete.dynamicpdf.pageelements.ICoordinate
getX, getY, setX, setY
 

Constructor Detail

Label

public Label(java.lang.String text,
             float x,
             float y,
             float width,
             float height)
Creates a new instance of Label.

Parameters:
text - Text to display in the label.
x - X coordinate of the label.
y - Y coordinate of the label.
width - Width of the label.
height - Height of the label.

Label

public Label(java.lang.String text,
             float x,
             float y,
             float width,
             float height,
             Font font)
Creates a new instance of Label.

Parameters:
text - Text to display in the label.
x - X coordinate of the label.
y - Y coordinate of the label.
width - Width of the label.
height - Height of the label.
font - Font for the text of the label.

Label

public Label(java.lang.String text,
             float x,
             float y,
             float width,
             float height,
             Font font,
             float fontSize)
Creates a new instance of Label.

Parameters:
text - Text to display in the label.
x - X coordinate of the label.
y - Y coordinate of the label.
width - Width of the label.
height - Height of the label.
font - Font for the text of the label.
fontSize - Font size of the text of the label.

Label

public Label(java.lang.String text,
             float x,
             float y,
             float width,
             float height,
             Font font,
             float fontSize,
             TextAlign align)
Creates a new instance of Label.

Parameters:
text - Text to display in the label.
x - X coordinate of the label.
y - Y coordinate of the label.
width - Width of the label.
height - Height of the label.
font - Font for the text of the label.
fontSize - Font size of the text of the label.
align - Alignment of the text of the label.

Label

public Label(java.lang.String text,
             float x,
             float y,
             float width,
             float height,
             Font font,
             float fontSize,
             Color textColor)
Creates a new instance of Label.

Parameters:
text - Text to display in the label.
x - X coordinate of the label.
y - Y coordinate of the label.
width - Width of the label.
height - Height of the label.
font - Font for the text of the label.
fontSize - Font size of the text of the label.
textColor - Color of the text of the label.

Label

public Label(java.lang.String text,
             float x,
             float y,
             float width,
             float height,
             Font font,
             float fontSize,
             TextAlign align,
             Color textColor)
Creates a new instance of Label.

Parameters:
text - Text to display in the label.
x - X coordinate of the label.
y - Y coordinate of the label.
width - Width of the label.
height - Height of the label.
font - Font for the text of the label.
fontSize - Font size of the text of the label.
align - Alignment of the text of the label.
textColor - Color of the text of the label.
Method Detail

getAlign

public TextAlign getAlign()
Gets the TextAlign enumeration that specifies the text alignment of the label.

Returns:
the text alignment of the label.
See Also:
TextAlign

setAlign

public void setAlign(TextAlign value)
Sets the TextAlign enumeration that specifies the text alignment of the label.

Parameters:
value - the text alignment of the label.
See Also:
TextAlign

getVAlign

public VAlign getVAlign()
Gets the VAlign enumeration that specifies the vertical text alignment of the label.

Returns:
the text vertical alignment of the label.
See Also:
VAlign

setVAlign

public void setVAlign(VAlign value)
Sets the VAlign enumeration that specifies the vertical text alignment of the label.

Parameters:
value - the text vertical alignment of the label.
See Also:
VAlign

getUnderline

public boolean getUnderline()
Gets a value indicating if the label is underlined.

Returns:
underline property of the label.

setUnderline

public void setUnderline(boolean value)
Sets a value indicating if the label is underlined.

Parameters:
value - underline property of the label.

getRightToLeft

public boolean getRightToLeft()
Gets a value indicating if text should be displayed right to left.

Returns:
a value indicating if text should be displayed right to left.

setRightToLeft

public void setRightToLeft(boolean value)
Sets a value indicating if text should be displayed right to left.

Parameters:
value - indicating if text should be displayed right to left.

getText

public java.lang.String getText()
Gets the text of the label.

Returns:
the text of the label.

setText

public void setText(java.lang.String value)
Sets the text of the label.

Parameters:
value - the text of the label.

getTextColor

public Color getTextColor()
Gets the Color object to use for the text of the label.

Returns:
the text color of the label.
See Also:
Color

setTextColor

public void setTextColor(Color value)
Sets the Color object to use for the text of the label.

Parameters:
value - the text color of the label.
See Also:
Color

getTextOutlineColor

public Color getTextOutlineColor()
Gets the Color object to use for the text outline of the label.

Returns:
the text color of the text outline of the label.
See Also:
Color

setTextOutlineColor

public void setTextOutlineColor(Color value)
Sets the Color object to use for the text outline of the label.

Parameters:
value - the text color of the text outline of the label.
See Also:
Color

getTextOutlineWidth

public float getTextOutlineWidth()
Gets the line width to use for the text outline of the label..

Returns:
the text width of the text outline of the label.

setTextOutlineWidth

public void setTextOutlineWidth(float value)
Sets the line width to use for the text outline of the label..

Parameters:
value - the text width of the text outline of the label.

getStrikethrough

public boolean getStrikethrough()
Gets the strikeThrough for the text outline of the label..

Returns:
the strikeThrough of the text outline of the label.

setStrikethrough

public void setStrikethrough(boolean value)
Sets the strikeThrough for the text outline of the label..

Parameters:
value - the strikeThrough of the text outline of the label.

getFont

public Font getFont()
Gets the Font object to use for the text of the label.

Returns:
the text font of the label.
See Also:
Font

setFont

public void setFont(Font value)
Sets the Font object to use for the text of the label.

Parameters:
value - the text font of the label.
See Also:
Font

getFontSize

public float getFontSize()
Gets the font size for the text of the label.

Returns:
the font size for the text of the label.

setFontSize

public void setFontSize(float value)
Sets the font size for the text of the label.

Parameters:
value - the font size for the text of the label.

getWidth

public float getWidth()
Gets the width of the label.

Specified by:
getWidth in interface IArea
Returns:
the width of the label.

setWidth

public void setWidth(float value)
Sets the width of the label.

Specified by:
setWidth in interface IArea
Parameters:
value - the width of the label.

getHeight

public float getHeight()
Gets the height of the label.

Specified by:
getHeight in interface IArea
Overrides:
getHeight in class RotatingPageElement
Returns:
the height of the label.

setHeight

public void setHeight(float value)
Sets the height of the label.

Specified by:
setHeight in interface IArea
Overrides:
setHeight in class RotatingPageElement
Parameters:
value - the height of the label.

drawRotated

protected void drawRotated(PageWriter writer)
Draws the label to the given PageWriter object.

Specified by:
drawRotated in class RotatingPageElement
Parameters:
writer - PageWriter object to receive the label's output.
See Also:
PageWriter

DynamicPDF by ceTe Software

API Reference for DynamicPDF v10.07 for Java generated on Aug 12, 2020
© Copyright 2020, ceTe Software