com.aspose.barcode

Class MarginsF

  • java.lang.Object
    • com.aspose.barcode.MarginsF


  • 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 Summary

      Constructors 
      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.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      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.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MarginsF

        public MarginsF()

        Initializes a new instance of the MarginsF class with 0 margins.

      • MarginsF

        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.

        Parameters:
        left - The Left marign.
        right - The right marign.
        top - The top marign.
        bottom - The bottom marign.
        Throws:
        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.

    • Method Detail

      • set

        public void set(float margin)

        Sets the specified margin for all sides.

        Parameters:
        margin - The margin for all sides.
      • set

        public void set(float left,
                        float right,
                        float top,
                        float bottom)

        Sets the specified margins.

        Parameters:
        left - The left side.
        right - The right side.
        top - The top side.
        bottom - The bottom side.
      • equals

        public boolean equals(java.lang.Object obj)

        Determines whether two MarginsFMarginsF instances are equal.

        Overrides:
        equals in class java.lang.Object
        Parameters:
        obj - The MarginsFMarginsF instance on the left
        Returns:
        True if the left MarginsFMarginsF 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 java.lang.Object
        Returns:
        A hash code for the current Object.
      • toString

        public java.lang.String toString()

        Returns a String that represents the current MarginsFMarginsF instance.

        Overrides:
        toString in class java.lang.Object
        Returns:
        A System.StringString that represents the current Object.
      • getBottom

        public float getBottom()

        Gets the bottom marign.

        Throws:
        java.lang.IllegalArgumentException -

        The bottom parameter value is less than 0.

      • setBottom

        public void setBottom(float value)

        Sets the bottom marign.

        Throws:
        java.lang.IllegalArgumentException -

        The bottom parameter value is less than 0.

      • getLeft

        public float getLeft()

        Gets the left margin.

        Throws:
        java.lang.IllegalArgumentException - The Left parameter value is less than 0.
      • setLeft

        public void setLeft(float value)

        Sets the left margin.

        Throws:
        java.lang.IllegalArgumentException - The Left parameter value is less than 0.
      • getRight

        public float getRight()

        Gets the right margin.

        Throws:
        java.lang.IllegalArgumentException -

        The Right parameter value is less than 0.

      • setRight

        public void setRight(float value)

        Sets the right margin.

        Throws:
        java.lang.IllegalArgumentException -

        The Right parameter value is less than 0.

      • getTop

        public float getTop()

        Gets the top marign.

        Throws:
        java.lang.IllegalArgumentException -

        The Top parameter value is less than 0.

      • setTop

        public void setTop(float value)

        Sets the top marign.

        Throws:
        java.lang.IllegalArgumentException -

        The Top parameter value is less than 0.