Interface LabelCSSConstants


@API(type=EXTENDABLE, src=PUBLIC) public interface LabelCSSConstants
Processed arguments of the oxy_label function.
  • Field Details

    • TEXT_PROPERTY

      static final String TEXT_PROPERTY
      The text that will be displayed as a label. A string value.
      See Also:
    • WIDTH_PROPERTY

      static final String WIDTH_PROPERTY
      The width of the label. An RelativeLength.

      Note: In case you don't have the possibility to build a RelativeLength then you can use the STYLES_PROPERTY to give the width as a string: * { width:100px; }

      See Also:
    • TEXT_ALIGN_PROPERTY

      static final String TEXT_ALIGN_PROPERTY
      The alignment of the label. A string value: left, right or center.
      See Also:
    • COLOR_PROPERTY

      static final String COLOR_PROPERTY
      A foreground color for the text. A Color.
      See Also:
    • BACKGROUND_COLOR_PROPERTY

      static final String BACKGROUND_COLOR_PROPERTY
      A background color for the label. A Color.
      See Also:
    • STYLES_PROPERTY

      static final String STYLES_PROPERTY

      Possibility to specify CSS rules for this label.

      Example: * { text-align:right; color:red; }

      The selectors are ignored, all rules are considered to match.

      You can also specify as CSS something like: @import 'label_styles.css'; Relative imports will be resolved relative to BASE_SYSTEM_ID. This approach is useful to easily reuse the same styles for more oxy_labels.

      The following properties are handled:
      • font-weight, font-size, font-style, font
      • text-align, text-decoration
      • width
      • color, background-color
      See Also:
    • BASE_SYSTEM_ID

      static final String BASE_SYSTEM_ID
      Base system id to be used to resolve imports from STYLES_PROPERTY. This normally is the system ID of the CSS file in which the oxy_label was encountered.
      See Also: