|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JOptionPane
org.vizzini.ui.AbstractOptionPane
org.vizzini.ui.help.HelpDialogSwing
public class HelpDialogSwing
Provides a Swing dialog to display help information.
This dialog uses an instance of HelpModel
to access HTML
files in the help subdirectory of the owning class package. The HTML files
must use the suffix .html.
A file called topicList.txt must contain the ordered topic list.
HelpModel
,
Serialized FormNested Class Summary | |
---|---|
(package private) class |
HelpDialogSwing.MyTreeSelectionListener
Provides a tree selection listener with an active flag so it can be turned off. |
Nested classes/interfaces inherited from class javax.swing.JOptionPane |
---|
JOptionPane.AccessibleJOptionPane |
Nested classes/interfaces inherited from class javax.swing.JComponent |
---|
JComponent.AccessibleJComponent |
Nested classes/interfaces inherited from class java.awt.Container |
---|
Container.AccessibleAWTContainer |
Nested classes/interfaces inherited from class java.awt.Component |
---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary |
---|
Fields inherited from class org.vizzini.ui.AbstractOptionPane |
---|
_title, APPLY_OPTION, CUSTOM_CANCEL_APPLY_OPTION, CUSTOM_CANCEL_OPTION, CUSTOM_OPTION, OK_CANCEL_APPLY_OPTION |
Fields inherited from class javax.swing.JComponent |
---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
HelpDialogSwing(Frame frame,
String ownerTitle)
Construct this object with the given parameters. |
|
HelpDialogSwing(Frame frame,
String ownerTitle,
Class owningClass)
Construct this object with the given parameters. |
Method Summary | |
---|---|
void |
backActionPerformed(ActionEvent event)
Callback for the back action. |
protected void |
checkActions()
Check the action enabled states. |
protected JComponent |
createDocumentUI()
Create the document pane. |
protected HyperlinkListener |
createHyperlinkListener()
Create a hyperlink listener. |
protected JComponent |
createNavigationUI()
Create the navigation pane. |
protected JComponent |
createTopicUI()
Create the topic tree component. |
protected HelpDialogSwing.MyTreeSelectionListener |
createTreeSelectionListener()
Create a tree selection listener. |
void |
displayDocument(String topic)
Display the document which corresponds to the given topic. |
void |
displayDocument(URL url,
boolean doSelectTopicNode)
Display the document at the given URL. |
protected void |
fillMainPanel(JPanel mainPanel)
Fill the main panel which is placed in the message area of the option pane. |
void |
forwardActionPerformed(ActionEvent event)
Callback for the forward action. |
protected Action |
getBackAction()
Return the home action. |
protected Action |
getForwardAction()
Return the home action. |
protected Action |
getHomeAction()
Return the home action. |
protected String |
getHomeTopic()
Return the home topic. |
protected URL |
getHomeUrl()
Return the home URL. |
protected URL |
getSystemResourceFor(String topic)
Return the URL which corresponds to the given topic. |
protected String |
getTitleKey()
Return the title string key. |
protected String |
getTopicFor(URL url)
Return the URL which corresponds to the given topic. |
void |
homeActionPerformed(ActionEvent event)
Callback for the home action. |
protected void |
logTreeNodesMap()
Debug method to log the tree nodes map. |
protected void |
saveToNext()
Save the current document URL on the next stack. |
protected void |
saveToPrevious()
Save the current document URL on the previous stack. |
protected void |
selectNodeFor(String topic)
Select the node for the given topic. |
protected void |
selectNodeFor(URL url)
Select the node for the given URL. |
Methods inherited from class org.vizzini.ui.AbstractOptionPane |
---|
applyActionPerformed, cancelActionPerformed, checkComponents, closedActionPerformed, createMainPanel, fillMainPanel, findAndSetDefaultButton, getDialog, getMainPanel, getOptionType, getOwnerTitle, getResult, init, initializeOptionStrings, isActionApproved, isDirty, noActionPerformed, okActionPerformed, performUpdates, processResult, setCursorBusy, setDirty, setOptionType, setOptionType, setTitle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public HelpDialogSwing(Frame frame, String ownerTitle)
frame
- Parent frame.ownerTitle
- Owner title.public HelpDialogSwing(Frame frame, String ownerTitle, Class owningClass)
frame
- Parent frame.ownerTitle
- Owner title.owningClass
- Class whose package to use to locate the help
subdirectory. used to locate the help files.Method Detail |
---|
public void backActionPerformed(ActionEvent event)
public void displayDocument(String topic)
topic
- Topic to display.public void displayDocument(URL url, boolean doSelectTopicNode)
url
- URL to display.doSelectTopicNode
- Flag indicating whether to select the topic
node in the topic tree.public void forwardActionPerformed(ActionEvent event)
public void homeActionPerformed(ActionEvent event)
protected void checkActions()
protected JComponent createDocumentUI()
protected HyperlinkListener createHyperlinkListener()
protected JComponent createNavigationUI()
protected JComponent createTopicUI()
protected HelpDialogSwing.MyTreeSelectionListener createTreeSelectionListener()
protected void fillMainPanel(JPanel mainPanel)
fillMainPanel
in class AbstractOptionPane
protected Action getBackAction()
protected Action getForwardAction()
protected Action getHomeAction()
protected String getHomeTopic()
protected URL getHomeUrl()
protected URL getSystemResourceFor(String topic)
topic
- Topic.protected String getTitleKey()
getTitleKey
in class AbstractOptionPane
protected String getTopicFor(URL url)
url
- URL to the topic's html page.protected void logTreeNodesMap()
protected void saveToNext()
protected void saveToPrevious()
protected void selectNodeFor(URL url)
protected void selectNodeFor(String topic)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |