org.wings
Class SResourceIcon

java.lang.Object
  extended by org.wings.Resource
      extended by org.wings.StaticResource
          extended by org.wings.resource.ClassPathResource
              extended by org.wings.SResourceIcon
All Implemented Interfaces:
Serializable, Renderable, NamedResource, SIcon, URLResource

public class SResourceIcon
extends ClassPathResource
implements SIcon

SIcon that gets it's content from an image found in the classpath. i.e. an image that is deployed in the classes/jar/war file.

An SIcon of this type is externalized globally. It is not bound to a session.

Author:
Armin Haaf
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.wings.StaticResource
StaticResource.LimitedBuffer
 
Nested classes/interfaces inherited from class org.wings.Resource
Resource.HeaderEntry
 
Field Summary
 
Fields inherited from class org.wings.resource.ClassPathResource
resourceFileName
 
Fields inherited from class org.wings.StaticResource
buffer, externalizerFlags, maxBufferSize, size
 
Fields inherited from class org.wings.Resource
extension, headers, id, mimeType
 
Constructor Summary
SResourceIcon(ClassLoader classLoader, String resourceFileName)
           
SResourceIcon(String resourceFileName)
           
 
Method Summary
 int getIconHeight()
           
 String getIconTitle()
          gets the title of the icon, empty String if unknown.
 int getIconWidth()
           
 void setIconHeight(int height)
          sets the height of the icon, -1 if unknown.
 void setIconTitle(String title)
          sets the title of the icon, empty String if unknown.
 void setIconWidth(int width)
          sets the width of the icon, -1 if unknown.
 
Methods inherited from class org.wings.resource.ClassPathResource
equals, getClassLoader, getResourceName, getResourceStream, hashCode
 
Methods inherited from class org.wings.StaticResource
bufferResource, getExternalizerFlags, getId, getLength, getMaxBufferSize, getURL, resolveName, setExternalizerFlags, setMaxBufferSize, setMimeType, toString, write
 
Methods inherited from class org.wings.Resource
getExtension, getHeaders, getMimeType, getSession, setHeaders
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.wings.URLResource
getURL
 

Constructor Detail

SResourceIcon

public SResourceIcon(String resourceFileName)

SResourceIcon

public SResourceIcon(ClassLoader classLoader,
                     String resourceFileName)
Method Detail

getIconWidth

public int getIconWidth()
Specified by:
getIconWidth in interface SIcon
Returns:
the width of the icon, or -1 if unknown.

getIconHeight

public int getIconHeight()
Specified by:
getIconHeight in interface SIcon
Returns:
the height of the icon, or -1 if unknown.

setIconWidth

public void setIconWidth(int width)
Description copied from interface: SIcon
sets the width of the icon, -1 if unknown.

Specified by:
setIconWidth in interface SIcon

setIconHeight

public void setIconHeight(int height)
Description copied from interface: SIcon
sets the height of the icon, -1 if unknown.

Specified by:
setIconHeight in interface SIcon

getIconTitle

public String getIconTitle()
Description copied from interface: SIcon
gets the title of the icon, empty String if unknown.

Specified by:
getIconTitle in interface SIcon

setIconTitle

public void setIconTitle(String title)
Description copied from interface: SIcon
sets the title of the icon, empty String if unknown.

Specified by:
setIconTitle in interface SIcon


wingS Swings ;-)