public JTextField getJTextField() { _textComponent = new RestorableJTextField(); // special handling of operations while editing this data type ((RestorableJTextField) _textComponent).addKeyListener(new KeyTextHandler()); // // handle mouse events for double-click creation of popup dialog. // This happens only in the JTextField, not the JTextArea, so we can // make this an inner class within this method rather than a separate // inner class as is done with the KeyTextHandler class. // ((RestorableJTextField) _textComponent).addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { if (evt.getClickCount() == 2) { MouseEvent tableEvt = SwingUtilities.convertMouseEvent( (RestorableJTextField) DataTypeBoolean.this._textComponent, evt, DataTypeBoolean.this._table); CellDataPopup.showDialog(DataTypeBoolean.this._table, DataTypeBoolean.this._colDef, tableEvt, true); } } }); // end of mouse listener return (JTextField) _textComponent;
public JTextField getJTextField() { _textComponent = new RestorableJTextField(); // special handling of operations while editing this data type ((RestorableJTextField)_textComponent).addKeyListener(new KeyTextHandler()); // // handle mouse events for double-click creation of popup dialog. // This happens only in the JTextField, not the JTextArea, so we can // make this an inner class within this method rather than a separate // inner class as is done with the KeyTextHandler class. // ((RestorableJTextField)_textComponent).addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent evt) { if (evt.getClickCount() == 2) { MouseEvent tableEvt = SwingUtilities.convertMouseEvent( (RestorableJTextField)DataTypeJavaObject.this._textComponent, evt, DataTypeJavaObject.this._table); CellDataPopup.showDialog(DataTypeJavaObject.this._table, DataTypeJavaObject.this._colDef, tableEvt, true); } } }); // end of mouse listener return (JTextField)_textComponent;
Clone fragments detected by clone detection tool
File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeBoolean.java File path: /sql12/fw/src/net/sourceforge/squirrel_sql/fw/datasetviewer/cellcomponent/DataTypeJavaObject.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public JTextField getJTextField()
1
public JTextField getJTextField()
2
	{
2
 {
3
		_textComponent = new RestorableJTextField();
3
		_textComponent = new RestorableJTextField();
4
		// special handling of operations while editing this data type
4
		// special handling of operations while editing this data type
5
		((RestorableJTextField) _textComponent).addKeyListener(new KeyTextHandler());
5
		((RestorableJTextField)_textComponent).addKeyListener(new KeyTextHandler());
6
		//
6
		//
7
		// handle mouse events for double-click creation of popup dialog.
7
		// handle mouse events for double-click creation of popup dialog.
8
		// This happens only in the JTextField, not the JTextArea, so we can
8
		// This happens only in the JTextField, not the JTextArea, so we can
9
		// make this an inner class within this method rather than a separate
9
		// make this an inner class within this method rather than a separate
10
		// inner class as is done with the KeyTextHandler class.
10
		// inner class as is done with the KeyTextHandler class.
11
		//
11
		//
12
		((RestorableJTextField) _textComponent).addMouseListener(new MouseAdapter()
12
		((RestorableJTextField)_textComponent).addMouseListener(new MouseAdapter()
13
		{
13
		{
14
			public void mousePressed(MouseEvent evt)
14
			public void mousePressed(MouseEvent evt)
15
			{
15
			{
16
				if (evt.getClickCount() == 2)
16
				if (evt.getClickCount() == 2)
17
				{
17
				{
18
					MouseEvent tableEvt =
18
					MouseEvent tableEvt =
19
						SwingUtilities.convertMouseEvent(
19
 SwingUtilities.convertMouseEvent(
20
							(RestorableJTextField) DataTypeBoolean.this._textComponent, evt,
20
						(RestorableJTextField)DataTypeJavaObject.this._textComponent,
21
							DataTypeBoolean.this._table);
21
						evt, DataTypeJavaObject.this._table);
22
					CellDataPopup.showDialog(DataTypeBoolean.this._table, 
22
					CellDataPopup.showDialog(DataTypeJavaObject.this._table,
23
DataTypeBoolean.this._colDef, tableEvt,
23
						DataTypeJavaObject.this._colDef, tableEvt,
24
						true);
24
 true);
25
				}
25
				}
26
			}
26
			}
27
		}); // end of mouse listener
27
		});	// end of mouse listener
28
		return (JTextField) _textComponent;
28
		return (JTextField)_textComponent;
29
	
29
	
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