KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > nightlabs > editor2d > util > EditorGeneralShapeFactory


1 /**
2  * <p> Project: com.nightlabs.editor2d </p>
3  * <p> Copyright: Copyright (c) 2005 </p>
4  * <p> Company: NightLabs GmbH (Germany) </p>
5  * <p> Creation Date: 23.08.2005 </p>
6  * <p> Author: Daniel Mazurek </p>
7 **/

8 package com.nightlabs.editor2d.util;
9
10 import java.awt.geom.Arc2D JavaDoc;
11
12 import com.nightlabs.editor2d.j2d.GeneralShape;
13 import com.nightlabs.editor2d.j2d.GeneralShapeFactory;
14
15 public class EditorGeneralShapeFactory
16 extends GeneralShapeFactory
17 {
18
19     public EditorGeneralShapeFactory() {
20         super();
21         // TODO Auto-generated constructor stub
22
}
23
24     public static GeneralShape createEllipse(org.eclipse.draw2d.geometry.Rectangle rect)
25     {
26       Arc2D JavaDoc arc = new Arc2D.Double JavaDoc(rect.x, rect.y, rect.width, rect.height, 0, 360, Arc2D.OPEN);
27       return new GeneralShape(arc);
28     }
29     
30     public static GeneralShape createRectangle(org.eclipse.draw2d.geometry.Rectangle rect)
31     {
32       return createRectangle(rect.x, rect.y, rect.width, rect.height);
33     }
34     
35 }
36
Popular Tags