class Ausrichtung {

        static final float tolerance = 60;
        static final int UNKNOWN = 0;
        static final int A4Portrait = 1;
        static final int A4Landscape = 2;
        static final int A3Portrait = 3;
        static final int A3Landscape = 4;
        float rotation;
        Rectangle rect;
        float m5;
        float m6;
        int type;

        public Ausrichtung() {
            this(0, new Rectangle(1, 1));
        }

        public Ausrichtung(float rotation, Rectangle unrotatedoriginalrect) {
            this.rotation = rotation;
            if ((rotation == 90) || (rotation == 270)) {
                rect = unrotatedoriginalrect.rotate();
            } else {
                rect = unrotatedoriginalrect;
            }

            m5 = rect.getWidth();
            m6 = rect.getHeight();
            klassifiziere();

        }

        private void klassifiziere() {<FILL_FUNCTION_BODY>}

        public float getM5() {
            return m5;
        }

        public float getM6() {
            return m6;
        }

        public String toString() {
            String back;
            switch (type) {
                case UNKNOWN:
                    back = rect.getWidth() + "*" + rect.getHeight();
                    break;
                case A3Landscape:
                    back = "A3 Landscape";
                    break;
                case A3Portrait:
                    back = "A3 Portrait";
                    break;
                case A4Landscape:
                    back = "A4 Landscape";
                    break;
                case A4Portrait:
                    back = "A4 Portrait";
                    break;
                default:
                    back = "";
            }
            return back;
        }

        public void rotate() {
            rect = rect.rotate();
            m5 = rect.getWidth();
            m6 = rect.getHeight();
            rotation += 90;
            rotation = rotation % 360;
            klassifiziere();
        }

        public float getRotation() {
            return rotation;
        }
    }

            if (Math.abs(rect.getWidth() - 595) < tolerance &&
                    Math.abs(rect.getHeight() - 842) < tolerance) {
                this.type = A4Portrait;
            } else if (Math.abs(rect.getWidth() - 842) < tolerance &&
                    Math.abs(rect.getHeight() - 595) < tolerance) {
                this.type = A4Landscape;
            } else if (Math.abs(rect.getWidth() - 1190) < tolerance &&
                    Math.abs(rect.getHeight() - 842) < tolerance) {
                this.type = A3Landscape;
            } else if (Math.abs(rect.getWidth() - 842) < tolerance &&
                    Math.abs(rect.getHeight() - 1190) < tolerance) {
                this.type = A3Portrait;
            } else {
                type = UNKNOWN;
            }
        
<methods>public void <init>() ,public void actionPerformed(java.awt.event.ActionEvent) ,public abstract void execute() ,public ArrayList<com.lowagie.toolbox.arguments.AbstractArgument> getArguments() ,public javax.swing.JInternalFrame getInternalFrame() ,public javax.swing.JMenuBar getMenubar() ,public java.lang.String getUsage() ,public java.lang.Object getValue(java.lang.String) throws java.lang.InstantiationException,public void setArguments(ArrayList<com.lowagie.toolbox.arguments.AbstractArgument>) ,public void setInternalFrame(javax.swing.JInternalFrame) ,public void setMainArguments(java.lang.String[]) ,public void setMenubar(javax.swing.JMenuBar) ,public abstract void valueHasChanged(com.lowagie.toolbox.arguments.AbstractArgument) <variables>public static final int MENU_EXECUTE,public static final int MENU_EXECUTE_PRINT,public static final int MENU_EXECUTE_PRINT_SILENT,public static final int MENU_EXECUTE_SHOW,protected ArrayList<com.lowagie.toolbox.arguments.AbstractArgument> arguments,private java.awt.Desktop awtdesktop,protected javax.swing.JInternalFrame internalFrame,private javax.swing.JMenuBar menubar,protected int menuoptions,public static ArrayList<java.lang.String> versionsarray