public class Caption extends Object
The text caption shown in the barcode image. There are two captions: CaptionBelow and CaptionAbove
Constructor and Description |
---|
Caption()
Initializes a new instance of the Caption class with default vaule.
|
Caption(String text)
Initializes a new instance of the Caption class with specified text.
|
Caption(String text,
boolean visible,
int alignment,
float space,
Color color,
Font font)
Initializes a new instance of the Caption class.
|
Modifier and Type | Method and Description |
---|---|
Caption |
copy()
Get a new copy of the caption instance.
|
void |
dispose()
Dispose the Caption instance
|
Font |
getFont()
Gets the java.awt.Font of the Captioncaption.
|
Color |
getForeColor()
Gets the java.awt.Color of the Captioncaption.
|
float |
getSpace()
Gets the space between the caption and the barcode,
and the space between border and the caption
|
String |
getText()
Gets the content of the caption.
|
int |
getTextAlign()
Gets the text of the caption.
|
String |
getTextAlignName()
Gets StringAlignment name of TextAlign
|
boolean |
getVisible()
Gets a value indicates whether the caption is visible.
|
void |
setFont(Font value)
Sets the java.awt.Font of the Captioncaption.
|
void |
setForeColor(Color value)
Sets the java.awt.Color of the Captioncaption.
|
void |
setSpace(float value)
Sets the space between the caption and the barcode,
and the space between border and the caption
|
void |
setText(String value)
Sets the content of the caption.
|
void |
setTextAlign(int value)
Sets the text of the caption.
|
void |
setVisible(boolean value)
Sets a value indicates whether the caption is visible.
|
public Caption()
Initializes a new instance of the Caption class with default vaule.
public Caption(String text)
Initializes a new instance of the Caption class with specified text.
text
- The text content of the caption objectpublic Caption(String text, boolean visible, int alignment, float space, Color color, Font font)
Initializes a new instance of the Caption class.
text
- The context of the caption.visible
- Indicates whether the caption is visible.alignment
- The alignment of the text in the caption.space
- The amount of space in the caption.color
- The forecolor of the text in the caption.font
- The font of the text in the caption.public Caption copy()
Get a new copy of the caption instance.
public boolean getVisible()
Gets a value indicates whether the caption is visible.
public void setVisible(boolean value)
Sets a value indicates whether the caption is visible.
public Color getForeColor()
Gets the java.awt.Color of the Captioncaption.
public void setForeColor(Color value)
Sets the java.awt.Color of the Captioncaption.
public Font getFont()
Gets the java.awt.Font of the Captioncaption.
public void setFont(Font value)
Sets the java.awt.Font of the Captioncaption.
public float getSpace()
Gets the space between the caption and the barcode, and the space between border and the caption
IllegalArgumentException
- The Space parameter value is less than 0.
public void setSpace(float value)
Sets the space between the caption and the barcode, and the space between border and the caption
IllegalArgumentException
- The Space parameter value is less than 0.
public int getTextAlign()
Gets the text of the caption. e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left
public String getTextAlignName()
Gets StringAlignment name of TextAlign
public void setTextAlign(int value)
Sets the text of the caption. e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left
public String getText()
Gets the content of the caption.
public void setText(String value)
Sets the content of the caption.
public void dispose()
Dispose the Caption instance
Copyright (c) 2002-2017 Aspose Pty Ltd. All Rights Reserved.