public class TextStamp extends Stamp
Reresents textual stamp.
Modifier and Type | Field and Description |
---|---|
static float |
DefaultFontSize
Default Font Size
|
Constructor and Description |
---|
TextStamp(FormattedText formattedText)
Initializes a new instance of the
TextStamp class with formattedText object
|
TextStamp(String value)
Initializes a new instance of the
TextStamp class. |
TextStamp(String value,
TextState textState)
Initializes a new instance of the
TextStamp class. |
Modifier and Type | Method and Description |
---|---|
static Font |
getDefaultFont()
Returns default font
|
boolean |
getDraw()
This property determines how stamp is drawn on page.
|
double |
getHeight()
Desired height of the stamp on the page.
|
double |
getMaxRowWidth()
Max row height for WordWrap option.
|
int |
getTextAlignment()
Alignment of the text inside the stamp.
|
TextState |
getTextState()
Gets text properties of the stamp.
|
boolean |
getTreatYIndentAsBaseLine()
Defines coordinate origin for placing text.
|
String |
getValue()
Gets string value which is used as stamp on the page.
|
double |
getWidth()
Desired width of the stamp on the page.
|
boolean |
isJustify()
Defines text justification.
|
boolean |
isScale()
Defines scaling of the text.
|
boolean |
isWordWrap()
Defines word wrap.
|
void |
put(Page page)
Adds textual stamp on the page.
|
void |
setDraw(boolean value)
This property determines how stamp is drawn on page.
|
void |
setHeight(double value)
Desired height of the stamp on the page.
|
void |
setJustify(boolean value)
Defines text justification.
|
void |
setMaxRowWidth(double value)
Max row height for WordWrap option.
|
void |
setScale(boolean value)
Defines scaling of the text.
|
void |
setTextAlignment(int value)
Alignment of the text inside the stamp.
|
void |
setTreatYIndentAsBaseLine(boolean value)
Defines coordinate origin for placing text.
|
void |
setValue(String value)
Sets string value which is used as stamp on the page.
|
void |
setWidth(double value)
Desired width of the stamp on the page.
|
void |
setWordWrap(boolean value)
Defines word wrap.
|
getBackground, getBottomMargin, getHorizontalAlignment, getLeftMargin, getOpacity, getOutlineOpacity, getOutlineWidth, getRightMargin, getRotate, getRotateAngle, getStampId, getTopMargin, getVerticalAlignment, getXIndent, getYIndent, getZoom, getZoomX, getZoomY, setBackground, setBottomMargin, setHorizontalAlignment, setLeftMargin, setOpacity, setOutlineOpacity, setOutlineWidth, setRightMargin, setRotate, setRotateAngle, setStampId, setTopMargin, setVerticalAlignment, setXIndent, setYIndent, setZoom, setZoomX, setZoomY
public static final float DefaultFontSize
public TextStamp(String value)
Initializes a new instance of the TextStamp
class.
value
- Stamp value.public TextStamp(String value, TextState textState)
Initializes a new instance of the TextStamp
class.
value
- Stamp value.textState
- Stamp text state.public TextStamp(FormattedText formattedText)
Initializes a new instance of the TextStamp
class with formattedText object
formattedText
- FormattedText object which contains text of the stamp.public boolean getDraw()
This property determines how stamp is drawn on page. If Draw = true stamp is drawn as graphic operators and if draw = false then stamp is drawn as text.
public void setDraw(boolean value)
This property determines how stamp is drawn on page. If Draw = true stamp is drawn as graphic operators and if draw = false then stamp is drawn as text.
value
- boolean valuepublic boolean getTreatYIndentAsBaseLine()
Defines coordinate origin for placing text. If TreatYIndentAsBaseLine = true (default when Draw = true) YIndent value will be treated as text base line. If TreatYIndentAsBaseLine = false (default when Draw = false) YIndent value will be treated as bottom (descent line) of text.
public void setTreatYIndentAsBaseLine(boolean value)
Defines coordinate origin for placing text. If TreatYIndentAsBaseLine = true (default when Draw = true) YIndent value will be treated as text base line. If TreatYIndentAsBaseLine = false (default when Draw = false) YIndent value will be treated as bottom (descent line) of text.
value
- boolean valuepublic boolean isWordWrap()
Defines word wrap. If this property set to true and Width value specified, text will be broken in the several lines to fit into specified width. Default value: false.
public void setWordWrap(boolean value)
Defines word wrap. If this property set to true and Width value specified, text will be broken in the several lines to fit into specified width. Default value: false.
value
- boolean valuepublic boolean isJustify()
Defines text justification. If this property is set to true, both left and right edges of the text are aligned. Default value: false.
public void setJustify(boolean value)
Defines text justification. If this property is set to true, both left and right edges of the text are aligned. Default value: false.
value
- boolean valuepublic boolean isScale()
Defines scaling of the text. If this property is set to true and Width value specified, text will be scaled in order to fit to specified width.
public void setScale(boolean value)
Defines scaling of the text. If this property is set to true and Width value specified, text will be scaled in order to fit to specified width.
value
- boolean valuepublic static Font getDefaultFont()
public String getValue()
Gets string value which is used as stamp on the page.
public void setValue(String value)
Sets string value which is used as stamp on the page.
value
- String valuepublic TextState getTextState()
Gets text properties of the stamp. See TextState
for details.
public int getTextAlignment()
Alignment of the text inside the stamp.
HorizontalAlignment
public void setTextAlignment(int value)
Alignment of the text inside the stamp.
value
- HorizontalAlignment valueHorizontalAlignment
public void put(Page page)
Adds textual stamp on the page.
public double getWidth()
Desired width of the stamp on the page.
public void setWidth(double value)
Desired width of the stamp on the page.
public double getHeight()
Desired height of the stamp on the page.
public void setHeight(double value)
Desired height of the stamp on the page.
public double getMaxRowWidth()
Max row height for WordWrap option.
public void setMaxRowWidth(double value)
Max row height for WordWrap option.
value
- double value