public class Margins
extends java.lang.Object
Specifies the margins of a barcode image.
<p>This class is used to manipulate margins in barcode image.</p>
<p><b><I>Note</I></b>: The actual amount of the margins are determined by the specified mesure {@code System.Drawing.GraphicsUnitunit} of the barcode image.</p>
<p>{@code Margins.LeftLeft}, {@code Margins.RightRight}, {@code Margins.TopTop}, and {@code Margins.BottomBottom} are properties that define the margins.</p>
<p>{@code Margins.EqualsEquals} determines if another object is equal to a <b>Margins</b> object.</p>
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines whether two
MarginsMargins instances are equal. |
int |
getBottom()
Gets the
<b>bottom</b> marign. |
int |
getLeft()
Gets the
<b>left</b> margin. |
int |
getRight()
Gets the
<b>right</b> margin. |
int |
getTop()
Gets the
<b>top</b> 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 |
set(int margin)
Sets the specified margin for all sides.
|
void |
set(int left,
int right,
int top,
int bottom)
Sets the specified margins.
|
void |
setBottom(int value)
Sets the
<b>bottom</b> marign. |
void |
setLeft(int value)
Sets the
<b>left</b> margin. |
void |
setRight(int value)
Sets the
<b>right</b> margin. |
void |
setTop(int value)
Sets the
<b>top</b> marign. |
java.lang.String |
toString()
Returns a String that represents the current
MarginsMargins instance. |
public boolean equals(java.lang.Object obj)
Determines whether two MarginsMargins
instances are equal.
equals
in class java.lang.Object
obj
- The MarginsMargins
instance on the left<b>true</b>
if the left MarginsMargins
instances is equal to the right one; otherwise, <b>false</b>
.public int getBottom()
Gets the <b>bottom</b>
marign.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>bottom</b> parameter value is less than 0.</p>
public int getLeft()
Gets the <b>left</b>
margin.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>Left</b> parameter value is less than 0.</p>
public int getRight()
Gets the <b>right</b>
margin.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>Right</b> parameter value is less than 0.</p>
public int getTop()
Gets the <b>top</b>
marign.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>Top</b> parameter value is less than 0.</p>
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.
hashCode
in class java.lang.Object
public void set(int margin)
Sets the specified margin for all sides.
margin
- The margin for all sides.public void set(int left, int right, int top, int bottom)
Sets the specified margins.
left
- The left side.right
- The right side.top
- The top side.bottom
- The bottom side.public void setBottom(int value)
Sets the <b>bottom</b>
marign.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>bottom</b> parameter value is less than 0.</p>
public void setLeft(int value)
Sets the <b>left</b>
margin.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>Left</b> parameter value is less than 0.</p>
public void setRight(int value)
Sets the <b>right</b>
margin.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>Right</b> parameter value is less than 0.</p>
public void setTop(int value)
Sets the <b>top</b>
marign.
com.aspose.msbarcode.System.ArgumentException
- <p>The <b>Top</b> parameter value is less than 0.</p>
public java.lang.String toString()
Returns a String that represents the current MarginsMargins
instance.
toString
in class java.lang.Object
System.StringString
that represents the current Object.