|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.help.NFHelpContext
Class NFHelpContext provides an implementation of the HelpContext interface. Instances of
NFHelpContext subscribes to its target contextContainer and its components for focus events
and f1 key strokes.
Supported API: true
Extendable: false
Nested Class Summary | |
private class |
NFHelpContext.HelpComponentListener
|
private class |
NFHelpContext.HelpContainerListener
Inner class used to monitor the context container for help events. |
Field Summary | |
private PropertyChangeSupport |
changes
|
private com.objectspace.jgl.HashMap |
componentListeners
|
private Container |
container
The container to which this help context applies. |
private static boolean |
containerFocusOnMousePressed
|
protected boolean |
containerGetsFocusOnMousePressed
Implementation fields. |
private String |
contextId
The id for the target context. |
private NFHelpContext.HelpContainerListener |
helpContainerListener
|
private HelpSystem |
helpSystem
The help system. |
private String |
toolDescription
The tool description for the component under the mouse. |
private TextComponent |
toolDescriptionTextComponent
|
private ToolTips |
toolTips
Delegate to manage tool tips. |
private String |
toolTipText
The tool tip for the component under the mouse. |
Fields inherited from interface wt.help.HelpContext |
CONTAINER, CONTEXT_ID, HELP_SYSTEM, TOOL_DESCRIPTION, TOOL_TIP_TEXT |
Constructor Summary | |
NFHelpContext(Container container,
HelpSystem helpSystem,
String contextId)
Construct a NFHelpContext which will monitor the contextContainer and its components for focus events, and f1 key. |
Method Summary | |
void |
addComponentHelp(Component component)
Add a container component to the help context and use its name as the help context id. |
void |
addComponentHelp(Component component,
String topicId)
Add a container component to the help context and use the passed topicid as its help key. |
protected void |
addContainerComponents(Container container)
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Add a property change listener which may listen for changes to properties and attributes specified above. |
Container |
getContainer()
Getter for the context container. |
String |
getContextId()
Return the help sub-key for this context. |
HelpSystem |
getHelpSystem()
Getter for the helpSystem property. |
String |
getToolDescription()
Getter for the toolDescription attribute. |
String |
getToolTipText()
Getter for the toolTipText attribute. |
void |
initialize()
Initialize the help context. |
void |
removeComponentHelp(Component component)
Remove the component from the list of context help entries. |
void |
removePropertyChangeListener(PropertyChangeListener listener)
Remove the listener from the list of property change listeners. |
void |
setContainer(Container newValue)
Setter for the context container. |
void |
setContextId(String newValue)
Setter for the contextId. |
void |
setHelpSystem(HelpSystem newValue)
Setter for the help desk property. |
protected void |
setToolDescription(String newValue)
|
void |
setToolDescriptionDisplay(TextComponent textComponent)
Operation settoolDescriptionDisplay is a convensiance operation which allows the client to specify a TextComponent which is used to display the tool description for the component which is under the mouse. |
protected void |
setToolTipText(String newValue)
|
void |
showContents()
Show help contents based on this context id. |
void |
stopIt()
Stop context help and release resources. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static boolean containerFocusOnMousePressed
private HelpSystem helpSystem
private String contextId
private Container container
private String toolDescription
private String toolTipText
protected boolean containerGetsFocusOnMousePressed
private TextComponent toolDescriptionTextComponent
private NFHelpContext.HelpContainerListener helpContainerListener
private com.objectspace.jgl.HashMap componentListeners
private PropertyChangeSupport changes
private ToolTips toolTips
Constructor Detail |
public NFHelpContext(Container container, HelpSystem helpSystem, String contextId) throws PropertyVetoException
container
- the container for this help context.helpSystem
- the help system for this context.contextId
- the help sub-key for this context.
PropertyVetoException
- if any of the parameters is invalid.Method Detail |
public void initialize() throws PropertyVetoException
HelpContext
Operation initialize causes this HelpContext to start listening to the container and its components. The topic id for each component defaults to the components name. This means that the components name should match the topic id. To override a component topic id use operation addComponentHelp.
initialize
in interface HelpContext
PropertyVetoException
- if any of the fields has been improperly set.protected void addContainerComponents(Container container)
public HelpSystem getHelpSystem()
HelpContext
getHelpSystem
in interface HelpContext
public void setHelpSystem(HelpSystem newValue) throws PropertyVetoException
setHelpSystem
in interface HelpContext
newValue
- the new help desk.
PropertyVetoException
- if the new value is inavlid.public String getContextId()
getContextId
in interface HelpContext
public void setContextId(String newValue) throws PropertyVetoException
setContextId
in interface HelpContext
newValue
- the new value fof the context id.
PropertyVetoException
- if the new value is invalid.public Container getContainer()
getContainer
in interface HelpContext
public void setContainer(Container newValue) throws PropertyVetoException
setContainer
in interface HelpContext
newValue
- the new context container.
PropertyVetoException
- if the new property is invalid.public String getToolDescription()
HelpContext
getToolDescription
in interface HelpContext
protected void setToolDescription(String newValue) throws PropertyVetoException
newValue
- the new value of the tool description.
PropertyVetoException
- if the new value is invalid.public String getToolTipText()
HelpContext
getToolTipText
in interface HelpContext
protected void setToolTipText(String newValue) throws PropertyVetoException
newValue
- the new value of the tool tip text.
PropertyVetoException
- if the new value is invalid.public void setToolDescriptionDisplay(TextComponent textComponent)
HelpContext
setToolDescriptionDisplay
in interface HelpContext
textComponent
- an instance of TextComponent.public void showContents()
showContents
in interface HelpContext
public void addComponentHelp(Component component, String topicId)
addComponentHelp
in interface HelpContext
component
- component to monitor for help events.topicId
- the help system topic id.public void addComponentHelp(Component component)
component
- component to monitor for help events.public void removeComponentHelp(Component component)
removeComponentHelp
in interface HelpContext
component
- the component to remove from the list.public void addPropertyChangeListener(PropertyChangeListener listener)
HelpContext
addPropertyChangeListener
in interface HelpContext
listener
- the listener.public void removePropertyChangeListener(PropertyChangeListener listener)
HelpContext
removePropertyChangeListener
in interface HelpContext
listener
- the listener to remove.public void stopIt()
stopIt
in interface HelpContext
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |