com.aspose.barcode
Class Margins

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

public class Margins
extends Object

Specifies the margins of a barcode image.


This class is used to manipulate margins in barcode image.

Note: The actual amount of the margins are determined by the specified mesure System.Drawing.GraphicsUnitunit of the barcode image.

Margins.LeftLeft, Margins.RightRight, Margins.TopTop, and Margins.BottomBottom are properties that define the margins.

Margins.EqualsEquals determines if another object is equal to a Margins object.


Constructor Summary
Margins()
           Initialize a new instance of MarginsMargins class with 0 margins.
Margins(int left, int right, int top, int bottom)
           Initialize a new instance of MarginsMargins class with specified left, right, top, bottom marigns.
 
Method Summary
 boolean equals(Object obj)
           Determines whether two MarginsMargins instances are equal.
 int getBottom()
           Gets or sets the bottom marign.
 int getLeft()
           Gets or sets the left margin.
 int getRight()
           Gets or sets the right margin.
 int getTop()
           Gets or sets the top marign.
 int hashCode()
           Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.
 void setBottom(int value)
           
 void setLeft(int value)
           
 void setRight(int value)
           
 void setTop(int value)
           
 String toString()
           Returns a String that represents the current MarginsMargins instance.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Margins

public Margins()

Initialize a new instance of MarginsMargins class with 0 margins.


Margins

public Margins(int left,
               int right,
               int top,
               int bottom)

Initialize a new instance of MarginsMargins class with specified left, right, top, bottom marigns.

Parameters:
left - The Left marign.
right - The right marign.
top - The top marign.
bottom - The bottom marign.
Method Detail

equals

public boolean equals(Object obj)

Determines whether two MarginsMargins instances are equal.

Overrides:
equals in class Object
Parameters:
obj - The MarginsMargins instance on the left
Returns:
true if the left MarginsMargins instances is equal to the right one; otherwise, false.

hashCode

public int hashCode()

Serves as a hash function for a particular type, suitable for use in hashing algorithms and data structures like a hash table.

Overrides:
hashCode in class Object
Returns:
A hash code for the current Object.

toString

public String toString()

Returns a String that represents the current MarginsMargins instance.

Overrides:
toString in class Object
Returns:
A System.StringString that represents the current Object.

getBottom

public int getBottom()

Gets or sets the bottom marign.

Throws:
IllegalArgumentException - <p>The <b>bottom</b> parameter value is less than 0.</p>

setBottom

public void setBottom(int value)

getLeft

public int getLeft()

Gets or sets the left margin.

Throws:
IllegalArgumentException - <p>The <b>Left</b> parameter value is less than 0.</p>

setLeft

public void setLeft(int value)

getRight

public int getRight()

Gets or sets the right margin.

Throws:
IllegalArgumentException - <p>The <b>Right</b> parameter value is less than 0.</p>

setRight

public void setRight(int value)

getTop

public int getTop()

Gets or sets the top marign.

Throws:
IllegalArgumentException - <p>The <b>Top</b> parameter value is less than 0.</p>

setTop

public void setTop(int value)


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