Intel

Developer Zone

Button

com.intel.ui

Class Button

  • All Implemented Interfaces:
    Clickable


    public abstract class Button
    extends CompositeWidget
    implements Clickable
    This abstract class represents a general Clickable container that can contain additional widgets. For example, a rectangular button with text inside it, can be created by adding a Rectangle widget and a Label widget into this Button object.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      static Button create(short id, XYPair size, XYPair relLocation)
      Factory method for creating a concrete instance initialized with the specified parameters
      int getColor()
      This method is not supported for this widget type and will throw UiNotSupportedException.
      boolean intersect(XYPair clickLocation)
      Returns true if this widget intersects with the location of the mouse click, and false othewise.
      • Methods inherited from class java.lang.Object

        equals, hashCode, toString
    • Method Detail

      • create

        public static final Button create(short id,
                    XYPair size,
                    XYPair relLocation)
                                   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.
        size - The size of the Widget
        relLocation - The relative location from the parent Widget
        Returns:
        Button instance
        Throws:
        UiIllegalParameterException - in one of the following cases:
        • Size is negative or 0.
        • 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.
        UiException
      • intersect

        public boolean intersect(XYPair clickLocation)
        Returns true if this widget intersects with the location of the mouse click, and false othewise. Note that widget intersection can only be checked after the Dialog containing this widget was rendered.
        Specified by:
        intersect in interface Clickable
        Parameters:
        clickLocation - The location where the mouse click occurred.
        Returns:
        true if the click intersects with the widget bounding box, false otherwise.
      • getColor

        public int getColor()
        This method is not supported for this widget type and will throw UiNotSupportedException.
        Overrides:
        getColor in class Widget
        Returns:
        Returns the RGB color of the widget (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
        Throws:
        UiNotSupportedException - always.