public class UIHints
extends java.lang.Object
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
.
SBPropertyDescriptor.setUIHints(UIHints)
,
FeatureDescriptor.setDisplayName(String)
,
FeatureDescriptor.setShortDescription(String)
Modifier and Type | Class and Description |
---|---|
static class |
UIHints.TextFontHint
Used to request a font style for String-based properties
|
static 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).
|
Modifier and Type | Field and 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 . |
java.lang.String[] |
proposals
Set a hint for an associated String property to propose to the user
the following values.
|
java.lang.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.
|
java.lang.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.
|
Modifier and Type | Method and Description |
---|---|
static UIHints |
create()
Creates a new
UIHints with all values initialized to default |
UIHints |
setAssociateFieldPicker(boolean associate)
For
String[] 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(java.lang.String... proposals)
Set string proposals that will be offered to the user when editing
an associated String property
|
UIHints |
setTab(java.lang.String tab)
Sets the tab name hint.
|
UIHints |
setTableColumnNames(java.lang.String... tableColumnNames)
Set column names to use for properties displayed in a user interface Table
|
UIHints |
setTextFont(UIHints.TextFontHint hint)
Set the desired font hint for text-field-like controls
|
UIHints |
setTextWidth(UIHints.TextWidthHint width)
Set the desired width hint for text-field-like controls
|
public java.lang.String tab
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.
public boolean maskStringDisplay
This hint may be ignored under certain circumstances, and should not be seen as a security feature.
By default, this hint is false
.
public int numLines
size
. Valid only for a String property.
By default, this hint is 1
.
public java.lang.String[] tableColumnNames
public java.lang.String[] proposals
EnumPropertyDescriptor
or JavaEnumPropertyDescriptor
.public UIHints.TextWidthHint textWidthHint
UIHints.TextWidthHint
public boolean associateFieldPicker
StudioAssistSchemaFieldPicker.getSchemasForFieldPicker(String, Schema[])
public UIHints.TextFontHint textFontHint
UIHints.TextFontHint
public static UIHints create()
UIHints
with all values initialized to defaultUIHints
public UIHints setTab(java.lang.String tab)
&
character in the String.
Note that Schema
properties are always placed in a special tab.tab
- the tab nameUIHints.tab
public UIHints setMaskStringDisplay(boolean maskStringDisplay)
maskStringDisplay
- whether to set the string mask hint or notUIHints.maskStringDisplay
public UIHints setNumLines(int numLines)
numLines
- the number of lines desiredUIHints.numLines
public UIHints setTableColumnNames(java.lang.String... tableColumnNames)
tableColumnNames
- the names of the columns, from first to lastUIHints.tableColumnNames
public UIHints setProposals(java.lang.String... proposals)
proposals
- string values that will be proposed to the userUIHints.proposals
public UIHints setTextWidth(UIHints.TextWidthHint width)
width
- the desired widthpublic UIHints setAssociateFieldPicker(boolean associate)
String[]
properties only, instructs Studio to display a schema field
picker. The operator may participate in this interaction via StudioAssistSchemaFieldPicker.getSchemasForFieldPicker(String, Schema[])
associate
- StudioAssistSchemaFieldPicker
public UIHints setTextFont(UIHints.TextFontHint hint)
hint
- the font hint