All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.daisy.dotify.api.paper.TractorPaper Maven / Gradle / Ivy

There is a newer version: 1.0.7
Show newest version
package org.daisy.dotify.api.paper;


/**
 * Provides a paper object for perforated paper with paper guides.
 *
 * @author Joel Håkansson
 */
public class TractorPaper extends AbstractPaper {

    /**
     *
     */
    private static final long serialVersionUID = 4768747877387932290L;
    private final Length across, along;

    /**
     * Creates a new tractor paper.
     *
     * @param name       a name
     * @param desc       a description
     * @param identifier an identifier
     * @param across     the width of the paper
     * @param along      the height of the paper
     */
    public TractorPaper(String name, String desc, String identifier, Length across, Length along) {
        super(name, desc, identifier);
        this.across = across;
        this.along = along;
    }

    /**
     * Gets the length of the paper perpendicular to the direction of the paper feed.
     *
     * @return returns the length.
     */
    public Length getLengthAcrossFeed() {
        return across;
    }

    /**
     * Gets the length of the paper along the direction of the paper feed.
     *
     * @return returns the length.
     */
    public Length getLengthAlongFeed() {
        return along;
    }

    @Override
    public Type getType() {
        return Type.TRACTOR;
    }

    @Override
    public TractorPaper asTractorPaper() {
        return this;
    }

    @Override
    public String toString() {
        return "TractorPaper [lengthAcrossFeed=" + getLengthAcrossFeed() +
                ", lengthAlongFeed=" + getLengthAlongFeed() + "]";
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy