1 | void toggleRectangularSelectionEnabled()↵ | | 1 | void toggleMultipleSelectionEnabled()↵
|
2 | {↵ | | 2 | {↵
|
3 | setRectangularSelectionEnabled(!rectangularSelectionMode);↵ | | 3 | setMultipleSelectionEnabled(!multi);↵
|
4 | if(view.getStatus() != null)↵ | | 4 | if(view.getStatus() != null)↵
|
5 | {↵ | | 5 | {↵
|
6 | view.getStatus().setMessageAndClear(↵ | | 6 | view.getStatus().setMessageAndClear(↵
|
7 | jEdit.getProperty("view.status.rect-select-changed",↵ | | 7 | jEdit.getProperty("view.status.multi-changed",↵
|
8 | new Integer[] { new Integer(rectangularSelectionMode ? 1 : 0) }));↵ | | 8 | new Integer[] { new Integer(multi ? 1 : 0) }));↵
|
9 | }↵ | | 9 | }↵
|
10 | } //}}}↵ | | 10 | } //}}}↵
|
|
11 | //{{{ setRectangularSelectionEnabled() method↵ | | 11 | //{{{ setMultipleSelectionEnabled() method↵
|
12 | /**↵ | | 12 | /**↵
|
13 | * Set rectangular selection on or off according to the value of↵ | | 13 | * Set multiple selection on or off according to the value of↵
|
14 | * <code>rectangularSelectionMode</code>. This only affects the ability↵ | | 14 | * <code>multi</code>. This only affects the ability to↵
|
15 | * to make multiple selections from the keyboard. A rectangular↵ | | 15 | * make multiple selections in the ↵
|
16 | * selection can always be created by dragging with the mouse by holding↵ | | |
|
17 | * down <b>Control</b>, regardless of the state of this flag.↵ | | |
|
18 | *↵ | | |
|
19 | * @param rectangularSelectionMode Should rectangular↵ | | 16 | user interface; macros and plugins↵
|
| | | 17 | * can manipulate them regardless of the setting of this flag. In fact,↵
|
| | | 18 | * in most cases, calling this method should not be necessary.↵
|
| | | 19 | *↵
|
20 | selection be↵ | | 20 | * @param multi Should multiple selection be↵
|
21 | * enabled?↵ | | 21 | enabled?↵
|
22 | * @since jEdit 4.2pre1↵ | | 22 | * @since jEdit 3.2pre1↵
|
23 | */↵ | | 23 | */↵
|
24 | public final void setRectangularSelectionEnabled(↵ | | 24 | public final void setMultipleSelectionEnabled(↵
|
25 | boolean rectangularSelectionMode)↵ | | 25 | boolean ↵
|
26 | {↵ | | |
|
27 | this.rectangularSelectionMode = rectangularSelectionMode↵ | | 26 | multi)↵
|
| | | 27 | {↵
|
28 | ;↵ | | 28 | this.multi = multi;↵
|
29 | if(view.getStatus() != null)↵ | | 29 | if(view.getStatus() != null)↵
|
30 | view.getStatus().updateMiscStatus();↵ | | 30 | view.getStatus().updateMiscStatus();↵
|
31 | painter.repaint();↵ | | 31 | painter.repaint();↵
|
32 | } | | 32 | }
|