com.mslinn.JBrowCaps
Class HtmlFormat

java.lang.Object
  |
  +--com.mslinn.JBrowCaps.HtmlFormat
All Implemented Interfaces:
Serializable

public class HtmlFormat
extends Object
implements Serializable

This is a helper class for StyleSheet, and assists with HTML generation for web browsers that don't support CSS. It is notified about the CSS definitions by StyleSheet and builds HTML strings accordingly.

See Also:
Serialized Form

Field Summary
 HashMap map
          result of class, ready for pickup after calling HtmlFormat(HashMap)
 
Constructor Summary
HtmlFormat()
          Default constructor
HtmlFormat(HashMap rule)
          If this constructor is not used, initialize(HashMap) must be called.
 
Method Summary
 String getSelectorInline()
          Returns strings like bgcolor=white
 String getSelectorOff()
          Returns strings like </font></i></b>.
 String getSelectorOn()
          Returns strings like <b><i><font color="red">
 void initialize(HashMap rule)
          Reset all members After calling this routine, this class's variables are all set.
static void main(String[] args)
          Testing only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

public HashMap map
result of class, ready for pickup after calling HtmlFormat(HashMap)
Constructor Detail

HtmlFormat

public HtmlFormat()
Default constructor

HtmlFormat

public HtmlFormat(HashMap rule)
If this constructor is not used, initialize(HashMap) must be called.
Method Detail

getSelectorInline

public String getSelectorInline()
Returns strings like bgcolor=white

getSelectorOff

public String getSelectorOff()
Returns strings like </font></i></b>. Order of tags is the reverse of those returned by getSelectorOn() so the HTML is well-formed.

getSelectorOn

public String getSelectorOn()
Returns strings like <b><i><font color="red">

initialize

public void initialize(HashMap rule)
Reset all members After calling this routine, this class's variables are all set. The target formatting strings are available by calling getSelectorOn(), getSelectorOff() and getSelectorInline().

main

public static void main(String[] args)
                 throws Exception
Testing only.


Written 2001 by Mike Slinn.  All rights reserved.
4230 Wooster Ave, San Mateo, CA 94403.
Tel: 650-571-8436   www.mslinn.com