// Path: src/ch/jbead/Localization.java
// public interface Localization {
// 
//     public ResourceBundle getBundle();
//     public String getString(String key);
//     public int getMnemonic(String key);
//     public KeyStroke getKeyStroke(String key);
// 
// }
// 
// Path: src/ch/jbead/Point.java
// public class Point {
// 
//     private int x;
//     private int y;
// 
//     public Point(int x, int y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public Point(Point pt) {
//         this.x = pt.x;
//         this.y = pt.y;
//     }
// 
//     public int getX() {
//         return x;
//     }
// 
//     public int getY() {
//         return y;
//     }
// 
//     @Override
//     public int hashCode() {
//         return x ^ y;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         Point other = (Point) obj;
//         if (other == null) return false;
//         return x == other.x && y == other.y;
//     }
// 
//     public Point scrolled(int scroll) {
//         return new Point(x, y + scroll);
//     }
// 
//     public Point unscrolled(int scroll) {
//         return new Point(x, y - scroll);
//     }
// 
//     public Point shifted(int shift, int width) {
//         return new Point((x + shift) % width, y + (x + shift) / width);
//     }
// 
//     public Point nextLeft() {
//         return new Point(x - 1, y);
//     }
// 
//     public Point nextRight() {
//         return new Point(x + 1, y);
//     }
// 
//     public Point nextBelow() {
//         return new Point(x, y - 1);
//     }
// 
//     public Point nextAbove() {
//         return new Point(x, y + 1);
//     }
// 
//     public Point lastLeft() {
//         return new Point(0, y);
//     }
// 
//     public Point lastRight(int width) {
//         return new Point(width - 1, y);
//     }
// 
//     @Override
//     public String toString() {
//         return x + "," + y;
//     }
// }
// 
// Path: src/ch/jbead/View.java
// public interface View {
// 
//     public void addListener(ViewListener listener);
// 
//     public boolean drawColors();
//     public boolean drawSymbols();
// 
//     public boolean isDraftVisible();
//     public boolean isCorrectedVisible();
//     public boolean isSimulationVisible();
//     public boolean isReportVisible();
// 
//     public String getSelectedTool();
//     public boolean isDragging();
//     public void setDragging(boolean dragging);
//     public Selection getSelection();
//     public void selectColor(byte colorIndex);
// 
//     public void refresh();
// }


import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.print.PageFormat;
import ch.jbead.Localization;
import ch.jbead.Model;
import ch.jbead.Point;
import ch.jbead.View;
/** jbead - http://www.jbead.ch
    Copyright (C) 2001-2012  Damian Brunold

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package ch.jbead.print;



public class SimulationPrinter extends GridPrinter {

    public SimulationPrinter(Model model, View view, Localization localization, boolean fullPattern) {
        super(model, view, localization, fullPattern);
    }

    @Override
    protected int getColumnWidth() {
        return model.getWidth() * gx / 2;
    }

    @Override
    protected int getRows(int height) {
        int rows = getPrintableRows(height);
// Path: src/ch/jbead/Localization.java
// public interface Localization {
// 
//     public ResourceBundle getBundle();
//     public String getString(String key);
//     public int getMnemonic(String key);
//     public KeyStroke getKeyStroke(String key);
// 
// }
// 
// Path: src/ch/jbead/Point.java
// public class Point {
// 
//     private int x;
//     private int y;
// 
//     public Point(int x, int y) {
//         this.x = x;
//         this.y = y;
//     }
// 
//     public Point(Point pt) {
//         this.x = pt.x;
//         this.y = pt.y;
//     }
// 
//     public int getX() {
//         return x;
//     }
// 
//     public int getY() {
//         return y;
//     }
// 
//     @Override
//     public int hashCode() {
//         return x ^ y;
//     }
// 
//     @Override
//     public boolean equals(Object obj) {
//         Point other = (Point) obj;
//         if (other == null) return false;
//         return x == other.x && y == other.y;
//     }
// 
//     public Point scrolled(int scroll) {
//         return new Point(x, y + scroll);
//     }
// 
//     public Point unscrolled(int scroll) {
//         return new Point(x, y - scroll);
//     }
// 
//     public Point shifted(int shift, int width) {
//         return new Point((x + shift) % width, y + (x + shift) / width);
//     }
// 
//     public Point nextLeft() {
//         return new Point(x - 1, y);
//     }
// 
//     public Point nextRight() {
//         return new Point(x + 1, y);
//     }
// 
//     public Point nextBelow() {
//         return new Point(x, y - 1);
//     }
// 
//     public Point nextAbove() {
//         return new Point(x, y + 1);
//     }
// 
//     public Point lastLeft() {
//         return new Point(0, y);
//     }
// 
//     public Point lastRight(int width) {
//         return new Point(width - 1, y);
//     }
// 
//     @Override
//     public String toString() {
//         return x + "," + y;
//     }
// }
// 
// Path: src/ch/jbead/View.java
// public interface View {
// 
//     public void addListener(ViewListener listener);
// 
//     public boolean drawColors();
//     public boolean drawSymbols();
// 
//     public boolean isDraftVisible();
//     public boolean isCorrectedVisible();
//     public boolean isSimulationVisible();
//     public boolean isReportVisible();
// 
//     public String getSelectedTool();
//     public boolean isDragging();
//     public void setDragging(boolean dragging);
//     public Selection getSelection();
//     public void selectColor(byte colorIndex);
// 
//     public void refresh();
// }


// Path: src/ch/jbead/print/SimulationPrinter.java
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.print.PageFormat;
import ch.jbead.Localization;
import ch.jbead.Model;
import ch.jbead.Point;
import ch.jbead.View;

/** jbead - http://www.jbead.ch
    Copyright (C) 2001-2012  Damian Brunold

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

package ch.jbead.print;



public class SimulationPrinter extends GridPrinter {

    public SimulationPrinter(Model model, View view, Localization localization, boolean fullPattern) {
        super(model, view, localization, fullPattern);
    }

    @Override
    protected int getColumnWidth() {
        return model.getWidth() * gx / 2;
    }

    @Override
    protected int getRows(int height) {
        int rows = getPrintableRows(height);
        Point pt = model.correct(new Point(model.getWidth() - 1, rows - 1));