org.apache.log4j.chainsaw.help
Class HelpManager

java.lang.Object
  extended by org.apache.log4j.chainsaw.help.HelpManager

public final class HelpManager
extends java.lang.Object

Singleton help manager where objects can register to display Help for something, an independant viewer can register to be notified when the requested Help URL changes and can display it appropriately. This class effectively decouples the help requester from the help implementation (if any!)

Author:
Paul Smith

Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void addPropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void firePropertyChange(java.beans.PropertyChangeEvent evt)
           
 void firePropertyChange(java.lang.String propertyName, boolean oldValue, boolean newValue)
           
 void firePropertyChange(java.lang.String propertyName, int oldValue, int newValue)
           
 void firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
           
 java.net.URL getHelpForClass(java.lang.Class c)
          Determines the most appropriate Help resource for a particular class or returns ChainsawConstants.URL_PAGE_NOT_FOUND if there is no resource located.
 java.net.URL getHelpURL()
           
static HelpManager getInstance()
           
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
           
 void removePropertyChangeListener(java.lang.String propertyName, java.beans.PropertyChangeListener listener)
           
 void setHelpURL(java.net.URL helpURL)
          The current Help URL that should be displayed, and is a PropertyChangeListener supported property.
 void showHelpForClass(java.lang.Class c)
          Given a class, and that it belongs within the org.apache.log4j project, sets the URL to the JavaDoc for that class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHelpURL

public final java.net.URL getHelpURL()
Returns:
URL

setHelpURL

public final void setHelpURL(java.net.URL helpURL)
The current Help URL that should be displayed, and is a PropertyChangeListener supported property. This method ALWAYS fires property change events even if the value is the same (the oldvalue of the event will be null)

Parameters:
helpURL -

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener -

addPropertyChangeListener

public void addPropertyChangeListener(java.lang.String propertyName,
                                      java.beans.PropertyChangeListener listener)
Parameters:
propertyName -
listener -

firePropertyChange

public void firePropertyChange(java.beans.PropertyChangeEvent evt)
Parameters:
evt -

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               boolean oldValue,
                               boolean newValue)
Parameters:
propertyName -
oldValue -
newValue -

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               int oldValue,
                               int newValue)
Parameters:
propertyName -
oldValue -
newValue -

firePropertyChange

public void firePropertyChange(java.lang.String propertyName,
                               java.lang.Object oldValue,
                               java.lang.Object newValue)
Parameters:
propertyName -
oldValue -
newValue -

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Parameters:
listener -

removePropertyChangeListener

public void removePropertyChangeListener(java.lang.String propertyName,
                                         java.beans.PropertyChangeListener listener)
Parameters:
propertyName -
listener -

getInstance

public static HelpManager getInstance()

showHelpForClass

public void showHelpForClass(java.lang.Class c)
Given a class, and that it belongs within the org.apache.log4j project, sets the URL to the JavaDoc for that class.

Parameters:
c -

getHelpForClass

public java.net.URL getHelpForClass(java.lang.Class c)
Determines the most appropriate Help resource for a particular class or returns ChainsawConstants.URL_PAGE_NOT_FOUND if there is no resource located.

Returns:
URL


Copyright © 2007 Apache Software Foundation. All Rights Reserved.