|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
org.ceryle.ui.help.HelpDialog
public class HelpDialog
Extends JDialog providing a Help dialog box.
The abstract class HelpAction is used
as a base class for help actions, each defined to provide some type
of functionality related to displaying help content or manipulating
displays. The addAction(HelpAction,String,String) method is
used to add embedded actions to each HelpAction, should it contain
any script directives.
| Nested Class Summary | |
|---|---|
class |
HelpDialog.ALinkListener
|
class |
HelpDialog.DialogDisposer
|
| Nested classes/interfaces inherited from class javax.swing.JDialog |
|---|
JDialog.AccessibleJDialog |
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| 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 | |
|---|---|
protected JButton |
btn_close
|
protected JButton |
btn_end
|
protected JButton |
btn_hide
|
protected JButton |
btn_index
|
protected JButton |
btn_next
|
protected JButton |
btn_prev
|
static int |
COLS
The number of columns in the text area. |
static String |
evalNid
The node ID for the evaluation. |
static String |
helpCID
The collection ID for help. |
static int |
HLP_CLOSE
Constant indicating a close help action (-1). |
static int |
HLP_END
Constant indicating an end action. |
static int |
HLP_EVAL
Constant indicating an evaluation action. |
static int |
HLP_INDEX
Constant indicating an index action. |
static int |
HLP_INTRO
Constant indicating an intro action. |
static int |
HLP_NEXT
Constant indicating a next action. |
static int |
HLP_PREV
Constant indicating a previous action. |
static int |
HLP_TOPIC
Constant indicating a help topic action. |
int |
hmargin
"Document mode" horizontal margin (in pixels). |
static String |
introNid
The node ID for the introduction. |
protected JLabel |
m_counter
|
protected JEditorPane |
m_text
|
protected JLabel |
m_title
|
protected JPanel |
northPanel
|
static int |
ROWS
The number of rows in the text area. |
int |
vmargin
"Document mode" vertical margin (in pixels). |
static String |
welcomeNid
The node ID for the help intro text. |
| Fields inherited from class javax.swing.JDialog |
|---|
accessibleContext, rootPane, rootPaneCheckingEnabled |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface javax.swing.WindowConstants |
|---|
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
HelpDialog(Desktop desktop)
Constructor for a help dialog box, which will be shown immediately. |
|
HelpDialog(Desktop desktop,
boolean showOnCreate)
Constructor for a help dialog box. |
|
| Method Summary | |
|---|---|
void |
addAction(HelpAction action,
String keyword,
String parameter)
Add an embedded HelpAction with the given keyword and optional parameter to the provided HelpAction. |
protected String |
createID()
Create a new ID. |
JPanel |
createSelectorPanel()
Return the selector button panel containing the Intro, Evaluation and select Topic buttons. |
static String |
getHelpCID()
Return the ID of the help Collection. |
HelpProcess |
getHelpProcess()
Return the current HelpProcess, null if none is running. |
void |
helpAction(int action)
Traffic director/button handler. |
boolean |
isDocumentMode()
Returns true if the help text body style is in "document" mode, with larger serif font and a white background for greater readability. |
void |
keyPressed(KeyEvent event)
|
void |
keyReleased(KeyEvent event)
|
void |
keyTyped(KeyEvent event)
|
protected void |
openEvaluation()
Starts the evaluation script. |
protected void |
openIntroduction()
Starts the introductory script. |
void |
openTopic()
Displays a dialog to allow selection from among any available help topic scripts (the collection indicated by helpCID). |
void |
openTopic(String nid)
Displays the help topic indicated by the provided document ID from the Help Collection (the collection indicated by helpCID). |
void |
openTopic(String cid,
String nid)
Displays the help topic indicated by the provided Collection and Document IDs. |
void |
openTopic(XNodeID xid)
Displays the help topic indicated by the provided XNodeID. |
protected void |
setActive(boolean active,
HelpProcess helpProcess)
Sets the mode to enable a help, evaluation or help topic sequence. |
protected void |
setBodyText(int style,
String content)
Set the body text and its base style (this is the main text in the center of the dialog). |
protected void |
setCountMessage(String message)
Sets the text of the rightmost text to the provided String. |
protected void |
setDocumentMode(boolean mode)
Sets the help text body style as help text (when false) or (when true) larger, in "Document Mode", with a white background and the Help font for greater readability. |
protected void |
setID(String id,
String title)
Set the action ID. |
protected void |
setTitleText(String s)
Set the title text. |
void |
updateShowTips(boolean showtips)
Update the Show Tips at Startup setting. |
| Methods inherited from class java.awt.Dialog |
|---|
addNotify, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static String welcomeNid
public static String introNid
public static String evalNid
public static final int HLP_CLOSE
public static final int HLP_INTRO
public static final int HLP_EVAL
public static final int HLP_TOPIC
public static final int HLP_INDEX
public static final int HLP_PREV
public static final int HLP_NEXT
public static final int HLP_END
public static int ROWS
public static int COLS
public int hmargin
public int vmargin
public static String helpCID
protected JPanel northPanel
protected JLabel m_title
protected JLabel m_counter
protected JEditorPane m_text
protected JButton btn_index
protected JButton btn_prev
protected JButton btn_next
protected JButton btn_end
protected JButton btn_hide
protected JButton btn_close
| Constructor Detail |
|---|
public HelpDialog(Desktop desktop)
public HelpDialog(Desktop desktop,
boolean showOnCreate)
| Method Detail |
|---|
public JPanel createSelectorPanel()
public void updateShowTips(boolean showtips)
public static String getHelpCID()
public HelpProcess getHelpProcess()
protected void setID(String id,
String title)
setTitleText(String).
protected void setTitleText(String s)
public boolean isDocumentMode()
protected void setDocumentMode(boolean mode)
protected void setCountMessage(String message)
public void helpAction(int action)
protected void openIntroduction()
protected void openEvaluation()
public void openTopic()
helpCID).
public void openTopic(String nid)
helpCID).
public void openTopic(XNodeID xid)
public void openTopic(String cid,
String nid)
protected void setBodyText(int style,
String content)
protected void setActive(boolean active,
HelpProcess helpProcess)
throws HelpException
HelpException - if the mode is set improperly (e.g., there is already a sequence in progress)
public void addAction(HelpAction action,
String keyword,
String parameter)
Provided a String, parses the String and adds an embedded HelpAction to the
provided HelpActions's list. This class may be extended to provide additional
assignments of HelpAction subclasses. The actual parsing is done either by
the HelpAction.parseToAction(HelpAction,String)
method within HelpAction or by a overriding of that method within a HelpAction
subclass.
The available HelpActions are currently defined as the following, a single token keyword followed by whitespace, then some optional content.
ResourceOpener, whose behaviour is based on the supplied parameters)
protected String createID()
public void keyPressed(KeyEvent event)
keyPressed in interface KeyListenerpublic void keyReleased(KeyEvent event)
keyReleased in interface KeyListenerpublic void keyTyped(KeyEvent event)
keyTyped in interface KeyListener
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||