javaquery/canvas/src/main/java/net/java/html/canvas/Dimension.java
author Anton Epple <toni.epple@eppleton.de>
Wed, 12 Feb 2014 08:43:07 +0100
branchcanvas
changeset 1445 493cae4fd458
parent 1303 3d62ad46d744
permissions -rw-r--r--
More JavaDoc improvements.
     1 /**
     2  * Back 2 Browser Bytecode Translator
     3  * Copyright (C) 2012 Jaroslav Tulach <jaroslav.tulach@apidesign.org>
     4  *
     5  * This program is free software: you can redistribute it and/or modify
     6  * it under the terms of the GNU General Public License as published by
     7  * the Free Software Foundation, version 2 of the License.
     8  *
     9  * This program is distributed in the hope that it will be useful,
    10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
    11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    12  * GNU General Public License for more details.
    13  *
    14  * You should have received a copy of the GNU General Public License
    15  * along with this program. Look for COPYING file in the top folder.
    16  * If not, see http://opensource.org/licenses/GPL-2.0.
    17  */
    18 /*
    19  * To change this template, choose Tools | Templates
    20  * and open the template in the editor.
    21  */
    22 package net.java.html.canvas;
    23 
    24 /**
    25  * Just a simple class to replace the need of java.awt.Dimension, since we only
    26  * want to use Java core APIs to keep porting simple. You shouldn't need to
    27  * ever create one, unless you write an implementation of your own Graphicsenvironment.
    28  *
    29  * @author antonepple
    30  */
    31 public final class Dimension {
    32 
    33     final double width, height;
    34 
    35     /**
    36      * Constructor 
    37      * @param width
    38      * @param height 
    39      */
    40     public Dimension(double width, double height) {
    41         this.width = width;
    42         this.height = height;
    43     }
    44 
    45     /**
    46      * Returns the height of this Dimension in double precision
    47      *
    48      * @return the width of this Dimension.
    49      */
    50     public double getWidth() {
    51         return width;
    52     }
    53 
    54     /**
    55      * Returns the width of this Dimension in double precision.
    56      *
    57      * @return the height of this Dimension.
    58      */
    59     public double getHeight() {
    60         return height;
    61     }
    62 }