Skip to main content
summaryrefslogtreecommitdiffstats
blob: 03aadbbd8e01c79f84f4cee06e59355b8df5306a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*******************************************************************************
 * Copyright (c) 2004, 2006 Sybase, Inc. and others.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Sybase, Inc. - initial API and implementation
 *******************************************************************************/

package org.eclipse.jst.jsf.facesconfig.ui.preference;

import java.util.ArrayList;

import org.eclipse.draw2d.geometry.Rectangle;

/**
 * A List<Rectangle> implementation with a coordinate-based
 * convenience method for adding rectangles.
 *
 */
class RectangleList extends ArrayList<Rectangle>
{
	private static final long serialVersionUID = -4088355285820327890L;

	/**
	 * Default constructor
	 */
	public RectangleList() {
		super();
	}

	/**
	 * @param x1
	 * @param y1
	 * @param x2
	 * @param y2
	 */
	public void addRectangle(int x1, int y1, int x2, int y2) {
		add(new Rectangle(x1, y1, x2 - x1, y2 - y1));
	}
}

Back to the top