com.mentata.sg8
Class SG8ImageAttribute

java.lang.Object
  extended bycom.mentata.l3d.L3DAttribute
      extended bycom.mentata.sg8.SG8StringAttribute
          extended bycom.mentata.sg8.SG8ImageAttribute
All Implemented Interfaces:
Comparator, SG8Attribute

public class SG8ImageAttribute
extends SG8StringAttribute

An image attribute for use with SG8 objects. Values of this attribute type represent sets of URLs for image files. An instance can be configure with a specific width, height, and border, as well as a default URL to use when the attribute is empty. HTML values are translated to inline images.

Since:
0.7
Author:
Jon Roberts

Field Summary
 
Fields inherited from interface com.mentata.sg8.SG8Attribute
TEXT_RESOURCES
 
Constructor Summary
SG8ImageAttribute()
          Constructs an empty image attribute.
SG8ImageAttribute(int width, int height)
          Constructs an empty image attribute with a given width and height.
SG8ImageAttribute(int width, int height, int border)
          Constructs an empty image attribute with a given width, height, and border.
SG8ImageAttribute(int width, int height, int border, String empty)
          Constructs an empty image attribute with a given width, height, border, and default value.
 
Method Summary
 String[] getHTMLValues()
          Returns the attribute values as translated to hyperlinks.
 
Methods inherited from class com.mentata.sg8.SG8StringAttribute
getHyperlink, getSeparator, getSG8Object, getUpdateHTML, isAugmenting, isHTMLExceeded, processUpdateHTML, setAugmenting, setHTMLThreshold, setSeparator
 
Methods inherited from class com.mentata.l3d.L3DAttribute
addValue, compare, getAttribute, getBind, getContext, getLabel, getLengthThreshold, getName, getObject, getObject, getPrerequisites, getShortValues, getSize, getThreshold, getValues, initialize, isBound, isExceeded, isGenerated, isLengthExceeded, isMultivalue, isRequired, removeValue, same, setGenerated, setLabel, setLengthThreshold, setPrerequisites, setThreshold, setValues
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface java.util.Comparator
equals
 

Constructor Detail

SG8ImageAttribute

public SG8ImageAttribute()
Constructs an empty image attribute.


SG8ImageAttribute

public SG8ImageAttribute(int width,
                         int height)
Constructs an empty image attribute with a given width and height.

Parameters:
width - a width for use in the HTML img tags
height - a height for use in the HTML img tags

SG8ImageAttribute

public SG8ImageAttribute(int width,
                         int height,
                         int border)
Constructs an empty image attribute with a given width, height, and border.

Parameters:
width - a width for use in the HTML img tags
height - a height for use in the HTML img tags
border - a border for use in the img tags

SG8ImageAttribute

public SG8ImageAttribute(int width,
                         int height,
                         int border,
                         String empty)
Constructs an empty image attribute with a given width, height, border, and default value.

Parameters:
width - a width for use in the HTML img tags
height - a height for use in the HTML img tags
border - a border for use in the img tags
empty - a URL to use if the attribute has no values
Method Detail

getHTMLValues

public String[] getHTMLValues()
                       throws SG8Exception
Returns the attribute values as translated to hyperlinks.

Specified by:
getHTMLValues in interface SG8Attribute
Overrides:
getHTMLValues in class SG8StringAttribute
Returns:
attribute values as translated to HTML img tags
Throws:
SG8Exception