Class UIHints
- java.lang.Object
-
- com.streambase.sb.operator.parameter.UIHints
-
public class UIHints extends Object
AUIHints
may be associated with aSBPropertyDescriptor
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
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
UIHints.TextFontHint
Used to request a font style for String-based propertiesstatic class
UIHints.TextWidthHint
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
associateFieldPicker
Set a hint for String[] properties to request that Studio display a field chooser out of schemas managed by the operator.boolean
maskStringDisplay
Set a hint for the associated property to mask displayed characters when presented to the end-user.int
numLines
Set a hint for the associated property to be displayed as a multiline editable box of height (number of lines)size
.String[]
proposals
Set a hint for an associated String property to propose to the user the following values.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.String[]
tableColumnNames
Set a hint for the associated table property to be displayed with the following column names.UIHints.TextFontHint
textFontHint
Set a hint for text-field like properties to use a different font style.UIHints.TextWidthHint
textWidthHint
Set a hint for text-field like properties to have a relative width.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static UIHints
create()
Creates a newUIHints
with all values initialized to defaultUIHints
setAssociateFieldPicker(boolean associate)
ForString[]
properties only, instructs Studio to display a schema field picker.UIHints
setMaskStringDisplay(boolean maskStringDisplay)
Sets the mask hint, applicable to String property types.UIHints
setNumLines(int numLines)
Sets the number of lines to display this property as, applicable to String property types.UIHints
setProposals(String... proposals)
Set string proposals that will be offered to the user when editing an associated String propertyUIHints
setTab(String tab)
Sets the tab name hint.UIHints
setTableColumnNames(String... tableColumnNames)
Set column names to use for properties displayed in a user interface TableUIHints
setTextFont(UIHints.TextFontHint hint)
Set the desired font hint for text-field-like controlsUIHints
setTextWidth(UIHints.TextWidthHint width)
Set the desired width hint for text-field-like controls
-
-
-
Field Detail
-
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 forSchema
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 anEnumPropertyDescriptor
orJavaEnumPropertyDescriptor
.- 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:
UIHints.TextWidthHint
-
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:
StudioAssistSchemaFieldPicker.getSchemasForFieldPicker(String, Schema[])
-
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:
UIHints.TextFontHint
-
-
Method Detail
-
create
public static UIHints create()
Creates a newUIHints
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 thatSchema
properties are always placed in a special tab.- Parameters:
tab
- the tab name- Returns:
- this, useful for chaining method calls
- See Also:
tab
-
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:
maskStringDisplay
-
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:
numLines
-
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:
tableColumnNames
-
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:
proposals
-
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)
ForString[]
properties only, instructs Studio to display a schema field picker. The operator may participate in this interaction viaStudioAssistSchemaFieldPicker.getSchemasForFieldPicker(String, Schema[])
- Parameters:
associate
-- Returns:
- this, useful for chaining method calls
- Since:
- 7.2.3
- See Also:
StudioAssistSchemaFieldPicker
-
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
-
-