Interface Sizeable

    • Method Detail

      • getWidth

        float getWidth()
        Gets the width of the object. Negative number implies unspecified size (terminal is free to set the size).
        Returns:
        width of the object in units specified by widthUnits property.
      • getHeight

        float getHeight()
        Gets the height of the object. Negative number implies unspecified size (terminal is free to set the size).
        Returns:
        height of the object in units specified by heightUnits property.
      • getWidthUnits

        Sizeable.Unit getWidthUnits()
        Gets the width property units.
        Returns:
        units used in width property.
      • getHeightUnits

        Sizeable.Unit getHeightUnits()
        Gets the height property units.
        Returns:
        units used in height property.
      • setHeight

        void setHeight​(String height)
        Sets the height of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the height and set the units to pixels. See CSS specification for more details.
        Parameters:
        height - in CSS style string representation
      • setWidth

        void setWidth​(float width,
                      Sizeable.Unit unit)
        Sets the width of the object. Negative number implies unspecified size (terminal is free to set the size).
        Parameters:
        width - the width of the object.
        unit - the unit used for the width.
      • setHeight

        void setHeight​(float height,
                       Sizeable.Unit unit)
        Sets the height of the object. Negative number implies unspecified size (terminal is free to set the size).
        Parameters:
        height - the height of the object.
        unit - the unit used for the width.
      • setWidth

        void setWidth​(String width)
        Sets the width of the component using String presentation. String presentation is similar to what is used in Cascading Style Sheets. Size can be length or percentage of available size. The empty string ("") or null will unset the width and set the units to pixels. See CSS specification for more details.
        Parameters:
        width - in CSS style string representation, null or empty string to reset
      • setSizeFull

        void setSizeFull()
        Sets the size to 100% x 100%.
      • setSizeUndefined

        void setSizeUndefined()
        Clears any size settings.
      • setWidthUndefined

        void setWidthUndefined()
        Clears any defined width
        Since:
        7.3
      • setHeightUndefined

        void setHeightUndefined()
        Clears any defined height
        Since:
        7.3