[942] | 1 | package org.expeditee.gui.indirect.mouse;
|
---|
| 2 |
|
---|
| 3 | public class IndirectMouseActions {
|
---|
| 4 |
|
---|
[943] | 5 | private enum Action {
|
---|
| 6 | //Left Mouse
|
---|
| 7 | BACK, TDFC, FRAMENAMECLICK, FOLLOWLINK, EXECUTEACTION,
|
---|
| 8 | //Right Mouse
|
---|
| 9 | CREATERECTANGLE, EXTENDLINE, MAKEGROUPCOPY, MAKECOPY, EXTRUDE, RUBBERBANDCOPY,
|
---|
| 10 | RUBBERBANDCORNERCOPY, STAMP, MERGESINGLE, MERGETWO, MERGEGROUP,
|
---|
| 11 | //Middle Mouse
|
---|
| 12 | NEWLINE, GROUPPICKUP, DETACHLINE, ANCHORFREEITEMS, DELETEITEMS
|
---|
| 13 | }
|
---|
| 14 |
|
---|
| 15 | private static final int ACTIONQUANTITY = Action.values().length;
|
---|
| 16 |
|
---|
[942] | 17 | private static IndirectMouseActions instance = new IndirectMouseActions();
|
---|
| 18 |
|
---|
| 19 | private IndirectMouseActions() { }
|
---|
| 20 |
|
---|
| 21 | public static IndirectMouseActions getInstance() { return instance; }
|
---|
| 22 |
|
---|
| 23 | public MouseAction[] actions = new MouseAction[ACTIONQUANTITY];
|
---|
| 24 |
|
---|
[943] | 25 | public MouseAction getBackAction() { return actions[Action.BACK.ordinal()]; }
|
---|
| 26 | public MouseAction setBackAction(final MouseAction action) { actions[Action.BACK.ordinal()] = action; return action; }
|
---|
| 27 |
|
---|
| 28 | public MouseAction getTDFCAction() { return actions[Action.TDFC.ordinal()]; }
|
---|
| 29 | public MouseAction setTDFCAction(final MouseAction action) { actions[Action.TDFC.ordinal()] = action; return action; }
|
---|
| 30 |
|
---|
| 31 | public MouseAction getRespondToFrameNameClickAction() { return actions[Action.FRAMENAMECLICK.ordinal()]; }
|
---|
| 32 | public MouseAction setRespondToFrameNameClickAction(final MouseAction action) { actions[Action.FRAMENAMECLICK.ordinal()] = action; return action; }
|
---|
| 33 |
|
---|
| 34 | public MouseAction getFollowLinkAction() { return actions[Action.FOLLOWLINK.ordinal()]; }
|
---|
| 35 | public MouseAction setFollowLinkAction(final MouseAction action) { actions[Action.FOLLOWLINK.ordinal()] = action; return action; }
|
---|
| 36 |
|
---|
| 37 | public MouseAction getExecuteActionAction() { return actions[Action.EXECUTEACTION.ordinal()]; }
|
---|
| 38 | public MouseAction setExecuteActionAction(final MouseAction action) { actions[Action.EXECUTEACTION.ordinal()] = action; return action; }
|
---|
| 39 |
|
---|
| 40 | public MouseAction getCreateRectangleAction() { return actions[Action.CREATERECTANGLE.ordinal()]; }
|
---|
| 41 | public MouseAction setCreateRectangleAction(final MouseAction action) { actions[Action.CREATERECTANGLE.ordinal()] = action; return action; }
|
---|
| 42 |
|
---|
| 43 | public MouseAction getExtendLineAction() { return actions[Action.EXTENDLINE.ordinal()]; }
|
---|
| 44 | public MouseAction setExtendLineAction(final MouseAction action) { actions[Action.EXTENDLINE.ordinal()] = action; return action; }
|
---|
| 45 |
|
---|
| 46 | public MouseAction getMakeGroupCopyAction() { return actions[Action.MAKEGROUPCOPY.ordinal()]; }
|
---|
| 47 | public MouseAction setMakeGroupCopyAction(final MouseAction action) { actions[Action.MAKEGROUPCOPY.ordinal()] = action; return action; }
|
---|
| 48 |
|
---|
| 49 | public MouseAction getMakeCopyAction() { return actions[Action.MAKECOPY.ordinal()]; }
|
---|
| 50 | public MouseAction setMakeCopyAction(final MouseAction action) { actions[Action.MAKECOPY.ordinal()] = action; return action; }
|
---|
| 51 |
|
---|
| 52 | public MouseAction getExtrudeAction() { return actions[Action.EXTRUDE.ordinal()]; }
|
---|
| 53 | public MouseAction setExtrudeAction(final MouseAction action) { actions[Action.EXTRUDE.ordinal()] = action; return action; }
|
---|
| 54 |
|
---|
| 55 | public MouseAction getRubberBandingCopyAction() { return actions[Action.RUBBERBANDCOPY.ordinal()]; }
|
---|
| 56 | public MouseAction setRubberBandingCopyAction(final MouseAction action) { actions[Action.RUBBERBANDCOPY.ordinal()] = action; return action; }
|
---|
| 57 |
|
---|
| 58 | public MouseAction getRubberBandingCornerAction() { return actions[Action.RUBBERBANDCORNERCOPY.ordinal()]; }
|
---|
| 59 | public MouseAction setRubberBandingCornerAction(final MouseAction action) { actions[Action.RUBBERBANDCORNERCOPY.ordinal()] = action; return action; }
|
---|
| 60 |
|
---|
| 61 | public MouseAction getStampAction() { return actions[Action.STAMP.ordinal()]; }
|
---|
| 62 | public MouseAction setStampAction(final MouseAction action) { actions[Action.STAMP.ordinal()] = action; return action; }
|
---|
| 63 |
|
---|
| 64 | public MouseAction getMergeSingleItemAction() { return actions[Action.MERGESINGLE.ordinal()]; }
|
---|
| 65 | public MouseAction setMergeSingleItemAction(final MouseAction action) { actions[Action.MERGESINGLE.ordinal()] = action; return action; }
|
---|
| 66 |
|
---|
| 67 | public MouseAction getMergeTwoItemsAction() { return actions[Action.MERGETWO.ordinal()]; }
|
---|
| 68 | public MouseAction setMergeTwoItemsAction(final MouseAction action) { actions[Action.MERGETWO.ordinal()] = action; return action; }
|
---|
| 69 |
|
---|
| 70 | public MouseAction getMergeGroupAction() { return actions[Action.MERGEGROUP.ordinal()]; }
|
---|
| 71 | public MouseAction setMergeGroupAction(final MouseAction action) { actions[Action.MERGEGROUP.ordinal()] = action; return action; }
|
---|
| 72 |
|
---|
| 73 | public MouseAction getNewLineAction() { return actions[Action.NEWLINE.ordinal()]; }
|
---|
| 74 | public MouseAction setNewLineAction(final MouseAction action) { actions[Action.NEWLINE.ordinal()] = action; return action; }
|
---|
| 75 |
|
---|
| 76 | public MouseAction getGroupPickupAction() { return actions[Action.GROUPPICKUP.ordinal()]; }
|
---|
| 77 | public MouseAction setGroupPickupAction(final MouseAction action) { actions[Action.GROUPPICKUP.ordinal()] = action; return action; }
|
---|
| 78 |
|
---|
| 79 | public MouseAction getDetachLineAction() { return actions[Action.DETACHLINE.ordinal()]; }
|
---|
| 80 | public MouseAction setDetachLineAction(final MouseAction action) { actions[Action.DETACHLINE.ordinal()] = action; return action; }
|
---|
| 81 |
|
---|
| 82 | public MouseAction getAnchorFreeItemsAction() { return actions[Action.ANCHORFREEITEMS.ordinal()]; }
|
---|
| 83 | public MouseAction setAnchorFreeItemsAction(final MouseAction action) { actions[Action.ANCHORFREEITEMS.ordinal()] = action; return action; }
|
---|
| 84 |
|
---|
| 85 | public MouseAction getDeleteItemsAction() { return actions[Action.DELETEITEMS.ordinal()]; }
|
---|
| 86 | public MouseAction setDeleteItemsAction(final MouseAction action) { actions[Action.DELETEITEMS.ordinal()] = action; return action; }
|
---|
[942] | 87 | }
|
---|