public class FcmdButtons
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
FcmdButtons.ButtonAction |
Modifier and Type | Field and Description |
---|---|
(package private) GralUserAction |
actionMainKeys
The main key action registered in the
GralMng.setMainKeyAction(GralUserAction) . |
(package private) GralUserAction |
actionViewButtons
Action to focus the cmd card.
|
(package private) java.lang.String[] |
b1
This is only a helper String array to associate button texts from
FCmdIdent in form "aF1:Text"
and there action to the viewable buttons. |
(package private) boolean |
bButtonVisible |
(package private) GralButton |
buttonDel |
(package private) FcmdButtons.ButtonAction |
currentButton |
(package private) FcmdButtons.ButtonAction |
emptyButton |
(package private) java.util.Map<java.lang.String,FcmdButtons.ButtonAction> |
idxButtons |
(package private) java.util.Map<java.lang.Integer,GralUserAction> |
idxKeyAction
Actions for all keys in
#keys . |
private Fcmd |
main |
static int |
version
Version, history and copyright/copyleft.
|
Constructor and Description |
---|
FcmdButtons(Fcmd main) |
Modifier and Type | Method and Description |
---|---|
private void |
addButton(int idx,
java.util.Iterator<java.util.Map.Entry<java.lang.String,FcmdButtons.ButtonAction>> iterButtonAction)
Assigns the next action to the
#keyAction and creates the button. |
(package private) FcmdButtons.ButtonAction |
getNext(int idx,
java.util.Iterator<java.util.Map.Entry<java.lang.String,FcmdButtons.ButtonAction>> iterButtonAction)
Get the proper button for the requested idx in
b1 . |
(package private) void |
initPanelButtons() |
(package private) boolean |
processKey(int keyCode,
GralWidget_ifc widg)
Searches the given keyCode and processes its action.
|
(package private) void |
setBtnMenuAndKeys(GralUserAction action,
java.lang.String buttonText,
int key,
int key2,
java.lang.String menu)
Assign an action to any function button, menu and key.
|
(package private) void |
setBtnMenuAndKeys(GralUserAction action,
java.lang.String buttonText,
int key,
java.lang.String menu)
Assign an action to any function button, menu and key.
|
public static final int version
#processKey(int)
: Now all control keys are set together with the buttons
in #setBtnMenuAndKeys(GralUserAction, String)
.
private final Fcmd main
GralButton buttonDel
boolean bButtonVisible
FcmdButtons.ButtonAction emptyButton
java.util.Map<java.lang.String,FcmdButtons.ButtonAction> idxButtons
final java.lang.String[] b1
FCmdIdent
in form "aF1:Text"
and there action to the viewable buttons.
The order of character are in alphabetic one because the given button control texts are processed in that order.java.util.Map<java.lang.Integer,GralUserAction> idxKeyAction
#keys
.FcmdButtons.ButtonAction currentButton
GralUserAction actionMainKeys
GralMng.setMainKeyAction(GralUserAction)
.GralUserAction actionViewButtons
FcmdButtons(Fcmd main)
void setBtnMenuAndKeys(GralUserAction action, java.lang.String buttonText, int key, int key2, java.lang.String menu)
action
- The actionbuttonText
- use the form "Btn:text" where button is F1..F12, aF1 etc. text is the text.void setBtnMenuAndKeys(GralUserAction action, java.lang.String buttonText, int key, java.lang.String menu)
action
- The actionbuttonText
- use the form "Btn:text" where button is F1..F12, aF1 etc. text is the text.FcmdButtons.ButtonAction getNext(int idx, java.util.Iterator<java.util.Map.Entry<java.lang.String,FcmdButtons.ButtonAction>> iterButtonAction)
b1
.idx
- iterButtonAction
- emptyButton
if no button matches.private void addButton(int idx, java.util.Iterator<java.util.Map.Entry<java.lang.String,FcmdButtons.ButtonAction>> iterButtonAction)
#keyAction
and creates the button.idx
- iterButtonAction
- void initPanelButtons()
boolean processKey(int keyCode, GralWidget_ifc widg)
#setBtnMenuAndKeys(GralUserAction, String)
with key assignment in FcmdIdents
.keyCode
-