// Path: src/main/java/de/tum/in/gagern/ornament/plaf/MorenamentsTheme.java
// /*    */ public class MorenamentsTheme extends DefaultMetalTheme
// /*    */ {
// /* 14 */   private static final int[] COLORS = { 0 };
// /*    */   private final ColorUIResource[] colors;
// /*    */ 
// /*    */   public MorenamentsTheme()
// /*    */   {
// /* 22 */     this.colors = new ColorUIResource[COLORS.length];
// /* 23 */     for (int i = 0; i < COLORS.length; ++i)
// /* 24 */       this.colors[i] = new ColorUIResource(COLORS[i]);
// /*    */   }
// /*    */ 
// /*    */   public static void activate() {
// /*    */     try {
// /* 29 */       MetalLookAndFeel.setCurrentTheme(new MorenamentsTheme());
// /* 30 */       UIManager.setLookAndFeel(new MetalLookAndFeel());
// /*    */     }
// /*    */     catch (UnsupportedLookAndFeelException e)
// /*    */     {
// /* 34 */       e.printStackTrace();
// /*    */     }
// /*    */   }
// /*    */ 
// /*    */   public String getName()
// /*    */   {
// /* 40 */     return "morenaments";
// /*    */   }
// /*    */ 
// /*    */   public void addCustomEntriesToTable(UIDefaults table) {
// /* 44 */     super.addCustomEntriesToTable(table);
// /* 45 */     Border buttonBorder = BorderFactory.createEmptyBorder(4, 4, 4, 4);
// /* 46 */     table.put("ButtonUI", MorenamentsButtonUI.class.getName());
// /* 47 */     table.put("Button.border", buttonBorder);
// /* 48 */     table.put("ToggleButtonUI", MorenamentsToggleButtonUI.class.getName());
// /* 49 */     table.put("ToggleButton.border", buttonBorder);
// /*    */   }
// /*    */ }


import java.applet.AppletContext;
import java.applet.AppletStub;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.Window;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.NoninvertibleTransformException;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import javax.swing.BorderFactory;
import javax.swing.JApplet;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import de.tum.in.gagern.ornament.plaf.MorenamentsTheme;
package de.tum.in.gagern.ornament;



/**
 * Main class of this program.
 * This class also contains the current document (collection of all lines
 * drawn) as well as a offscreen buffer used to display the pattern quickly.
 *
 * @author Martin von Gagern
 */
public class Ornament extends JApplet implements Constants {

    static final int GRID_NONE=0;
    static final int GRID_TILE=1;
    static final int GRID_CELL=2;
    static final int GRID_PROPS=4;
    static final int GRID_BUFFER=8;

    private Group group;
    int ax, ay, bx, by, width, height;
    private int mina, maxa, minb, maxb;
    private double dax, day, dbx, dby, denom;
    Window window;
    private JMenuBar menuBar;
    TileView tv;
    private PlaneView pv;
    private Controls cntrl;
    private JSplitPane splitPane;
// Path: src/main/java/de/tum/in/gagern/ornament/plaf/MorenamentsTheme.java
// /*    */ public class MorenamentsTheme extends DefaultMetalTheme
// /*    */ {
// /* 14 */   private static final int[] COLORS = { 0 };
// /*    */   private final ColorUIResource[] colors;
// /*    */ 
// /*    */   public MorenamentsTheme()
// /*    */   {
// /* 22 */     this.colors = new ColorUIResource[COLORS.length];
// /* 23 */     for (int i = 0; i < COLORS.length; ++i)
// /* 24 */       this.colors[i] = new ColorUIResource(COLORS[i]);
// /*    */   }
// /*    */ 
// /*    */   public static void activate() {
// /*    */     try {
// /* 29 */       MetalLookAndFeel.setCurrentTheme(new MorenamentsTheme());
// /* 30 */       UIManager.setLookAndFeel(new MetalLookAndFeel());
// /*    */     }
// /*    */     catch (UnsupportedLookAndFeelException e)
// /*    */     {
// /* 34 */       e.printStackTrace();
// /*    */     }
// /*    */   }
// /*    */ 
// /*    */   public String getName()
// /*    */   {
// /* 40 */     return "morenaments";
// /*    */   }
// /*    */ 
// /*    */   public void addCustomEntriesToTable(UIDefaults table) {
// /* 44 */     super.addCustomEntriesToTable(table);
// /* 45 */     Border buttonBorder = BorderFactory.createEmptyBorder(4, 4, 4, 4);
// /* 46 */     table.put("ButtonUI", MorenamentsButtonUI.class.getName());
// /* 47 */     table.put("Button.border", buttonBorder);
// /* 48 */     table.put("ToggleButtonUI", MorenamentsToggleButtonUI.class.getName());
// /* 49 */     table.put("ToggleButton.border", buttonBorder);
// /*    */   }
// /*    */ }


// Path: src/main/java/de/tum/in/gagern/ornament/Ornament.java
import java.applet.AppletContext;
import java.applet.AppletStub;
import java.awt.BasicStroke;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Font;
import java.awt.Graphics;
import java.awt.Graphics2D;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Image;
import java.awt.RenderingHints;
import java.awt.Shape;
import java.awt.Window;
import java.awt.geom.AffineTransform;
import java.awt.geom.GeneralPath;
import java.awt.geom.Line2D;
import java.awt.geom.NoninvertibleTransformException;
import java.awt.geom.PathIterator;
import java.awt.geom.Point2D;
import java.awt.geom.Rectangle2D;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.awt.image.Raster;
import java.awt.image.WritableRaster;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.text.MessageFormat;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Properties;
import javax.swing.BorderFactory;
import javax.swing.JApplet;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JMenuBar;
import javax.swing.JPanel;
import javax.swing.JSplitPane;
import de.tum.in.gagern.ornament.plaf.MorenamentsTheme;

package de.tum.in.gagern.ornament;



/**
 * Main class of this program.
 * This class also contains the current document (collection of all lines
 * drawn) as well as a offscreen buffer used to display the pattern quickly.
 *
 * @author Martin von Gagern
 */
public class Ornament extends JApplet implements Constants {

    static final int GRID_NONE=0;
    static final int GRID_TILE=1;
    static final int GRID_CELL=2;
    static final int GRID_PROPS=4;
    static final int GRID_BUFFER=8;

    private Group group;
    int ax, ay, bx, by, width, height;
    private int mina, maxa, minb, maxb;
    private double dax, day, dbx, dby, denom;
    Window window;
    private JMenuBar menuBar;
    TileView tv;
    private PlaneView pv;
    private Controls cntrl;
    private JSplitPane splitPane;
    private Image buf;