Class Margin

java.lang.Object
org.jzy3d.maths.Margin

public class Margin extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected int
     
    protected int
     
    protected int
     
    protected int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Margin(float left, float right, float top, float bottom)
     
    Margin(int width, int height)
     
    Margin(int left, int right, int top, int bottom)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    int
     
    int
    Return the sum of left and right margin
    int
     
    int
     
    int
     
    int
    Return the sum of left and right margin
    int
     
    void
    set(int width, int height)
    Set left and right margin to width/2, top and bottom margin to height/2.
    void
    set(int left, int right, int top, int bottom)
     
    void
    setBottom(int bottom)
     
    void
    setHeight(int height)
    Set top and bottom margin to height/2.
    void
    setLeft(int left)
     
    void
    setRight(int right)
     
    void
    setTop(int top)
     
    void
    setWidth(int width)
    Set left and right margin to width/2.
     

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • left

      protected int left
    • top

      protected int top
    • bottom

      protected int bottom
  • Constructor Details

    • Margin

      public Margin()
    • Margin

      public Margin(int width, int height)
    • Margin

      public Margin(int left, int right, int top, int bottom)
    • Margin

      public Margin(float left, float right, float top, float bottom)
  • Method Details

    • set

      public void set(int width, int height)
      Set left and right margin to width/2, top and bottom margin to height/2.
    • set

      public void set(int left, int right, int top, int bottom)
    • setHeight

      public void setHeight(int height)
      Set top and bottom margin to height/2.
    • setWidth

      public void setWidth(int width)
      Set left and right margin to width/2.
    • getWidth

      public int getWidth()
      Return the sum of left and right margin
    • getHeight

      public int getHeight()
      Return the sum of left and right margin
    • getLeft

      public int getLeft()
    • setLeft

      public void setLeft(int left)
    • getRight

      public int getRight()
    • setRight

      public void setRight(int right)
    • getTop

      public int getTop()
    • setTop

      public void setTop(int top)
    • getBottom

      public int getBottom()
    • setBottom

      public void setBottom(int bottom)
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object