Commit a1f523dc authored by Guenter Paul Peters's avatar Guenter Paul Peters
Browse files

code clean up

git-svn-id: https://svn.math.tu-berlin.de/svn/jtem@156 f5b180c5-49ee-4939-b20e-b6ed35f0f7b7
parent 330004ac
......@@ -19,6 +19,7 @@
package de.jtem.moebiusViewer.viewer;
import java.awt.Color;
import java.awt.Frame;
import java.awt.event.ComponentAdapter;
import java.awt.event.ComponentEvent;
......@@ -28,23 +29,29 @@ import java.awt.event.WindowEvent;
import java.awt.event.WindowListener;
import de.jtem.mfc.group.Moebius;
import de.jtem.moebiusViewer.Attributes;
import de.jtem.moebiusViewer.Attributes2D;
import de.jtem.moebiusViewer.moebius.JMoebiusViewer;
import de.jtem.moebiusViewer.shape.Circle;
import de.jtem.moebiusViewer.shape.MoebiusTransformer;
import de.jtem.moebiusViewer.shape.Polygon;
import de.jtem.moebiusViewer.shape.ShapeSet;
public class Example extends Frame {
static JMoebiusViewer aViewer = new JMoebiusViewer ();
private static final long serialVersionUID = 1L;
static JMoebiusViewer aViewer = new JMoebiusViewer ();
static {
de.jtem.moebiusViewer.Attributes a = new de.jtem.moebiusViewer.Attributes2D();
Attributes a = new Attributes2D();
a.setAntiAliasing(true);
aViewer.setDoubleBuffered(true);
aViewer.setAttributes(a);
aViewer.setBackground(new java.awt.Color(225,225,225));
};
static ShapeSet shapeSet = new ShapeSet();
static ShapeSet shapeSet = new ShapeSet();
static Moebius t = new Moebius( 2, 0, 0, 0, 0,0, 1, 0 ); // scaling by 2
static MoebiusTransformer transformShape = new MoebiusTransformer( t );
......@@ -60,14 +67,13 @@ public class Example extends Frame {
p.assignCoords( new double[] { 1,1, 1,-1, -1,-1, -1,1 } );
p.setClosed( true );
p.setPointRadius( 3 );
p.setColor( java.awt.Color.red );
p.setColor( Color.red );
//adding the polygon 2 times
aViewer.add (p);
shapeSet.add (p);
de.jtem.moebiusViewer.shape.Circle
circle = new de.jtem.moebiusViewer.shape.Circle();
Circle circle = new Circle();
circle.setRadius( 1.2 );
......@@ -91,12 +97,13 @@ public class Example extends Frame {
};
Example theExample = new Example ("Moebius Viewer Example");
Example theExample = new Example ("Moebius Viewer Example");
theExample.addWindowListener (l);
theExample.addComponentListener (c);
theExample.show ();
theExample.pack();
theExample.setVisible(true);
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment