public class GralShowMethods
extends java.lang.Object
GralUserAction
for widgets.
The show methods can be used by giving its name with GralWidget#setShowMethod(String)
in the configuration
of any widget. The show method may use parameter given with GralWidget.setDataPath(String)
or alternatively with parameter of the show method, for example:
myWidget.setShowMethod("showBool(datapath, green, red)";The string given parameters should be separated with a colon. They are evaluated by first calling the show method. The show method can be configured in a script, see
GralCfgZbnf
.Modifier and Type | Field and Description |
---|---|
GralUserAction |
action_openHelp
This userAction can be used by name (calling
#addFocusAction(String, GralUserAction, String, String)
to set a variable when an input field is leaved. |
GralUserAction |
action_openWindow
This userAction can be used by name (calling
#addFocusAction(String, GralUserAction, String, String)
to set a variable when an input field is leaved. |
private java.lang.String |
getParams |
GralUserAction |
setBar
Shows the back color of the widget depending on the boolean value of a variable.
|
GralUserAction |
showBackColor
Shows the back color of the widget depending on the boolean value of the associated variable.
|
GralUserAction |
syncVariableOnFocus
This userAction can be used by name (calling
#addFocusAction(String, GralUserAction, String, String)
to set a variable when an input field is leaved. |
protected VariableContainer_ifc |
variableContainer
Common aggregation to variables.
|
static int |
version
Version, history and license.
|
Constructor and Description |
---|
GralShowMethods(VariableContainer_ifc container) |
Modifier and Type | Method and Description |
---|---|
void |
registerShowMethods(GralMngBuild_ifc mng) |
public static final int version
showBackColor
stores the value which is used in GralWidget.getFloatValue()
(dyda).
setBar
for a GralValueBar
private java.lang.String getParams
protected final VariableContainer_ifc variableContainer
public final GralUserAction showBackColor
VariableAccess_ifc
instance from which the value is read.
It is because the routine is called as show method in GralWidget.refreshFromVariable(VariableContainer_ifc)
.
The colors should be part of the textual arguments of the show method given in GralWidget.setActionShow(GralUserAction, String[])
.
That textual colors are converted and stored in GralWidget.ConfigData.showParam
.
GralWidget.DynamicData.fValue
for further using,
for example for a change action (on mouse pressed etc. ).
param of exec should be a VariableAccess_ifc-instance. The int value 0, 1, ... is used to select one of the back colors.public final GralUserAction setBar
public final GralUserAction syncVariableOnFocus
#addFocusAction(String, GralUserAction, String, String)
to set a variable when an input field is leaved.public final GralUserAction action_openWindow
#addFocusAction(String, GralUserAction, String, String)
to set a variable when an input field is leaved.public final GralUserAction action_openHelp
#addFocusAction(String, GralUserAction, String, String)
to set a variable when an input field is leaved.public void registerShowMethods(GralMngBuild_ifc mng)