public class Caption
extends java.lang.Object
The text caption shown in the com.aspose.barcode image. There are two captions: CaptionBelow and CaptionAbove
Constructor and Description |
---|
Caption()
Initialize an instance of
Captioncaption class with default vaule. |
Caption(java.lang.String text)
Initialize an instance of
Captioncaption class with specified text. |
Caption(java.lang.String text,
boolean visible,
int alignment,
float space,
java.awt.Color color,
Font font) |
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 or sets the
System.Drawing.Fontfont of the Captioncaption . |
java.awt.Color |
getForeColor()
Gets the
System.Drawing.Colorforecolor of the Captioncaption . |
float |
getSpace()
Gets the space between the
Aspose.BarCode.Captioncaption and the com.aspose.barcode,
and the space between border and the caption
|
java.lang.String |
getText()
Gets the content of the
Aspose.BarCode.Captioncaption . |
int |
getTextAlign()
Gets the text
System.Drawing.StringAlignmentalignment of the Aspose.BarCode.Captioncaption . |
boolean |
getVisible()
Gets a value indicates whether the
Captioncaption is visible. |
void |
setFont(Font value) |
void |
setForeColor(java.awt.Color value)
Sets the
System.Drawing.Colorforecolor of the Captioncaption . |
void |
setSpace(float value)
Sets the space between the
Aspose.BarCode.Captioncaption and the com.aspose.barcode,
and the space between border and the caption
|
void |
setText(java.lang.String value)
Sets the content of the
Aspose.BarCode.Captioncaption . |
void |
setTextAlign(int value)
Sets the text
System.Drawing.StringAlignmentalignment of the Aspose.BarCode.Captioncaption . |
void |
setVisible(boolean value)
Sets a value indicates whether the
Captioncaption is visible. |
public Caption()
Initialize an instance of Captioncaption
class with default vaule.
public Caption(java.lang.String text)
Initialize an instance of Captioncaption
class with specified text.
text
- The text content of the caption objectpublic Caption(java.lang.String text, boolean visible, int alignment, float space, java.awt.Color color, Font font)
public Caption copy()
Get a new copy of the caption instance.
public void dispose()
Dispose the Caption instance
public Font getFont()
Gets or sets the System.Drawing.Fontfont
of the Captioncaption
.
public java.awt.Color getForeColor()
Gets the System.Drawing.Colorforecolor
of the Captioncaption
.
public float getSpace()
Gets the space between the
Aspose.BarCode.Captioncaption
and the com.aspose.barcode,
and the space between border and the caption
ArgumentException
- <p>The <b>Space</b> parameter value is less than 0.</p>
<b>space</b>
for the caption is indicated by the System.Drawing.GraphicsUnitGraphicsUnit
.
public java.lang.String getText()
Gets the content of the Aspose.BarCode.Captioncaption
.
public int getTextAlign()
Gets the text System.Drawing.StringAlignmentalignment
of the Aspose.BarCode.Captioncaption
.
e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left
public boolean getVisible()
Gets a value indicates whether the Captioncaption
is visible.
public void setFont(Font value)
public void setForeColor(java.awt.Color value)
Sets the System.Drawing.Colorforecolor
of the Captioncaption
.
public void setSpace(float value)
Sets the space between the
Aspose.BarCode.Captioncaption
and the com.aspose.barcode,
and the space between border and the caption
ArgumentException
- <p>The <b>Space</b> parameter value is less than 0.</p>
<b>space</b>
for the caption is indicated by the System.Drawing.GraphicsUnitGraphicsUnit
.
public void setText(java.lang.String value)
Sets the content of the Aspose.BarCode.Captioncaption
.
public void setTextAlign(int value)
Sets the text System.Drawing.StringAlignmentalignment
of the Aspose.BarCode.Captioncaption
.
e.g. when the text is writing from left to right, StringAlignment.Near means the Caption will be aligned to the left
public void setVisible(boolean value)
Sets a value indicates whether the Captioncaption
is visible.