org.jhotdraw.contrib.html
Class HTMLContentProducer
java.lang.Object
org.jhotdraw.contrib.html.AbstractContentProducer
org.jhotdraw.contrib.html.FigureDataContentProducer
org.jhotdraw.contrib.html.AttributeFigureContentProducer
org.jhotdraw.contrib.html.HTMLContentProducer
- All Implemented Interfaces:
- java.io.Serializable, ContentProducer, Storable
public class HTMLContentProducer
- extends AttributeFigureContentProducer
- implements java.io.Serializable
HTMLContentProducer produces HTML suitable values and encoded strings for
various types of values.
It can also transform values into their HTML equivalents, like for instance
a mapping between font sizes in points and the HTML valid font size values.
- Version:
- <$CURRENT_VERSION$>
- Author:
- Eduardo Francos - InContext
- See Also:
- Serialized Form
Method Summary |
java.lang.Object |
getContent(ContentProducerContext context,
java.lang.String ctxAttrName,
java.lang.Object ctxAttrValue)
Gets the HTML content value for the requested attribute |
int |
getHTMLFontSizeEquivalent(int pointSize)
Gets the hTMLFontSizeEquivalent attribute of the HTMLTextAreaFigure object |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HTMLContentProducer
public HTMLContentProducer()
- Constructor for the HTMLContentProducer object
getContent
public java.lang.Object getContent(ContentProducerContext context,
java.lang.String ctxAttrName,
java.lang.Object ctxAttrValue)
- Gets the HTML content value for the requested attribute
- Specified by:
getContent
in interface ContentProducer
- Overrides:
getContent
in class AttributeFigureContentProducer
- Parameters:
context
- the calling client contextctxAttrName
- the attribute name (FontSize, etc...)ctxAttrValue
- the attribute value that led to the call to this
- Returns:
- The content value
getHTMLFontSizeEquivalent
public int getHTMLFontSizeEquivalent(int pointSize)
- Gets the hTMLFontSizeEquivalent attribute of the HTMLTextAreaFigure object
- Parameters:
pointSize
- the font size in points
- Returns:
- The hTMLFontSizeEquivalent value