Class UIHints

java.lang.Object
com.streambase.sb.operator.parameter.UIHints

public class UIHints extends Object
A UIHints may be associated with a SBPropertyDescriptor in order to provide the Studio environment with additional hints regarding how to display a property.

If you wish to toggle the UI widget enablement state for a property, see Parameterizable.

Since:
6.1.2
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Used to request a font style for String-based properties
    static enum 
    Used to request a particular width for text-field like controls (including but not limited to text fields and combo/drop-downs).
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    boolean
    Set a hint for String[] properties to request that Studio display a field chooser out of schemas managed by the operator.
    boolean
    Set a hint for the associated property to mask displayed characters when presented to the end-user.
    int
    Set a hint for the associated property to be displayed as a multiline editable box of height (number of lines) size.
    Set a hint for an associated String property to propose to the user the following values.
    Name to give the tab in which the associated property will be created in, when displayed in the Properties View of StreamBase Studio.
    Set a hint for the associated table property to be displayed with the following column names.
    Set a hint for text-field like properties to use a different font style.
    Set a hint for text-field like properties to have a relative width.
  • Method Summary

    Modifier and Type
    Method
    Description
    static UIHints
    Creates a new UIHints with all values initialized to default
    setAssociateFieldPicker(boolean associate)
    For String[] properties only, instructs Studio to display a schema field picker.
    setMaskStringDisplay(boolean maskStringDisplay)
    Sets the mask hint, applicable to String property types.
    setNumLines(int numLines)
    Sets the number of lines to display this property as, applicable to String property types.
    setProposals(String... proposals)
    Set string proposals that will be offered to the user when editing an associated String property
    Sets the tab name hint.
    setTableColumnNames(String... tableColumnNames)
    Set column names to use for properties displayed in a user interface Table
    Set the desired font hint for text-field-like controls
    Set the desired width hint for text-field-like controls

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • tab

      public String tab
      Name to give the tab in which the associated property will be created in, when displayed in the Properties View of StreamBase Studio. Ignored for Schema properties.

      This string will be used as-is as the tab title. All properties sharing the same tab name will be placed together.

      By default, Studio will place all properties in one common tab.

    • maskStringDisplay

      public boolean maskStringDisplay
      Set a hint for the associated property to mask displayed characters when presented to the end-user. Applies only to a String property, otherwise this call will have no effect.

      This hint may be ignored under certain circumstances, and should not be seen as a security feature.

      By default, this hint is false.

    • numLines

      public int numLines
      Set a hint for the associated property to be displayed as a multiline editable box of height (number of lines) size. Valid only for a String property.

      By default, this hint is 1.

    • tableColumnNames

      public String[] tableColumnNames
      Set a hint for the associated table property to be displayed with the following column names. As of 7.3.5, there is support for at most two columns (for Map and String[][] types).
      Since:
      7.1
    • proposals

      public String[] proposals
      Set a hint for an associated String property to propose to the user the following values. The user is not limited to just these values; for that purpose, use an EnumPropertyDescriptor or JavaEnumPropertyDescriptor.
      Since:
      7.3.1
    • textWidthHint

      public UIHints.TextWidthHint textWidthHint
      Set a hint for text-field like properties to have a relative width.
      Since:
      7.5.1
      See Also:
    • associateFieldPicker

      public boolean associateFieldPicker
      Set a hint for String[] properties to request that Studio display a field chooser out of schemas managed by the operator.
      Since:
      7.2.3
      See Also:
    • textFontHint

      public UIHints.TextFontHint textFontHint
      Set a hint for text-field like properties to use a different font style.
      Since:
      7.7.3
      See Also:
  • Method Details

    • create

      public static UIHints create()
      Creates a new UIHints with all values initialized to default
      Returns:
      a new UIHints
    • setTab

      public UIHints setTab(String tab)
      Sets the tab name hint. Do not use the & character in the String. Note that Schema properties are always placed in a special tab.
      Parameters:
      tab - the tab name
      Returns:
      this, useful for chaining method calls
      See Also:
    • setMaskStringDisplay

      public UIHints setMaskStringDisplay(boolean maskStringDisplay)
      Sets the mask hint, applicable to String property types.
      Parameters:
      maskStringDisplay - whether to set the string mask hint or not
      Returns:
      this, useful for chaining method calls
      See Also:
    • setNumLines

      public UIHints setNumLines(int numLines)
      Sets the number of lines to display this property as, applicable to String property types.
      Parameters:
      numLines - the number of lines desired
      Returns:
      this, useful for chaining method calls
      See Also:
    • setTableColumnNames

      public UIHints setTableColumnNames(String... tableColumnNames)
      Set column names to use for properties displayed in a user interface Table
      Parameters:
      tableColumnNames - the names of the columns, from first to last
      Returns:
      this, useful for chaining method calls
      Since:
      7.1
      See Also:
    • setProposals

      public UIHints setProposals(String... proposals)
      Set string proposals that will be offered to the user when editing an associated String property
      Parameters:
      proposals - string values that will be proposed to the user
      Returns:
      this, useful for chaining method calls
      Since:
      7.3.1
      See Also:
    • setTextWidth

      public UIHints setTextWidth(UIHints.TextWidthHint width)
      Set the desired width hint for text-field-like controls
      Parameters:
      width - the desired width
      Returns:
      this, useful for chaining method calls
      Since:
      7.5.1
    • setAssociateFieldPicker

      public UIHints setAssociateFieldPicker(boolean associate)
      For String[] properties only, instructs Studio to display a schema field picker. The operator may participate in this interaction via StudioAssistSchemaFieldPicker.getSchemasForFieldPicker(String, Schema[])
      Parameters:
      associate -
      Returns:
      this, useful for chaining method calls
      Since:
      7.2.3
      See Also:
    • setTextFont

      public UIHints setTextFont(UIHints.TextFontHint hint)
      Set the desired font hint for text-field-like controls
      Parameters:
      hint - the font hint
      Returns:
      this, useful for chaining method calls
      Since:
      7.7.3