public class TileHorizontalAction extends TileInternalFramesAction { /** Application API. */ private IApplication _app; /** * Ctor. * * @param app Application API. */ public TileHorizontalAction(IApplication app) { super(app); _app = app; app.getResources().setupAction(this, _app.getSquirrelPreferences().getShowColoriconsInToolbar()); } public void actionPerformed(ActionEvent evt) { CursorChanger cursorChg = new CursorChanger(_app.getMainFrame()); cursorChg.show(); try { super.actionPerformed(evt); } finally { cursorChg.restore(); } } /** * Retrieve the number of rows and columns that the internal frames * should be rearranged into. * * @param internalFrameCount Number of internal frames to be rearranged. */ protected RowColumnCount getRowColumnCount(int internalFrameCount) { int rows = 0; int cols = 0; if (internalFrameCount > 0) { cols = 1; rows = internalFrameCount; } return new RowColumnCount(rows, cols)
public class TileVerticalAction extends TileInternalFramesAction { /** Application API. */ private IApplication _app; /** * Ctor. * * @param app Application API. */ public TileVerticalAction(IApplication app) { super(app); _app = app; app.getResources().setupAction( this, _app.getSquirrelPreferences().getShowColoriconsInToolbar()); } public void actionPerformed(ActionEvent evt) { CursorChanger cursorChg = new CursorChanger(_app.getMainFrame()); cursorChg.show(); try { super.actionPerformed(evt); } finally { cursorChg.restore(); } } /** * Retrieve the number of rows and columns that the internal frames * should be rearranged into. * * @param internalFrameCount Number of internal frames to be rearranged. */ protected RowColumnCount getRowColumnCount(int internalFrameCount) { int rows = 0; int cols = 0; if (internalFrameCount > 0) { rows = 1; cols = internalFrameCount; } return new RowColumnCount(rows, cols)
Clone fragments detected by clone detection tool
File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/TileHorizontalAction.java File path: /sql12/app/src/net/sourceforge/squirrel_sql/client/mainframe/action/TileVerticalAction.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
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)
Summary
Number of common nesting structure subtrees0
Number of refactorable cases0
Number of non-refactorable cases0
Time elapsed for finding largest common nesting structure subtrees (ms)0.0
Clones location
Number of node comparisons0