Intel

Developer Zone

Rectangle

com.intel.ui

Class Rectangle



  • public abstract class Rectangle
    extends Widget
    This abstract class represents a leaf Widget of a rectangle.
    • Field Summary

      Fields
      Modifier and Type Field and Description
      static byte FILL_TYPE_ALL
      The rectangle will be completely filled with fillColor (see create method parameters).
      static byte FILL_TYPE_BORDER
      Only the rectangle's border will be filled with borderColor (see create method parameters).
    • Method Summary

      Methods
      Modifier and Type Method and Description
      static Rectangle create(short id, int fillColor, XYPair size, XYPair relLocation, byte fillType, boolean curvedEdges, int borderColor, short borderWidth)
      Factory method for creating a concrete instance initialized with the specified parameters
      int getBorderColor()
      Returns the border color in RGB format (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
      short getBorderWidth()
      Returns the border width in pixels.
      byte getFillType()
      Returns the fill type.
      boolean hasCurvedEdges()
      Returns whether this Rectangle has curved edges.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, toString
    • Field Detail

      • FILL_TYPE_ALL

        public static final byte FILL_TYPE_ALL
        The rectangle will be completely filled with fillColor (see create method parameters).
        See Also:
        Constant Field Values
      • FILL_TYPE_BORDER

        public static final byte FILL_TYPE_BORDER
        Only the rectangle's border will be filled with borderColor (see create method parameters).
        See Also:
        Constant Field Values
    • Method Detail

      • create

        public static final Rectangle create(short id,
                       int fillColor,
                       XYPair size,
                       XYPair relLocation,
                       byte fillType,
                       boolean curvedEdges,
                       int borderColor,
                       short borderWidth)
                                      throws UiException
        Factory method for creating a concrete instance initialized with the specified parameters
        Parameters:
        id - An ID representing this Widget for quick reference by the calling application. The ID does not have to be unique and is not used internally by the package.
        fillColor - The fill color of the Rectangle in RGB format (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
        size - The size of the Widget
        relLocation - The relative location from the parent Widget
        fillType - The fill type of the Rectangle (either draw an empty or full rectangle)
        curvedEdges - Determines if the Rectangle has curved or straight edges
        borderColor - The border color from in RGB format (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
        borderWidth - The border width in pixels
        Returns:
        Rectangle instance
        Throws:
        UiIllegalParameterException - in one of the following cases:
        • Size is negative.
        • Location is negative.
        • Size exceeds upper bound Widget.MAX_WIDTH and/or Widget.MAX_HEIGHT.
        • Location exceeds upper bound Widget.MAX_WIDTH and/or Widget.MAX_HEIGHT.
        • fillType is FILL_TYPE_BORDER, but the border width is 0.
        • Border width is illegal. For example, negative or exceeds half of the smaller rectangle side size.
        • The provided fill type is not supported.
        UiException
      • getFillType

        public byte getFillType()
        Returns the fill type.
        Returns:
        Returns the fill type.
      • hasCurvedEdges

        public boolean hasCurvedEdges()
        Returns whether this Rectangle has curved edges.
        Returns:
        Returns true if this Rectangle has curved edges, false if it has straight edges
      • getBorderColor

        public int getBorderColor()
        Returns the border color in RGB format (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
        Returns:
        Returns the border color in RGB format.
      • getBorderWidth

        public short getBorderWidth()
        Returns the border width in pixels.
        Returns:
        Returns the border width in pixels.