public abstract class GralUserAction extends java.lang.Object
GralWidget.sCmd
can be used to determine
the action when this method is invoked. This value can be set in the build phase
of the GUI to some widgets to have an adequate user action. If a script is used for build, it is the
parameter 'cmd=CMD'.
GralMngBuild_ifc#registerUserAction(String, UserActionGui)
.
GralWidget
as parameter while calling.
Modifier and Type | Field and Description |
---|---|
java.lang.String |
name
The name of the action on construction, may be used to register, used for debug.
|
static java.lang.String |
version
Version, history and license.
|
Constructor and Description |
---|
GralUserAction(java.lang.String ident) |
Modifier and Type | Method and Description |
---|---|
boolean |
exec(int actionCode,
GralWidget_ifc widgd,
java.lang.Object... params)
This method should be override by the users class.
|
java.lang.String |
toString()
Only for debug, to see what it is.
|
public final java.lang.String name
public static final java.lang.String version
public GralUserAction(java.lang.String ident)
public boolean exec(int actionCode, GralWidget_ifc widgd, java.lang.Object... params)
GralUserAction
is associated to a specific widget.
GralUserAction
super class, it tries to call
the deprecated userActionGui(int, GralWidget, Object...)
because that method may be overridden.actionCode
- See KeyCode
. Any special action is designated with 0.widgd
- The Gral which calls this method in any of its implementation methods.
This parameter designates the source of the call with some specific properties in the widget.
For example ((GralWidget)widgd).getCmd() can be invoked.params
- Some optional values, depending on special user designation. In most cases no parameter.
The user may be test the type of parameter for complex usage.public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()