class HeaderSeparatorBorder extends AbstractBorder { protected Color color; public HeaderSeparatorBorder(Color color) { super(); this.color = color; } /** * Paints the border for the specified component with the specified * position and size. * * @param c * the component for which this border is being painted * @param g * the paint graphics * @param x * the x position of the painted border * @param y * the y position of the painted border * @param width * the width of the painted border * @param height * the height of the painted border */ public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Color oldColor = g.getColor(); g.setColor(color); g.drawLine(x, y + height - 1, x + width - 1, y + height - 1); g.setColor(oldColor); } /** * Returns the insets of the border. * * @param c * the component for which this border insets value applies */ public Insets getBorderInsets(Component c) { return new Insets(0, 0, 1, 0); } /** * Reinitialize the insets parameter with this Border's current Insets. * * @param c * the component for which this border insets value applies * @param insets * the object to be reinitialized */ public Insets getBorderInsets(Component c, Insets insets) { insets.left = insets.top = insets.right = insets.bottom = 1; return insets; }
class HeaderSeparatorBorder extends AbstractBorder { protected Color color; public HeaderSeparatorBorder(Color color) { super(); this.color = color; } /** * Paints the border for the specified component with the specified * position and size. * * @param c * the component for which this border is being painted * @param g * the paint graphics * @param x * the x position of the painted border * @param y * the y position of the painted border * @param width * the width of the painted border * @param height * the height of the painted border */ public void paintBorder(Component c, Graphics g, int x, int y, int width, int height) { Color oldColor = g.getColor(); g.setColor(color); g.drawLine(x, y + height - 1, x + width - 1, y + height - 1); g.setColor(oldColor); } /** * Returns the insets of the border. * * @param c * the component for which this border insets value applies */ public Insets getBorderInsets(Component c) { return new Insets(0, 0, 1, 0); } /** * Reinitialize the insets parameter with this Border's current Insets. * * @param c * the component for which this border insets value applies * @param insets * the object to be reinitialized */ public Insets getBorderInsets(Component c, Insets insets) { insets.left = insets.top = insets.right = insets.bottom = 1; return insets; }
Clone fragments detected by clone detection tool
File path: /columba-1.4-src/core/src/main/java/org/columba/core/gui/tagging/TagList.java File path: /columba-1.4-src/calendar/src/main/java/org/columba/calendar/ui/search/SearchResultList.java
Method name: Method name:
Number of AST nodes: 0 Number of AST nodes: 0
1
class HeaderSeparatorBorder extends AbstractBorder {
1
class HeaderSeparatorBorder extends AbstractBorder {
2
		protected Color color;
2
		protected Color color;
3
		public HeaderSeparatorBorder(Color color) {
3
		public HeaderSeparatorBorder(Color color) {
4
			super();
4
			super();
5
			this.color = color;
5
			this.color = color;
6
		}
6
		}
7
		/**
7
		/**
8
		 * Paints the border for the specified component with the specified
8
		 * Paints the border for the specified component with the specified
9
		 * position and size.
9
		 * position and size.
10
		 * 
10
		 * 
11
		 * @param c
11
		 * @param c
12
		 *            the component for which this border is being painted
12
		 *            the component for which this border is being painted
13
		 * @param g
13
		 * @param g
14
		 *            the paint graphics
14
		 *            the paint graphics
15
		 * @param x
15
		 * @param x
16
		 *            the x position of the painted border
16
		 *            the x position of the painted border
17
		 * @param y
17
		 * @param y
18
		 *            the y position of the painted border
18
		 *            the y position of the painted border
19
		 * @param width
19
		 * @param width
20
		 *            the width of the painted border
20
		 *            the width of the painted border
21
		 * @param height
21
		 * @param height
22
		 *            the height of the painted border
22
		 *            the height of the painted border
23
		 */
23
		 */
24
		public void paintBorder(Component c, Graphics g, int x, int y,
24
		public void paintBorder(Component c, Graphics g, int x, int y,
25
				int width, int height) {
25
				int width, int height) {
26
			Color oldColor = g.getColor();
26
			Color oldColor = g.getColor();
27
			g.setColor(color);
27
			g.setColor(color);
28
			g.drawLine(x, y + height - 1, x + width - 1, y + height - 1);
28
			g.drawLine(x, y + height - 1, x + width - 1, y + height - 1);
29
			g.setColor(oldColor);
29
			g.setColor(oldColor);
30
		}
30
		}
31
		/**
31
		/**
32
		 * Returns the insets of the border.
32
		 * Returns the insets of the border.
33
		 * 
33
		 * 
34
		 * @param c
34
		 * @param c
35
		 *            the component for which this border insets value applies
35
		 *            the component for which this border insets value applies
36
		 */
36
		 */
37
		public Insets getBorderInsets(Component c) {
37
		public Insets getBorderInsets(Component c) {
38
			return new Insets(0, 0, 1, 0);
38
			return new Insets(0, 0, 1, 0);
39
		}
39
		}
40
		/**
40
		/**
41
		 * Reinitialize the insets parameter with this Border's current Insets.
41
		 * Reinitialize the insets parameter with this Border's current Insets.
42
		 * 
42
		 * 
43
		 * @param c
43
		 * @param c
44
		 *            the component for which this border insets value applies
44
		 *            the component for which this border insets value applies
45
		 * @param insets
45
		 * @param insets
46
		 *            the object to be reinitialized
46
		 *            the object to be reinitialized
47
		 */
47
		 */
48
		public Insets getBorderInsets(Component c, Insets insets) {
48
		public Insets getBorderInsets(Component c, Insets insets) {
49
			insets.left = insets.top = insets.right = insets.bottom = 1;
49
			insets.left = insets.top = insets.right = insets.bottom = 1;
50
			return insets;
50
			return insets;
51
		}
51
		}
52
	
52
	
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