org.wings
Class SAbstractIcon

java.lang.Object
  extended by org.wings.SAbstractIcon
All Implemented Interfaces:
Serializable, SIcon, URLResource
Direct Known Subclasses:
SImageIcon, SURLIcon

public abstract class SAbstractIcon
extends Object
implements SIcon

Base class for icons.

Author:
Armin Haaf
See Also:
Serialized Form

Field Summary
protected  int height
          The height of the icon.
protected  String title
          Title of icon, "" if not set.
protected  int width
          The width of the icon.
 
Constructor Summary
protected SAbstractIcon()
           
protected SAbstractIcon(int width, int height)
           
 
Method Summary
 int getIconHeight()
          Returns the height of the icon.
 String getIconTitle()
          gets the title of the icon, empty String if unknown.
 int getIconWidth()
          Returns the width of the icon.
 void setIconHeight(int h)
          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 w)
          Sets the width of the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.wings.URLResource
getURL
 

Field Detail

width

protected int width
The width of the icon. This is the width it is rendered, not the real width of the icon. A value <0 means, no width is rendered


height

protected int height
The height of the icon. This is the height it is rendered, not the real width of the icon. A value <0 means, no height is rendered


title

protected String title
Title of icon, "" if not set.

Constructor Detail

SAbstractIcon

protected SAbstractIcon()

SAbstractIcon

protected SAbstractIcon(int width,
                        int height)
Method Detail

getIconWidth

public int getIconWidth()
Returns the width of the icon.

Specified by:
getIconWidth in interface SIcon
Returns:
the width or -1 if unknown

getIconHeight

public int getIconHeight()
Returns the height of the icon.

Specified by:
getIconHeight in interface SIcon
Returns:
the height or -1 if unknown

setIconWidth

public void setIconWidth(int w)
Sets the width of the icon.

Specified by:
setIconWidth in interface SIcon
Parameters:
w - the width of the icon

setIconHeight

public void setIconHeight(int h)
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 ;-)