1 | public class TileHorizontalAction extends TileInternalFramesAction↵ | | 1 | public class TileVerticalAction extends TileInternalFramesAction↵
|
2 | {↵ | | 2 | {↵
|
3 | /** Application API. */↵ | | 3 | /** Application API. */↵
|
4 | private IApplication _app;↵ | | 4 | private IApplication _app;↵
|
|
5 | /**↵ | | 5 | /**↵
|
6 | * Ctor.↵ | | 6 | * Ctor.↵
|
7 | *↵ | | 7 | *↵
|
8 | * @param app Application API.↵ | | 8 | * @param app Application API.↵
|
9 | */↵ | | 9 | */↵
|
10 | public TileHorizontalAction(IApplication app)↵ | | 10 | public TileVerticalAction(IApplication app)↵
|
11 | {↵ | | 11 | {↵
|
12 | super(app);↵ | | 12 | super(app);↵
|
13 | _app = app;↵ | | 13 | _app = app;↵
|
14 | app.getResources().setupAction(↵ | | 14 | app.getResources().setupAction(↵
|
15 | this,↵ | | 15 | this,↵
|
16 | _app.getSquirrelPreferences().getShowColoriconsInToolbar());↵ | | 16 | _app.getSquirrelPreferences().getShowColoriconsInToolbar());↵
|
17 | }↵ | | 17 | }↵
|
|
18 | public void actionPerformed(ActionEvent evt)↵ | | 18 | public void actionPerformed(ActionEvent evt)↵
|
19 | {↵ | | 19 | {↵
|
20 | CursorChanger cursorChg = new CursorChanger(_app.getMainFrame());↵ | | 20 | CursorChanger cursorChg = new CursorChanger(_app.getMainFrame());↵
|
21 | cursorChg.show();↵ | | 21 | cursorChg.show();↵
|
22 | try↵ | | 22 | try↵
|
23 | {↵ | | 23 | {↵
|
24 | super.actionPerformed(evt);↵ | | 24 | super.actionPerformed(evt);↵
|
25 | }↵ | | 25 | }↵
|
26 | finally↵ | | 26 | finally↵
|
27 | {↵ | | 27 | {↵
|
28 | cursorChg.restore();↵ | | 28 | cursorChg.restore();↵
|
29 | }↵ | | 29 | }↵
|
30 | }↵ | | 30 | }↵
|
|
31 | /**↵ | | 31 | /**↵
|
32 | * Retrieve the number of rows and columns that the internal frames↵ | | 32 | * Retrieve the number of rows and columns that the internal frames↵
|
33 | * should be rearranged into.↵ | | 33 | * should be rearranged into.↵
|
34 | *↵ | | 34 | *↵
|
35 | * @param internalFrameCount Number of internal frames to be rearranged.↵ | | 35 | * @param internalFrameCount Number of internal frames to be rearranged.↵
|
36 | */↵ | | 36 | */↵
|
37 | protected RowColumnCount getRowColumnCount(int internalFrameCount)↵ | | 37 | protected RowColumnCount getRowColumnCount(int internalFrameCount)↵
|
38 | {↵ | | 38 | {↵
|
39 | int rows = 0;↵ | | 39 | int rows = 0;↵
|
40 | int cols = 0;↵ | | 40 | int cols = 0;↵
|
41 | if (internalFrameCount > 0)↵ | | 41 | if (internalFrameCount > 0)↵
|
42 | {↵ | | 42 | {↵
|
43 | cols = 1;↵ | | 43 | rows = 1;↵
|
44 | rows = internalFrameCount;↵ | | 44 | cols = internalFrameCount;↵
|
45 | }↵ | | 45 | }↵
|
46 | return new RowColumnCount(rows, cols) | | 46 | return new RowColumnCount(rows, cols)
|