Search this API

y.option
Class URLImageWrapper

java.lang.Object
  extended by y.option.URLImageWrapper

public class URLImageWrapper
extends java.lang.Object

Utility class that wraps together an image object and the resource location where the image has been loaded from.

 
Your browser does not support SVG content.

Constructor Summary
URLImageWrapper(java.awt.Image image, java.net.URL url)
          Create a new wrapper instance
 
Method Summary
 boolean equals(java.lang.Object o)
          Overloaded from Object
 java.awt.Image getImage()
          Get the image instance that is currently stored in this wrapper
 java.net.URL getUrl()
          Get the image resource URL that is currently stored in this wrapper
 int hashCode()
           
 boolean isNoImage()
          Check whether this wrapper describes a valid image or URL resource
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

URLImageWrapper

public URLImageWrapper(java.awt.Image image,
                       java.net.URL url)
Create a new wrapper instance

Parameters:
image - the image that is wrapped by this object
url - describes the image resource location
Method Detail

getImage

public java.awt.Image getImage()
Get the image instance that is currently stored in this wrapper


isNoImage

public boolean isNoImage()
Check whether this wrapper describes a valid image or URL resource

Returns:
false iff both image and resource URL are null.

equals

public boolean equals(java.lang.Object o)
Overloaded from Object

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:
true iff o is an URLWrapper instance and either the url==null && both images are equal or both urls are equal (in this case the image data is ignored).

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getUrl

public java.net.URL getUrl()
Get the image resource URL that is currently stored in this wrapper


© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.