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,
|
---|
8 | AudienceMode, XRayMode, Save, Refresh
|
---|
9 | }
|
---|
10 |
|
---|
11 | private static final int ACTIONQUANTITY = Action.values().length;
|
---|
12 |
|
---|
13 | private static IndirectKeyboardActions instance = new IndirectKeyboardActions();
|
---|
14 |
|
---|
15 | private IndirectKeyboardActions() { }
|
---|
16 |
|
---|
17 | public static IndirectKeyboardActions getInstance() { return instance; }
|
---|
18 |
|
---|
19 | public KeyboardAction[] actions = new KeyboardAction[ACTIONQUANTITY];
|
---|
20 |
|
---|
21 | public KeyboardAction getDropDownAction() { return actions[Action.DropDown.ordinal()]; }
|
---|
22 | public KeyboardAction setDropDownAction(final KeyboardAction action) { actions[Action.DropDown.ordinal()] = action; return action; }
|
---|
23 |
|
---|
24 | public KeyboardAction getSizeUpAction() { return actions[Action.SizeUp.ordinal()]; }
|
---|
25 | public KeyboardAction setSizeUpAction(final KeyboardAction action) { actions[Action.SizeUp.ordinal()] = action; return action; }
|
---|
26 |
|
---|
27 | public KeyboardAction getSizeDownAction() { return actions[Action.SizeDown.ordinal()]; }
|
---|
28 | public KeyboardAction setSizeDownAction(final KeyboardAction action) { actions[Action.SizeDown.ordinal()] = action; return action; }
|
---|
29 |
|
---|
30 | public KeyboardAction getChangeColorAction() { return actions[Action.ChangeColor.ordinal()]; }
|
---|
31 | public KeyboardAction setChangeColorAction(final KeyboardAction action) { actions[Action.ChangeColor.ordinal()] = action; return action; }
|
---|
32 |
|
---|
33 | public KeyboardAction getToggleAnnotationAction() { return actions[Action.ToggleAnnotation.ordinal()]; }
|
---|
34 | public KeyboardAction setToggleAnnotationAction(final KeyboardAction action) { actions[Action.ToggleAnnotation.ordinal()] = action; return action; }
|
---|
35 |
|
---|
36 | public KeyboardAction getInsertDateAction() { return actions[Action.InsertDate.ordinal()]; }
|
---|
37 | public KeyboardAction setInsertDateAction(final KeyboardAction action) { actions[Action.InsertDate.ordinal()] = action; return action; }
|
---|
38 |
|
---|
39 | public KeyboardAction getNewFramesetAction() { return actions[Action.NewFrameset.ordinal()]; }
|
---|
40 | public KeyboardAction setNewFramesetAction(final KeyboardAction action) { actions[Action.NewFrameset.ordinal()] = action; return action; }
|
---|
41 |
|
---|
42 | public KeyboardAction getChangeFontStyleAction() { return actions[Action.ChangeFontStyle.ordinal()]; }
|
---|
43 | public KeyboardAction setChangeFontStyleAction(final KeyboardAction action) { actions[Action.ChangeFontStyle.ordinal()] = action; return action; }
|
---|
44 |
|
---|
45 | public KeyboardAction getChangeFontFamilyAction() { return actions[Action.ChangeFontFamily.ordinal()]; }
|
---|
46 | public KeyboardAction setChangeFontFamilyAction(final KeyboardAction action) { actions[Action.ChangeFontFamily.ordinal()] = action; return action; }
|
---|
47 |
|
---|
48 | public KeyboardAction getAudienceModeAction() { return actions[Action.AudienceMode.ordinal()]; }
|
---|
49 | public KeyboardAction setAudienceModeAction(final KeyboardAction action) { actions[Action.AudienceMode.ordinal()] = action; return action; }
|
---|
50 |
|
---|
51 | public KeyboardAction getXRayModeAction() { return actions[Action.XRayMode.ordinal()]; }
|
---|
52 | public KeyboardAction setXRayModeAction(final KeyboardAction action) { actions[Action.XRayMode.ordinal()] = action; return action; }
|
---|
53 |
|
---|
54 | public KeyboardAction getSaveAction() { return actions[Action.Save.ordinal()]; }
|
---|
55 | public KeyboardAction setSaveAction(final KeyboardAction action) { actions[Action.Save.ordinal()] = action; return action; }
|
---|
56 |
|
---|
57 | public KeyboardAction getRefreshAction() { return actions[Action.Refresh.ordinal()]; }
|
---|
58 | public KeyboardAction setRefreshAction(final KeyboardAction action) { actions[Action.Refresh.ordinal()] = action; return action; }
|
---|
59 | }
|
---|