private JPanel createButtonPanel() { JPanel bottom = new JPanel(); bottom.setLayout(new BorderLayout()); bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP)); ButtonWithMnemonic cancelButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$ cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$ ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader .getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$ okButton.addActionListener(this); okButton.setActionCommand("OK"); //$NON-NLS-1$ okButton.setDefaultCapable(true); getRootPane().setDefaultButton(okButton); ButtonWithMnemonic helpButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "help")); // associate with JavaHelp HelpManager.getInstance().enableHelpOnButton(helpButton, "configuring_columba"); JPanel buttonPanel = new JPanel(); buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); buttonPanel.setLayout(new GridLayout(1, 3, 6, 0)); buttonPanel.add(okButton); buttonPanel.add(cancelButton); buttonPanel.add(helpButton); bottom.add(buttonPanel, BorderLayout.EAST); return bottom;
protected JPanel createButtonPanel() { JPanel bottom = new JPanel(); bottom.setLayout(new BorderLayout()); // bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP)); // bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) ); // bottom.add( Box.createHorizontalStrut()); ButtonWithMnemonic cancelButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-2$ cancelButton.addActionListener(this); cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$ ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader .getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-2$ okButton.addActionListener(this); okButton.setActionCommand("OK"); //$NON-NLS-1$ okButton.setDefaultCapable(true); getRootPane().setDefaultButton(okButton); ButtonWithMnemonic helpButton = new ButtonWithMnemonic( MailResourceLoader.getString("global", "help")); //$NON-NLS-1$ //$NON-NLS-2$ // associate with JavaHelp HelpManager.getInstance().enableHelpOnButton(helpButton, "folder_options"); HelpManager.getInstance() .enableHelpKey(getRootPane(), "folder_options"); JPanel buttonPanel = new JPanel(); buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12)); buttonPanel.setLayout(new GridLayout(1, 3, 6, 0)); buttonPanel.add(okButton); buttonPanel.add(cancelButton); buttonPanel.add(helpButton); // bottom.add( Box.createHorizontalGlue() ); bottom.add(buttonPanel, BorderLayout.EAST); return bottom;
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/dialog/EditEventDialog.java File path: /columba-1.4-src/mail/src/main/java/org/columba/mail/gui/config/folder/FolderOptionsDialog.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
private JPanel createButtonPanel() {
1
protected JPanel createButtonPanel() {
2
		JPanel bottom = new JPanel();
2
		JPanel bottom = new JPanel();
3
		bottom.setLayout(new BorderLayout());
3
		bottom.setLayout(new BorderLayout());
4
		bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
4
		// bottom.setBorder(new SingleSideEtchedBorder(SwingConstants.TOP));
5
		// bottom.setLayout( new BoxLayout( bottom, BoxLayout.X_AXIS ) );
6
		// bottom.add( Box.createHorizontalStrut());
5
		ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(
7
		ButtonWithMnemonic cancelButton = new ButtonWithMnemonic(
6
				MailResourceLoader.getString("global", "cancel"));
8
				MailResourceLoader.getString("global", "cancel")); //$NON-NLS-1$ //$NON-NLS-2$
7
		//$NON-NLS-1$ //$NON-NLS-2$
9
		//$NON-NLS-1$ //$NON-NLS-2$
8
		cancelButton.addActionListener(this);
10
		cancelButton.addActionListener(this);
9
		cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
11
		cancelButton.setActionCommand("CANCEL"); //$NON-NLS-1$
10
		ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader
12
		ButtonWithMnemonic okButton = new ButtonWithMnemonic(MailResourceLoader
11
				.getString("global", "ok"));
13
				.getString("global", "ok")); //$NON-NLS-1$ //$NON-NLS-2$
12
		//$NON-NLS-1$ //$NON-NLS-2$
14
		//$NON-NLS-1$ //$NON-NLS-2$
13
		okButton.addActionListener(this);
15
		okButton.addActionListener(this);
14
		okButton.setActionCommand("OK"); //$NON-NLS-1$
16
		okButton.setActionCommand("OK"); //$NON-NLS-1$
15
		okButton.setDefaultCapable(true);
17
		okButton.setDefaultCapable(true);
16
		getRootPane().setDefaultButton(okButton);
18
		getRootPane().setDefaultButton(okButton);
17
		ButtonWithMnemonic helpButton = new ButtonWithMnemonic(
19
		ButtonWithMnemonic helpButton = new ButtonWithMnemonic(
18
				MailResourceLoader.getString("global", "help"));
20
				MailResourceLoader.getString("global", "help")); //$NON-NLS-1$ //$NON-NLS-2$
19
		// associate with JavaHelp
21
		// associate with JavaHelp
20
		HelpManager.getInstance().enableHelpOnButton(helpButton,
22
		HelpManager.getInstance().enableHelpOnButton(helpButton,
21
				"configuring_columba
23
				"folder_options");
24
		HelpManager.getInstance()
22
");
25
				.enableHelpKey(getRootPane(), "folder_options");
23
		JPanel buttonPanel = new JPanel();
26
		JPanel buttonPanel = new JPanel();
24
		buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
27
		buttonPanel.setBorder(BorderFactory.createEmptyBorder(12, 12, 12, 12));
25
		buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));
28
		buttonPanel.setLayout(new GridLayout(1, 3, 6, 0));
26
		buttonPanel.add(okButton);
29
		buttonPanel.add(okButton);
27
		buttonPanel.add(cancelButton);
30
		buttonPanel.add(cancelButton);
28
		buttonPanel.add(helpButton);
31
		buttonPanel.add(helpButton);
32
		// bottom.add( Box.createHorizontalGlue() );
29
		bottom.add(buttonPanel, BorderLayout.EAST);
33
		bottom.add(buttonPanel, BorderLayout.EAST);
30
		return bottom;
34
		return bottom;
31
	
35
	
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