com.aspose.barcode
Class Caption

java.lang.Object
  extended by com.aspose.barcode.Caption

public class Caption
extends Object

The text caption shown in the barcode image. There are two captions: CaptionBelow and CaptionAbove


Constructor Summary
Caption()
           Initialize an instance of Captioncaption class with default vaule.
Caption(String text)
           Initialize an instance of Captioncaption class with specified text.
Caption(String text, boolean visible, int alignment, float space, Color color, Font font)
           Initialize an instance of Caption class.
 
Method Summary
 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 Aspose.BarCode.Captioncaption.
 Color getForeColor()
           Gets or sets the System.Drawing.Colorforecolor of the Aspose.BarCode.Captioncaption.
 float getSpace()
           Gets or sets the space between the Aspose.BarCode.Captioncaption and the barcode, and the space between border and the caption
 String getText()
           Gets or sets the content of the Aspose.BarCode.Captioncaption.
 int getTextAlign()
           Gets or sets the text System.Drawing.StringAlignmentalignment of the Aspose.BarCode.Captioncaption.
 boolean getVisible()
           Gets or sets a value indicates whether the Aspose.BarCode.Captioncaption is visible.
 void setFont(Font value)
           
 void setForeColor(Color value)
           
 void setSpace(float value)
           
 void setText(String value)
           
 void setTextAlign(int value)
           
 void setVisible(boolean value)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Caption

public Caption()

Initialize an instance of Captioncaption class with default vaule.


Caption

public Caption(String text)

Initialize an instance of Captioncaption class with specified text.

Parameters:
text - The text content of the caption object

Caption

public Caption(String text,
               boolean visible,
               int alignment,
               float space,
               Color color,
               Font font)

Initialize an instance of Caption class.

Parameters:
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.
Method Detail

copy

public Caption copy()

Get a new copy of the caption instance.

Returns:
The new copy of the instance.

getVisible

public boolean getVisible()

Gets or sets a value indicates whether the Aspose.BarCode.Captioncaption is visible.


setVisible

public void setVisible(boolean value)

getForeColor

public Color getForeColor()

Gets or sets the System.Drawing.Colorforecolor of the Aspose.BarCode.Captioncaption.


setForeColor

public void setForeColor(Color value)

getFont

public Font getFont()

Gets or sets the System.Drawing.Fontfont of the Aspose.BarCode.Captioncaption.


setFont

public void setFont(Font value)

getSpace

public float getSpace()

Gets or sets the space between the Aspose.BarCode.Captioncaption and the barcode, and the space between border and the caption

Throws:
com.aspose.ms.System.IllegalArgumentException - <p>The <b>Space</b> parameter value is less than 0.</p>


The measure unit of the space for the caption is indicated by the System.Drawing.GraphicsUnitGraphicsUnit.


setSpace

public void setSpace(float value)

getTextAlign

public int getTextAlign()

Gets or 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


setTextAlign

public void setTextAlign(int value)

getText

public String getText()

Gets or sets the content of the Aspose.BarCode.Captioncaption.


setText

public void setText(String value)

dispose

public void dispose()

Dispose the Caption instance



Copyright (c) 2002-2012 Aspose Pty Ltd. All Rights Reserved.