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 |
---|---|
private boolean |
bCallDeprecated |
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()
Deprecated.
use
GralUserAction(String) with a name. The name helps while debugging. |
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.
|
boolean |
userActionGui(int actionCode,
GralWidget widgd,
java.lang.Object... params)
Deprecated.
use
exec(int, GralWidget_ifc, Object...) instead.
The new method exec works with a GralWidget_ifc instead GralWidget as reference for parameter
and is more universal therefore. The method is deprecated to force usage of only one method type.
If any class overrides this method and does not override the non deprecated method, this method is called
if the non deprecated method is called. It is for compatibility. |
boolean |
userActionGui(java.lang.String sIntension,
GralWidget widgd,
java.lang.Object... params)
Deprecated.
use
#exec(int, GralWidget, Object...) . |
public static final java.lang.String version
public final java.lang.String name
private boolean bCallDeprecated
public GralUserAction(java.lang.String ident)
@Deprecated public GralUserAction()
GralUserAction(String)
with a name. The name helps while debugging.@Deprecated public boolean userActionGui(java.lang.String sIntension, GralWidget widgd, java.lang.Object... params)
#exec(int, GralWidget, Object...)
.GralKey
.
GralFileSelector
if a file is entered.
sIntension
- A short string describes the intension of call, means which action is done.
This String is generated from the calling routine.
It isn't able to set by the user usual, expect if it is parameterized in a specific way.
Often the sIntension should not be tested in the users implementation,
because the interface is used only for a specific case. But the action should be checked
then to detect software errors.
With this information the same action method can be used for more as one action type.widgd
- The Gral-widget is given in most cases. It depends some additional static informations
about the widget to control the user action.params
- Some optional values, depending on the sIntension.@Deprecated public boolean userActionGui(int actionCode, GralWidget widgd, java.lang.Object... params)
exec(int, GralWidget_ifc, Object...)
instead.
The new method exec works with a GralWidget_ifc
instead GralWidget
as reference for parameter
and is more universal therefore. The method is deprecated to force usage of only one method type.
If any class overrides this method and does not override the non deprecated method, this method is called
if the non deprecated method is called. It is for compatibility.actionCode
- widgd
- params
- 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()