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)DataTypeDouble.this._textComponent, evt, DataTypeDouble.this._table); CellDataPopup.showDialog(DataTypeDouble.this._table, DataTypeDouble.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/DataTypeDouble.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
public JTextField getJTextField()
1
public JTextField getJTextField()
2
	{
3
		
2
 {
4
_textComponent = new RestorableJTextField();
3
      _textComponent = new RestorableJTextField();
5
		// special handling of operations while editing this data type
4
      // special handling of operations while editing this data type
6
		((RestorableJTextField) _textComponent).addKeyListener(new KeyTextHandler());
5
      ((RestorableJTextField)_textComponent).addKeyListener(new KeyTextHandler());
7
		//
8
		
6
      //
9
// handle mouse events for double-click creation of popup dialog.
7
      // handle mouse events for double-click creation of popup dialog.
10
		// 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
11
		// 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
12
		// inner class as is done with the KeyTextHandler class.
10
      // inner class as is done with the KeyTextHandler class.
13
		//
14
		
11
      //
15
((RestorableJTextField) _textComponent).addMouseListener(new MouseAdapter()
12
      ((RestorableJTextField)_textComponent).addMouseListener(new MouseAdapter()
16
		{
17
			
13
      {
18
public void mousePressed(MouseEvent evt)
14
         public void mousePressed(MouseEvent evt)
19
			{
20
				
15
         {
21
if (evt.getClickCount() == 2)
16
            if (evt.getClickCount() == 2)
22
				{
23
					
17
            {
24
MouseEvent tableEvt =
18
               MouseEvent tableEvt =
25
						SwingUtilities.convertMouseEvent(
19
 SwingUtilities.convertMouseEvent(
26
							(RestorableJTextField) DataTypeBoolean.this._textComponent, evt,
20
                  (RestorableJTextField)DataTypeDouble.this._textComponent,
27
							
28
DataTypeBoolean.this._table);
21
                  evt, DataTypeDouble.this._table);
29
					CellDataPopup.showDialog(DataTypeBoolean.this._table,
22
               CellDataPopup.showDialog(DataTypeDouble.this._table,
30
 DataTypeBoolean.this._colDef, tableEvt,
23
                  DataTypeDouble.this._colDef, tableEvt,
31
						true);
32
				}
33
			}
34
		
24
 true);
25
            }
26
         }
35
}); // end of mouse listener
27
      });	// end of mouse listener
36
		return (JTextField) _textComponent;
28
      return (JTextField)_textComponent;
37
	
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