Package totalcross.ui

Class Insets


  • public class Insets
    extends java.lang.Object
    Used to define the gaps between the container and its child controls.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      int bottom
      The inset from the bottom.
      int left
      The inset from the left.
      int right
      The inset from the right.
      int top
      The inset from the top.
    • Constructor Summary

      Constructors 
      Constructor Description
      Insets()
      Creates a new Insets object.
      Insets​(int top, int left, int bottom, int right)
      Creates and initializes a new Insets object with the specified top, left, bottom and right insets.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void copyFrom​(Insets other)
      Copy the insets from another Insets object.
      boolean equals​(java.lang.Object obj)  
      int hashCode()  
      void set​(int top, int left, int bottom, int right)
      Sets the fields with the given values.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • top

        public int top
        The inset from the top.
      • left

        public int left
        The inset from the left.
      • bottom

        public int bottom
        The inset from the bottom.
      • right

        public int right
        The inset from the right.
    • Constructor Detail

      • Insets

        public Insets()
        Creates a new Insets object.
      • Insets

        public Insets​(int top,
                      int left,
                      int bottom,
                      int right)
        Creates and initializes a new Insets object with the specified top, left, bottom and right insets.
        Parameters:
        top - The inset from the top.
        left - The inset from the left.
        bottom - The inset from the bottom.
        right - The inset from the right.
    • Method Detail

      • set

        public void set​(int top,
                        int left,
                        int bottom,
                        int right)
        Sets the fields with the given values.
        Since:
        TotalCross 1.3
      • copyFrom

        public void copyFrom​(Insets other)
        Copy the insets from another Insets object.
        Parameters:
        other - The other Insets object.
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object