com.plumtree.xpshared.htmlelements
Class DisplayOptions

java.lang.Object
  extended by com.plumtree.xpshared.htmlelements.DisplayOptions

public class DisplayOptions
extends java.lang.Object

This helper class contains the display options for displaying HTMLElements. These are used throughout the entire HTML tree (usually from HTMLPage down, although sometimes the root of the tree will be another type of HTMLElement). Since the Display Options are set on every HTMLElement, if someone caches an HTMLElement on the session or application, this object will be leaked (retained) until the session or application is cleared. There may also be some multi-threading issues when using a cached HTMLElement for multiple users (the login page Auth Source dropdown is stored on the application), since each user will attempt to set their own Display Options on the cached HTMLElement.

Author:
DonH

Constructor Summary
DisplayOptions()
           
 
Method Summary
 boolean GetDo508Checking()
          This method returns whether or not to do 508 validity checking for HTMLElements.
 boolean GetForceLineBreaksAfterSafeElements()
          This method returns whether or not to use line breaks after elements where it does not affect the HTML output.
 java.lang.String GetImgBaseUrl()
          Call this method to obtain the base url used for all HTMLImg objects being displayed
 boolean GetIsNetscape()
          This method returns whether or not the browser is Netscape.
 java.lang.String GetLang()
          Get the value of the lang attribute.
 java.lang.String GetStyleClassPrefix()
          This method returns the style class prefix used for all HTMLElement objects being displayed.
 void SetDo508Checking(boolean b)
          This method sets whether or not to do 508 validity checking for HTMLElements.
 void SetForceLineBreaksAfterSafeElements(boolean b)
          This method controls whether or not to use line breaks after elements where it does not affect the HTML output.
 void SetImgBaseUrl(java.lang.String s)
          Call this method to set the base url used for all HTMLImg objects being displayed.
 void SetIsNetscape(boolean b)
          This method sets whether or not the browser is Netscape.
 void SetLang(java.lang.String s)
          Set the value of the lang attribute.
 void SetStyleClassPrefix(java.lang.String s)
          Call this method to set the style class prefix used for all HTMLElement objects being displayed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DisplayOptions

public DisplayOptions()
Method Detail

GetImgBaseUrl

public java.lang.String GetImgBaseUrl()
Call this method to obtain the base url used for all HTMLImg objects being displayed

Returns:
String base url.

SetImgBaseUrl

public void SetImgBaseUrl(java.lang.String s)
Call this method to set the base url used for all HTMLImg objects being displayed.

Call this method only on the root HTMLElement object. If you are building an HTMLPage, for example, call myPage.SetImgBaseUrl( "http://blah/" );. All nested HTMLImg objects may use the base url specified on the HTMLPage object.

HTMLImg objects may or may not use this base url specified.

Parameters:
s - Pass a base url string. It should look something like: "http://blah/".

SetLang

public void SetLang(java.lang.String s)
Set the value of the lang attribute.

Parameters:
s - String value

GetLang

public java.lang.String GetLang()
Get the value of the lang attribute.

Returns:
String value (default null)

SetIsNetscape

public void SetIsNetscape(boolean b)
This method sets whether or not the browser is Netscape. Certain HTMLElements will display differently on Netscape versus other browsers.

Parameters:
b - boolean true implies the browser is Netscape

GetIsNetscape

public boolean GetIsNetscape()
This method returns whether or not the browser is Netscape.

Returns:
boolean true implies the browser is Netscape.

SetForceLineBreaksAfterSafeElements

public void SetForceLineBreaksAfterSafeElements(boolean b)
This method controls whether or not to use line breaks after elements where it does not affect the HTML output.

Parameters:
b - boolean true implies use line breaks.

GetForceLineBreaksAfterSafeElements

public boolean GetForceLineBreaksAfterSafeElements()
This method returns whether or not to use line breaks after elements where it does not affect the HTML output.

Returns:
boolean true implies use line breaks.

GetStyleClassPrefix

public java.lang.String GetStyleClassPrefix()
This method returns the style class prefix used for all HTMLElement objects being displayed.

Returns:
The base URL used for style classes.

SetStyleClassPrefix

public void SetStyleClassPrefix(java.lang.String s)
Call this method to set the style class prefix used for all HTMLElement objects being displayed.

Call this method only on the root HTMLElement object. If you are building an HTMLPage, for example, call myPage.SetStyleClassPrefix( "PREFIX" );. All nested objects may use the prefix specified on the HTMLPage object.

Parameters:
s - Pass a base url string. It should look something like: "http://blah/".

SetDo508Checking

public void SetDo508Checking(boolean b)
This method sets whether or not to do 508 validity checking for HTMLElements. If this is true, HTMLElements will try to enforce that the developer does not make HTML that is not 508 compliant.

Parameters:
b - boolean true implies enforce 508 validity.

GetDo508Checking

public boolean GetDo508Checking()
This method returns whether or not to do 508 validity checking for HTMLElements. If this is true, HTMLElements will try to enforce that the developer does not make HTML that is not 508 compliant.

Returns:
boolean true implies enforce 508 validity.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.