public interface CustomUserInputConfiguration
GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method) has
been exited, an UI with corresponding UI elements (that allows the end user to configure the settings) will be
generated.
TooManyUserInputsRegistered
exception, except for setting
the description text (using the setDescriptionText(String)
method).
id
identifier parameter of all the user input registration methods must be unique and constant over time
and versions of the driver URCap as this is used for persistence of user input values.Modifier and Type | Method and Description |
---|---|
void |
addFiller()
Add a filler element to control/group layout.
|
TextComponent |
addText(String label,
Icon icon,
String text)
Add a label, an icon and an associated text.
|
TextComponent |
addText(String label,
String text)
Add a label and an associated text.
|
<T> T |
deprecateUserInput(UserInput<T> userInput)
Deprecate a registered user input that was used in an older version of the driver URCap to handle backwards
compatibility between driver URCap versions.
|
BooleanUserInput |
registerBooleanInput(String id,
String label,
boolean initialSelection)
T
Request a boolean-based user input where the end user can check/uncheck a checkbox.
|
<T> SelectableUserInput<T> |
registerComboBoxInput(String id,
String label,
String undefinedSelection,
List<T> elements,
ElementResolver<T> resolver)
Request a combo box user input with a static list of elements (i.e.
|
DoubleUserInput |
registerDoubleInput(String id,
String label,
String unit,
double initialValue,
double minValue,
double maxValue)
Request a user input where the end user can enter a double (a decimal number) through a number input field.
|
IntegerUserInput |
registerIntegerInput(String id,
String label,
String unit,
int initialValue,
int minValue,
int maxValue)
Request a user input where the end user can enter an integer through a number input field.
|
StringUserInput |
registerIPAddressInput(String id,
String label,
String initialIPAddressStr)
Request a string-based user input where the end user can enter an IP-address through a text input field.
|
<T> SelectableUserInput<T> |
registerPreselectedComboBoxInput(String id,
String label,
T initialSelection,
List<T> elements,
ElementResolver<T> resolver)
Request a combo box user input with a static list of elements (i.e.
|
StringUserInput |
registerStringInput(String id,
String label,
String initialText)
Request a user input where the end user can enter a string through a text input field.
|
void |
setDescriptionText(String text)
Set a description text displayed in a dedicated section above the first registered user input.
|
void setDescriptionText(String text)
text
- the description text, not null
.CalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)StringUserInput registerStringInput(String id, String label, String initialText)
id
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the text input field, not null
. The text will automatically be
truncated (with 3 dots) when text is too long.initialText
- the initial (default) text displayed in the text input field field if the user has not yet entered
a string, not null
TooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedIDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)StringUserInput registerIPAddressInput(String id, String label, String initialIPAddressStr)
id
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the text input field, not null
. The text will automatically be
truncated (with 3 dots) when text is too long.initialIPAddressStr
- the initial IP address string (default) displayed in the text input field if the user
has not yet entered an IP address, not null
TooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedIDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)BooleanUserInput registerBooleanInput(String id, String label, boolean initialSelection)
id
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the checkbox, not null
. The text will automatically be truncated
(with 3 dots)when text is too long.initialSelection
- the initial (default) state of the checkbox if the user has not yet altered it. A true
value
corresponds to the checked state and false
corresponds to the unchecked state.TooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedIDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)IntegerUserInput registerIntegerInput(String id, String label, String unit, int initialValue, int minValue, int maxValue)
id
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the number input field, not null
. The text will automatically
be truncated (with 3 dots) when text is too long.unit
- the text for the unit of the input displayed after the number input field, not null
. Pass an
empty string if the input is has no unit.initialValue
- the initial (default) value displayed in the number input field if the user has not yet entered
a valueminValue
- the minimum value allowed to be enteredmaxValue
- the maximum value allowed to be enteredTooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedInvalidUserInputRange
- if minValue
> maxValue
or initialValue
is outside the
range defined by minValue
and maxValue
.IDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)DoubleUserInput registerDoubleInput(String id, String label, String unit, double initialValue, double minValue, double maxValue)
id
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the number input field, not null
. The text will automatically
be truncated (with 3 dots) when text is too long.unit
- the text for the unit of the input displayed after the number input field, not null
. Pass an
empty string if the input is has no unit.initialValue
- the initial (default) value displayed in the number input field if the user has not yet entered
a valueminValue
- the minimum value allowed to be enteredmaxValue
- the maximum value allowed to be enteredTooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedInvalidUserInputRange
- if minValue
> maxValue
or initialValue
is outside the
range defined by minValue
and maxValue
.IDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)<T> SelectableUserInput<T> registerPreselectedComboBoxInput(String id, String label, T initialSelection, List<T> elements, ElementResolver<T> resolver)
T
- The (generic) type parameter for the method representing the type of elements selected by the userid
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the combo box, not null
. The text will automatically be truncated
(with 3 dots) when text is too long.initialSelection
- the initial default selection if the user has not yet altered it.elements
- the elements to be selectable in the combo box, not null
resolver
- a custom resolver responsible for correctly identifying each element in the combo box, not null
ElementListCannotBeEmpty
- if elements is an empty listTooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedIDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierDuplicateElementID
- if the ElementResolver.getId(Object)
method does not return a unique identifier
for all elements in the elements
list.InvalidSelection
- if the initialSelection
element is not in the elements
list, i.e. the
resolved identifier of the initialSelection
element (returned by ElementResolver.getId(Object)
)
is not equal to the resolved identifier of any of the elements in the elements
list.CalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)<T> SelectableUserInput<T> registerComboBoxInput(String id, String label, String undefinedSelection, List<T> elements, ElementResolver<T> resolver)
Request a combo box user input with a static list of elements (i.e. the combo box content can not be updated after registration) of a proprietary (custom) type.
The initial selection is a string which by definition is not a valid selection. The string should guide the user to make a correct selection, i.e. describe what action to do or what is to be selected, e.g. "<Mounting>" or "Select".
The selection is not valid until the user changes it and will mark any program nodes for the driver contribution as undefined.T
- The (generic) type parameter for the method representing the type of elements selected by the userid
- the unique identifier for the input, not null
nor an empty string. Must be unique and constant
over time and versions of the driver URCap as this is used for persistence of user input values.label
- the text displayed in front of the combo box, not null
. The text will automatically be truncated
(with 3 dots) when text is too long.undefinedSelection
- the initial default selection if the user has not yet altered it, not null
. The
string should guide the user to make a correct selection (i.e. describe what action to
do or what is to be selected, e.g. "<Mounting>" or "Select").elements
- the elements to be selectable in the combo box, not null
.resolver
- a custom resolver responsible for correctly identifying each element in the combo box, not null
ElementListCannotBeEmpty
- if elements is an empty listTooManyUserInputsRegistered
- if adding this user input will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedIDAlreadyDefined
- if a different user input previously has been registered with the same id
identifierDuplicateElementID
- if the ElementResolver.getId(Object)
method does not return a unique identifier
for all elements in the elements
list.InvalidSelection
- if the initialSelection
element is not in the elements
list, i.e. the
resolved identifier of the initialSelection
element (returned by ElementResolver.getId(Object)
)
is not equal to the resolved identifier of any of the elements in the elements
list.CalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)TextComponent addText(String label, String text)
label
- the text displayed in front of the text itself, not null
. The text will automatically be
truncated (with 3 dots) when text is too long.text
- the text, not null
. The text will automatically be truncated (with 3 dots) when text is too
long.TooManyUserInputsRegistered
- if adding this UI element will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)TextComponent addText(String label, Icon icon, String text)
Add a label, an icon and an associated text. This can be used for, e.g. displaying status information for the end user.
Supports 24x24 pixels icons for CB3 robots and 30x30 pixel icons for e-Series robots. The provided icon will be scaled automatically, if necessary.label
- the text displayed in front of the text itself, not null
. The text will automatically be
truncated (with 3 dots) when text is too long.icon
- the icon displayed immediately in front of the text itself. Passing null
is allowed and will
clear the icon.text
- the text, not null
. The text will automatically be truncated (with 3 dots) when text is too
long.TooManyUserInputsRegistered
- if adding this UI element will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)void addFiller()
TooManyUserInputsRegistered
- if adding this UI element will exceed the total maximum of 10 registered user
inputs and/or non-user input UI elements (such as text components and fillers)
allowedCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)<T> T deprecateUserInput(UserInput<T> userInput)
Deprecate a registered user input that was used in an older version of the driver URCap to handle backwards compatibility between driver URCap versions. The end user will no longer be able see the deprecated user input UI element or modify the value of it in this URCap version.
Deprecating a user input is useful when a previous version of the driver URCap had a need for the given user input, but the current version no longer needs it. This can for instance be relevant when the "format" of the user input needs to be changed in a new URCap version, e.g. a previous checkbox user input needs to be changed to a combo box user input. Using this method, the old user input value can be migrated/adapted to the new user input definition/format, so the end user's previously stored configuration is not lost.
Note: The user input to be deprecated still needs to be registered (prior to deprecation) in order to have access to the old value.userInput
- the user input to deprecateCalledOutsideUserInputConfigurationPhase
- when this method is called from outside the method scope of the
Configuration phase (e.g. the GripperContribution.configureInstallation(com.ur.urcap.api.contribution.driver.general.userinput.CustomUserInputConfiguration, com.ur.urcap.api.contribution.driver.gripper.SystemConfiguration, com.ur.urcap.api.contribution.driver.general.tcp.TCPConfiguration, com.ur.urcap.api.contribution.driver.gripper.GripperAPIProvider)
method)Copyright © 2020. All rights reserved.