com.mentata.sg8
Class SG8ImageAttribute
java.lang.Object
com.mentata.l3d.L3DAttribute
com.mentata.sg8.SG8StringAttribute
com.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
|
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.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 |
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 tagsheight - 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 tagsheight - a height for use in the HTML img tagsborder - 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 tagsheight - a height for use in the HTML img tagsborder - a border for use in the img tagsempty - a URL to use if the attribute has no values
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