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