com.bristle.javalib.net.html
Class HtmlUtil

java.lang.Object
  extended by com.bristle.javalib.net.html.HtmlUtil

public class HtmlUtil
extends Object

This class contains utility routines for interacting with the HTML documents.

Usage:
   - The typical scenario for using this class is:
     - To get various HTML keywords and such:
               strTarget = HtmlUtil.strTARGET_NEW_WINDOW;
               strTarget = HtmlUtil.strANCHOR_TARGET_SELF;
               strTarget = HtmlUtil.strANCHOR_TARGET_PARENT;
               strTarget = HtmlUtil.strANCHOR_TARGET_TOP;
               strTarget = HtmlUtil.strANCHOR_TARGET_SEARCH;
               strTarget = HtmlUtil.strANCHOR_TARGET_MEDIA;
Assumptions:
Effects:
Anticipated Changes:
Notes:
Implementation Notes:
Portability Issues:
Revision History:
   $Log$


Nested Class Summary
static class HtmlUtil.Tester
          Each class contains a Tester inner class with a main() for easier unit testing.
 
Field Summary
static String strANCHOR_TARGET_MEDIA
          Anchor target: Browser's media bar (IE 6.0 and later).
static String strANCHOR_TARGET_NEW_WINDOW
          Anchor target: New browser window.
static String strANCHOR_TARGET_PARENT
          Anchor target: Parent window or frame of current frame, or self if no parent.
static String strANCHOR_TARGET_SEARCH
          Anchor target: Browser's search pane (IE 5.0 and later).
static String strANCHOR_TARGET_SELF
          Anchor target: Current browser window or frame.
static String strANCHOR_TARGET_TOP
          Anchor target: Top-level window of browser.
 
Constructor Summary
HtmlUtil()
           
 
Method Summary
static String getFriendlyErrorMessage(String strMessage, Throwable throwable)
          Get a friendly error message, formatted as HTML.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

strANCHOR_TARGET_NEW_WINDOW

public static final String strANCHOR_TARGET_NEW_WINDOW
Anchor target: New browser window.

See Also:
Constant Field Values

strANCHOR_TARGET_SELF

public static final String strANCHOR_TARGET_SELF
Anchor target: Current browser window or frame.

See Also:
Constant Field Values

strANCHOR_TARGET_PARENT

public static final String strANCHOR_TARGET_PARENT
Anchor target: Parent window or frame of current frame, or self if no parent.

See Also:
Constant Field Values

strANCHOR_TARGET_TOP

public static final String strANCHOR_TARGET_TOP
Anchor target: Top-level window of browser.

See Also:
Constant Field Values

strANCHOR_TARGET_SEARCH

public static final String strANCHOR_TARGET_SEARCH
Anchor target: Browser's search pane (IE 5.0 and later).

See Also:
Constant Field Values

strANCHOR_TARGET_MEDIA

public static final String strANCHOR_TARGET_MEDIA
Anchor target: Browser's media bar (IE 6.0 and later).

See Also:
Constant Field Values
Constructor Detail

HtmlUtil

public HtmlUtil()
Method Detail

getFriendlyErrorMessage

public static String getFriendlyErrorMessage(String strMessage,
                                             Throwable throwable)
Get a friendly error message, formatted as HTML.

Parameters:
strMessage - A String to put in front of the error message.
throwable - The Throwable containing the error message.