com.lightdev.app.shtm
Class AttributeMapper

java.lang.Object
  extended by javax.swing.text.SimpleAttributeSet
      extended by com.lightdev.app.shtm.AttributeMapper
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, javax.swing.text.AttributeSet, javax.swing.text.MutableAttributeSet

public class AttributeMapper
extends javax.swing.text.SimpleAttributeSet

Maps HTML and CSS attributes to their equivalents to compensate discrepancies in HTML and CSS rendering of various different view environments.

Introduced in stage 5 this class only contains hard wired fixes to certain discrepancies. Should there come up an increased number of necessary fixes in future stages, a more generic way of mapping (such as through a Hashtable of from/to values), etc. will be done.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface javax.swing.text.AttributeSet
javax.swing.text.AttributeSet.CharacterAttribute, javax.swing.text.AttributeSet.ColorAttribute, javax.swing.text.AttributeSet.FontAttribute, javax.swing.text.AttributeSet.ParagraphAttribute
 
Field Summary
static int toHTML
           
static int toJava
           
 
Fields inherited from class javax.swing.text.SimpleAttributeSet
EMPTY
 
Fields inherited from interface javax.swing.text.AttributeSet
NameAttribute, ResolveAttribute
 
Constructor Summary
AttributeMapper()
           
AttributeMapper(javax.swing.text.AttributeSet a)
           
 
Method Summary
 javax.swing.text.AttributeSet getMappedAttributes(int direction)
           
 
Methods inherited from class javax.swing.text.SimpleAttributeSet
addAttribute, addAttributes, clone, containsAttribute, containsAttributes, copyAttributes, equals, getAttribute, getAttributeCount, getAttributeNames, getResolveParent, hashCode, isDefined, isEmpty, isEqual, removeAttribute, removeAttributes, removeAttributes, setResolveParent, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

toHTML

public static final int toHTML
See Also:
Constant Field Values

toJava

public static final int toJava
See Also:
Constant Field Values
Constructor Detail

AttributeMapper

public AttributeMapper()

AttributeMapper

public AttributeMapper(javax.swing.text.AttributeSet a)
Method Detail

getMappedAttributes

public javax.swing.text.AttributeSet getMappedAttributes(int direction)