[943] | 1 | package org.expeditee.gui.indirect.keyboard;
|
---|
| 2 |
|
---|
| 3 | public class IndirectKeyboardActions {
|
---|
| 4 |
|
---|
| 5 | private enum Action {
|
---|
| 6 | //Function Keys
|
---|
| 7 | DropDown, SizeUp, SizeDown, ChangeColor, ToggleAnnotation, InsertDate, NewFrameset, ChangeFontStyle, ChangeFontFamily,
|
---|
[944] | 8 | AudienceMode, XRayMode, Save, Refresh,
|
---|
| 9 | //Process character
|
---|
| 10 | NewText, InsertCharacter
|
---|
[943] | 11 | }
|
---|
| 12 |
|
---|
| 13 | private static final int ACTIONQUANTITY = Action.values().length;
|
---|
| 14 |
|
---|
| 15 | private static IndirectKeyboardActions instance = new IndirectKeyboardActions();
|
---|
| 16 |
|
---|
| 17 | private IndirectKeyboardActions() { }
|
---|
| 18 |
|
---|
| 19 | public static IndirectKeyboardActions getInstance() { return instance; }
|
---|
| 20 |
|
---|
| 21 | public KeyboardAction[] actions = new KeyboardAction[ACTIONQUANTITY];
|
---|
| 22 |
|
---|
| 23 | public KeyboardAction getDropDownAction() { return actions[Action.DropDown.ordinal()]; }
|
---|
| 24 | public KeyboardAction setDropDownAction(final KeyboardAction action) { actions[Action.DropDown.ordinal()] = action; return action; }
|
---|
| 25 |
|
---|
| 26 | public KeyboardAction getSizeUpAction() { return actions[Action.SizeUp.ordinal()]; }
|
---|
| 27 | public KeyboardAction setSizeUpAction(final KeyboardAction action) { actions[Action.SizeUp.ordinal()] = action; return action; }
|
---|
| 28 |
|
---|
| 29 | public KeyboardAction getSizeDownAction() { return actions[Action.SizeDown.ordinal()]; }
|
---|
| 30 | public KeyboardAction setSizeDownAction(final KeyboardAction action) { actions[Action.SizeDown.ordinal()] = action; return action; }
|
---|
| 31 |
|
---|
| 32 | public KeyboardAction getChangeColorAction() { return actions[Action.ChangeColor.ordinal()]; }
|
---|
| 33 | public KeyboardAction setChangeColorAction(final KeyboardAction action) { actions[Action.ChangeColor.ordinal()] = action; return action; }
|
---|
| 34 |
|
---|
| 35 | public KeyboardAction getToggleAnnotationAction() { return actions[Action.ToggleAnnotation.ordinal()]; }
|
---|
| 36 | public KeyboardAction setToggleAnnotationAction(final KeyboardAction action) { actions[Action.ToggleAnnotation.ordinal()] = action; return action; }
|
---|
| 37 |
|
---|
| 38 | public KeyboardAction getInsertDateAction() { return actions[Action.InsertDate.ordinal()]; }
|
---|
| 39 | public KeyboardAction setInsertDateAction(final KeyboardAction action) { actions[Action.InsertDate.ordinal()] = action; return action; }
|
---|
| 40 |
|
---|
| 41 | public KeyboardAction getNewFramesetAction() { return actions[Action.NewFrameset.ordinal()]; }
|
---|
| 42 | public KeyboardAction setNewFramesetAction(final KeyboardAction action) { actions[Action.NewFrameset.ordinal()] = action; return action; }
|
---|
| 43 |
|
---|
| 44 | public KeyboardAction getChangeFontStyleAction() { return actions[Action.ChangeFontStyle.ordinal()]; }
|
---|
| 45 | public KeyboardAction setChangeFontStyleAction(final KeyboardAction action) { actions[Action.ChangeFontStyle.ordinal()] = action; return action; }
|
---|
| 46 |
|
---|
| 47 | public KeyboardAction getChangeFontFamilyAction() { return actions[Action.ChangeFontFamily.ordinal()]; }
|
---|
| 48 | public KeyboardAction setChangeFontFamilyAction(final KeyboardAction action) { actions[Action.ChangeFontFamily.ordinal()] = action; return action; }
|
---|
| 49 |
|
---|
| 50 | public KeyboardAction getAudienceModeAction() { return actions[Action.AudienceMode.ordinal()]; }
|
---|
| 51 | public KeyboardAction setAudienceModeAction(final KeyboardAction action) { actions[Action.AudienceMode.ordinal()] = action; return action; }
|
---|
| 52 |
|
---|
| 53 | public KeyboardAction getXRayModeAction() { return actions[Action.XRayMode.ordinal()]; }
|
---|
| 54 | public KeyboardAction setXRayModeAction(final KeyboardAction action) { actions[Action.XRayMode.ordinal()] = action; return action; }
|
---|
| 55 |
|
---|
| 56 | public KeyboardAction getSaveAction() { return actions[Action.Save.ordinal()]; }
|
---|
| 57 | public KeyboardAction setSaveAction(final KeyboardAction action) { actions[Action.Save.ordinal()] = action; return action; }
|
---|
| 58 |
|
---|
| 59 | public KeyboardAction getRefreshAction() { return actions[Action.Refresh.ordinal()]; }
|
---|
| 60 | public KeyboardAction setRefreshAction(final KeyboardAction action) { actions[Action.Refresh.ordinal()] = action; return action; }
|
---|
[944] | 61 |
|
---|
| 62 | public KeyboardAction getCreateNewTextAction() { return actions[Action.NewText.ordinal()]; }
|
---|
| 63 | public KeyboardAction setCreateNewTextAction(final KeyboardAction action) { actions[Action.NewText.ordinal()] = action; return action; }
|
---|
| 64 |
|
---|
| 65 | public KeyboardAction getInsertCharacterAction() { return actions[Action.InsertCharacter.ordinal()]; }
|
---|
| 66 | public KeyboardAction setInsertCharacterAction(final KeyboardAction action) { actions[Action.InsertCharacter.ordinal()] = action; return action; }
|
---|
[943] | 67 | }
|
---|