diff options
author | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-22 16:25:30 +0000 |
---|---|---|
committer | nobody <nobody@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 2000-05-22 16:25:30 +0000 |
commit | 45240c3596a3bcfaa49485c013a6a930b5a8e9ee (patch) | |
tree | e1c1bd7a49e7d3ef8cf0c7c4964cce11181a3681 /java/ImageProcessing/framework/Icon.java | |
parent | 0e051eaa84c80a539704b595dfa4063d87997998 (diff) | |
download | ATCD-TAO-1_1_3.tar.gz |
This commit was manufactured by cvs2svn to create tag 'TAO-1_1_3'.TAO-1_1_3
Diffstat (limited to 'java/ImageProcessing/framework/Icon.java')
-rw-r--r-- | java/ImageProcessing/framework/Icon.java | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/java/ImageProcessing/framework/Icon.java b/java/ImageProcessing/framework/Icon.java deleted file mode 100644 index eed91ed55c7..00000000000 --- a/java/ImageProcessing/framework/Icon.java +++ /dev/null @@ -1,70 +0,0 @@ -package imaging.framework; - -import java.awt.*; -import java.applet.*; -import java.net.*; - -public class Icon -{ - protected Image icon_; - protected Dimension iconSize_; - - Icon() - { - super(); - } - - Icon(String file_name, Component comp) - { - this.icon_ = Toolkit.getDefaultToolkit().getImage(file_name); - this.loadImage(comp); - } - - Icon(Image icon_image, Component comp) - { - this.icon_ = icon_image; - this.loadImage(comp); - } - - Icon(String url, Applet applet) throws MalformedURLException - { - this.icon_ = applet.getImage(new URL(url)); - loadImage(applet); - } - - public void drawIcon(Graphics g, int x, int y, Component comp) - { - g.drawImage(this.icon_, x, y, comp); - } - - private void loadImage(Component comp) - { - try - { - MediaTracker tracker = new MediaTracker(comp); - tracker.addImage(this.icon_, 0); - tracker.waitForID(0); - - this.iconSize_ = new Dimension(this.icon_.getWidth(comp), this.icon_.getHeight(comp)); - } - catch (InterruptedException excp) - { - System.err.println("Icon::getIcon image failed to load"); - } - } - - public Dimension iconSize() - { - return this.iconSize_; - } - - public Image getIconImage() - { - return this.icon_; - } - -} - - - - |