public class MarginsF
extends java.lang.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.
MarginsFConverterMarginsFConverter is the type descriptor for this class.
MarginsF.LeftLeft, MarginsF.RightRight, MarginsF.TopTop, and MarginsF.BottomBottom are properties that define the margins.
MarginsF.EqualsEquals determines if another object is equal to a MarginsF object.
Constructor and Description |
---|
MarginsF()
Initializes a new instance of the MarginsF class with 0 margins.
|
MarginsF(float left,
float right,
float top,
float bottom)
Initializes a new instance of the MarginsF class with specified left, right, top, bottom marigns.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj)
Determines whether two MarginsFMarginsF instances are equal.
|
float |
getBottom()
Gets the bottom marign.
|
float |
getLeft()
Gets the left margin.
|
float |
getRight()
Gets the right margin.
|
float |
getTop()
Gets 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 |
set(float margin)
Sets the specified margin for all sides.
|
void |
set(float left,
float right,
float top,
float bottom)
Sets the specified margins.
|
void |
setBottom(float value)
Sets the bottom marign.
|
void |
setLeft(float value)
Sets the left margin.
|
void |
setRight(float value)
Sets the right margin.
|
void |
setTop(float value)
Sets the top marign.
|
java.lang.String |
toString()
Returns a String that represents the current MarginsFMarginsF instance.
|
public MarginsF()
Initializes a new instance of the MarginsF class with 0 margins.
public MarginsF(float left, float right, float top, float bottom)
Initializes a new instance of the MarginsF class with specified left, right, top, bottom marigns.
left
- The Left marign.right
- The right marign.top
- The top marign.bottom
- The bottom marign.java.lang.IllegalArgumentException
- The left parameter value is less than 0.
-or-
The right parameter value is less than 0.
-or-
The top parameter value is less than 0.
-or-
The bottom parameter value is less than 0.
public void set(float margin)
Sets the specified margin for all sides.
margin
- The margin for all sides.public void set(float left, float right, float top, float bottom)
Sets the specified margins.
left
- The left side.right
- The right side.top
- The top side.bottom
- The bottom side.public boolean equals(java.lang.Object obj)
Determines whether two MarginsFMarginsF instances are equal.
equals
in class java.lang.Object
obj
- The MarginsFMarginsF instance on the leftpublic 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 java.lang.String toString()
Returns a String that represents the current MarginsFMarginsF instance.
toString
in class java.lang.Object
public float getBottom()
Gets the bottom marign.
java.lang.IllegalArgumentException
- The bottom parameter value is less than 0.
public void setBottom(float value)
Sets the bottom marign.
java.lang.IllegalArgumentException
- The bottom parameter value is less than 0.
public float getLeft()
Gets the left margin.
java.lang.IllegalArgumentException
- The Left parameter value is less than 0.public void setLeft(float value)
Sets the left margin.
java.lang.IllegalArgumentException
- The Left parameter value is less than 0.public float getRight()
Gets the right margin.
java.lang.IllegalArgumentException
- The Right parameter value is less than 0.
public void setRight(float value)
Sets the right margin.
java.lang.IllegalArgumentException
- The Right parameter value is less than 0.
public float getTop()
Gets the top marign.
java.lang.IllegalArgumentException
- The Top parameter value is less than 0.
public void setTop(float value)
Sets the top marign.
java.lang.IllegalArgumentException
- The Top parameter value is less than 0.