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

org.nakedobjects.nos.client.dnd.image.AwtImage Maven / Gradle / Ivy

The newest version!
package org.nakedobjects.nos.client.dnd.image;

import org.nakedobjects.nos.client.dnd.drawing.Image;
import org.nakedobjects.nos.client.dnd.drawing.Size;


public class AwtImage implements Image {
    java.awt.Image iconImage;

    public AwtImage(final java.awt.Image iconImage) {
        if (iconImage == null) {
            throw new NullPointerException();
        }

        this.iconImage = iconImage;
    }

    public int getHeight() {
        return iconImage.getHeight(null);
    }

    public int getWidth() {
        return iconImage.getWidth(null);
    }

    public Size getSize() {
        return new Size(getWidth(), getHeight());
    }

    public java.awt.Image getAwtImage() {
        return iconImage;
    }
}
// Copyright (c) Naked Objects Group Ltd.




© 2015 - 2025 Weber Informatics LLC | Privacy Policy