Intel

Developer Zone

Label

com.intel.ui

Class Label



  • public abstract class Label
    extends Widget
    This abstract class represents a leaf Widget of a transparent box with text.
    • Method Summary

      Methods
      Modifier and Type Method and Description
      static Label create(short id, int fontColor, XYPair relLocation, java.lang.String text, byte fontType)
      Factory method for creating a concrete instance initialized with the specified parameters
      byte getFontType()
      Returns the font type
      java.lang.String getText()
      Returns the text contained in the Label
      static XYPair getTextSize(byte fontType, java.lang.String text)
      Returns the text size in pixels (width and height)
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, toString
    • Field Detail

      • LABEL_MIN_LENGTH

        public static final short LABEL_MIN_LENGTH
        Label text minimum length
        See Also:
        Constant Field Values
      • LABEL_MAX_LENGTH

        public static final short LABEL_MAX_LENGTH
        Label text maximum length
        See Also:
        Constant Field Values
      • FONT_TYPE_CLEAR_SANS

        public static final byte FONT_TYPE_CLEAR_SANS
        Clear Sans font (Supported only on Intel SECx.x platforms).
        See Also:
        Constant Field Values
    • FONT_TYPE_NEO_SANS_INTEL

      public static final byte FONT_TYPE_NEO_SANS_INTEL
      Neo Sans Intel font (Supported only on Intel ME8.x platforms).
      See Also:
      Constant Field Values
  • Method Detail

    • create

      public static final Label create(short id,
                 int fontColor,
                 XYPair relLocation,
                 java.lang.String text,
                 byte fontType)
                                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.
      fontColor - the color of the font in RGB format (bits 0-7 are blue, bits 8-15 are green, bits 16-23 are red, bits 24-31 are reserved).
      relLocation - The relative location from the parent Widget
      text - the text that will appear in the Label in ASCII encoding
      fontType - The font type
      Returns:
      Label instance
      Throws:
      UiIllegalParameterException - in one of the following cases:
      • Location is negative
      • Text is too long
      • Location exceeds upper bound Widget.MAX_WIDTH and/or Widget.MAX_HEIGHT
      • The font type is not FONT_TYPE_NEO_SANS_INTEL
      • The text length is 0
      UiException
    • getText

      public java.lang.String getText()
      Returns the text contained in the Label
      Returns:
      Returns the text contained in the Label
    • getTextSize

      public static XYPair getTextSize(byte fontType,
                       java.lang.String text)
                                throws UiException
      Returns the text size in pixels (width and height)
      Returns:
      Returns the text size in pixels
      Throws:
      UiIllegalParameterException - in one of the following cases:
      • The font type is not one of the FONT_TYPE_... definitions above.
      • The text length is less than LABEL_MIN_LENGTH.
      • The text length is more than LABEL_MAX_LENGTH.
      • The text length cannot fit dialog width (e.g. length is 0).
      UiException
    • getFontType

      public byte getFontType()
      Returns the font type
      Returns:
      Returns the font type