public class HelpService
extends java.lang.Object
Each public method emulates an option of the statement. They do a quick validation. If successful they return a reference to this object to allow other method to be chained.
The execute()
method does the final checks, send the request with gathered options
to client.
Modifier and Type | Field and Description |
---|---|
private SystemHelpAction |
action
The help system primitive to be executed.
|
private java.lang.String |
altKey
The alternative keyword for the desired help topic.
|
private java.lang.String |
command
The help macro to execute.
|
private boolean |
contents
The flag for
CONTENTS option. |
private int |
contentTopic
The context number for the new contents help topic in a
SET-CONTENTS help stmt. |
private int |
context
Flag that
CONTEXT mode was configured. |
private int |
contextPopup
The context number for the help topic in a
CONTEXT-POPUP help statement. |
private boolean |
finder
Flags the
FINDER option is activated |
private boolean |
forceFile
Flags the
FORCE-FILE option is activated |
private int |
height
The HEIGHT of the help window.
|
private boolean |
help
Flags the
HELP option is activated |
private java.lang.String |
helpFile
Specifies the pathname of a help file.
|
private java.lang.String |
key
The keyword for the desired help topic.
|
private boolean |
maximized
Flag to maximize an existing (already opened) help window.
|
private java.lang.String |
multipleKey
The keyword that is located in the keyword table in a
MULTIPLE-KEY help statement. |
private java.lang.String |
partialKey
The partial key for the desired help topic in a
PARTIAL-KEY statement. |
private boolean |
quit
Flags the help application that help is no longer required.
|
private java.lang.Object[] |
specificParams
The list of specific parameters to current action (optional).
|
private java.lang.String |
tableId
The single character keyword table identifier for the required table in a
MULTIPLE-KEY help statement. |
private java.lang.String |
topic
The
HELP-TOPIC option active if this is not null. |
private int |
width
The WIDTH of the help window.
|
private java.lang.String |
windowName
The window-name parameter represents the primary or secondary window name as defined in the
[WINDOWS] section of the help project file.
|
private int |
x
The X coordinate for the help window.
|
private int |
y
The Y coordinate for the help window.
|
Modifier | Constructor and Description |
---|---|
private |
HelpService()
Private constructor.
|
Modifier and Type | Method and Description |
---|---|
HelpService |
contents()
Activates the
CONTENTS mode. |
void |
execute()
The chain-terminator method.
|
HelpService |
finder()
Activates the
FINDER mode. |
HelpService |
forceFile()
Activates the
FORCE-FILE mode: Ensures that the correct help file is open and
displayed. |
HelpService |
help()
Activates the
HELP mode. |
HelpService |
maximized()
Activates the
POSITION MAXIMIZE mode, when executed, it maximizes an existing
(already opened) help window. |
static HelpService |
prepare(java.lang.String helpFile)
Prepares a new configuration based on
helpFile . |
static HelpService |
prepare(Text helpFile)
Prepares a new configuration based on
helpFile . |
HelpService |
quit()
Activates the
QUIT mode. |
private void |
setAction(SystemHelpAction a)
Validates and sets the current action to be executed.
|
HelpService |
setAlternateKey(java.lang.String altKey)
Activates the
ALTERNATE-KEY mode. |
HelpService |
setAlternateKey(Text altKey)
Activates the
ALTERNATE-KEY mode. |
HelpService |
setCommand(java.lang.String command)
Activates the
COMMAND mode. |
HelpService |
setCommand(Text command)
Activates the
COMMAND mode. |
HelpService |
setContents(long contents)
Activates the
SET-CONTENTS mode. |
HelpService |
setContents(NumberType contents)
Activates the
SET-CONTENTS mode. |
HelpService |
setContext(long context)
Activates the
CONTEXT mode. |
HelpService |
setContext(NumberType context)
Activates the
CONTEXT mode. |
HelpService |
setContextPopup(long contextPopup)
Activates the
CONTEXT-POPUP mode. |
HelpService |
setContextPopup(NumberType contextPopup)
Activates the
CONTEXT-POPUP mode. |
HelpService |
setKey(java.lang.String key)
Activates the
KEY mode. |
HelpService |
setKey(Text key)
Activates the
KEY mode. |
HelpService |
setMultipleKey(java.lang.String tableId,
java.lang.String multipleKey)
Activates the
MULTIPLE-KEY mode. |
HelpService |
setMultipleKey(java.lang.String tableId,
Text multipleKey)
Activates the
MULTIPLE-KEY mode. |
HelpService |
setMultipleKey(Text tableId,
java.lang.String multipleKey)
Activates the
MULTIPLE-KEY mode. |
HelpService |
setMultipleKey(Text tableId,
Text multipleKey)
Activates the
MULTIPLE-KEY mode. |
HelpService |
setPartialKey(java.lang.String partialKey)
Activates the
PARTIAL-KEY mode. |
HelpService |
setPartialKey(Text partialKey)
Activates the
PARTIAL-KEY mode. |
HelpService |
setPosition(long x,
long y,
long width,
long height)
Sets the new
POSITION and geometry to help window. |
HelpService |
setPosition(NumberType x,
NumberType y,
NumberType width,
NumberType height)
Sets the new
POSITION and geometry to help window. |
HelpService |
setTopic(java.lang.String topic)
Activates the
HELP-TOPIC mode. |
HelpService |
setTopic(Text topic)
Activates the
HELP-TOPIC mode. |
HelpService |
setWindowName(java.lang.String windowName)
Configures the name of the to be created as child of a certain windows.
|
HelpService |
setWindowName(Text windowName)
Configures the name of the to be created as child of a certain windows.
|
private SystemHelpAction action
private java.lang.Object[] specificParams
private java.lang.String helpFile
private java.lang.String windowName
private boolean contents
CONTENTS
option.private int context
CONTEXT
mode was configured. In this mode, the statements displays the
help topic that the context number identifies. The context numbers are defined in the [MAP]
section of the help project file. The int-expr parameter is the context number for the help
topic.private java.lang.String topic
HELP-TOPIC
option active if this is not null. The value that indicates the
topic (.htm/.html file) within the compiled Microsoft HTML Help (.chm) file to display.private java.lang.String key
private java.lang.String altKey
private java.lang.String command
private java.lang.String partialKey
PARTIAL-KEY
statement.private java.lang.String tableId
MULTIPLE-KEY
help statement.private java.lang.String multipleKey
MULTIPLE-KEY
help statement.private boolean quit
private boolean finder
FINDER
option is activatedprivate boolean forceFile
FORCE-FILE
option is activatedprivate boolean help
HELP
option is activatedprivate int contextPopup
CONTEXT-POPUP
help statement.private int contentTopic
SET-CONTENTS
help stmt.private boolean maximized
private int x
private int y
private int width
private int height
private HelpService()
prepare(java.lang.String)
factory method to create an object.public static HelpService prepare(java.lang.String helpFile)
helpFile
.helpFile
- The pathname of a help fileHelpService
. Used for chaining.public static HelpService prepare(Text helpFile)
helpFile
.helpFile
- The pathname of a help fileHelpService
. Used for chaining.public void execute()
public HelpService setWindowName(Text windowName)
windowName
- The help window name.HelpService
. Used for chaining.windowName
public HelpService setWindowName(java.lang.String windowName)
windowName
- The help window name.HelpService
. Used for chaining.windowName
public HelpService contents()
CONTENTS
mode.HelpService
. Used for chaining.contents
public HelpService setTopic(java.lang.String topic)
HELP-TOPIC
mode.topic
- The help window name.HelpService
. Used for chaining.topic
public HelpService setTopic(Text topic)
HELP-TOPIC
mode.topic
- The help window name.HelpService
. Used for chaining.topic
public HelpService setContext(long context)
CONTEXT
mode.context
- The context number for the help topic. Displays the help topic that the context
number identifies. You define context numbers in the [MAP] section of the help
project file.HelpService
. Used for chaining.context
public HelpService setContext(NumberType context)
CONTEXT
mode.context
- The context number for the help topic. Displays the help topic that the context
number identifies. You define context numbers in the [MAP] section of the help
project file.HelpService
. Used for chaining.context
public HelpService setKey(java.lang.String key)
KEY
mode.
For HTML Help, this option displays the topic matching the string found in the keyword index. Use semicolons in the string parameter to delimit multiple keywords. If no match is found, Microsoft HTML Help displays the help viewer with the Index tab on top.
For Windows Help, this option displays the help topic matching the string found in the index keyword list. If there is more than one match, it displays the first topic containing the keyword. If there is no match or the string is omitted, a message is displayed indicating that the keyword is invalid.
key
- The keyword for the desired help topic.HelpService
. Used for chaining.key
public HelpService setKey(Text key)
KEY
mode.
For HTML Help, this option displays the topic matching the string found in the keyword index. Use semicolons in the string parameter to delimit multiple keywords. If no match is found, Microsoft HTML Help displays the help viewer with the Index tab on top.
For Windows Help, this option displays the help topic matching the string found in the index keyword list. If there is more than one match, it displays the first topic containing the keyword. If there is no match or the string is omitted, a message is displayed indicating that the keyword is invalid.
key
- The keyword for the desired help topic.HelpService
. Used for chaining.key
public HelpService setAlternateKey(java.lang.String altKey)
ALTERNATE-KEY
mode. Displays a help topic matching the string found in
the alternate keyword (Alink) index.altKey
- The keyword in the alternate keyword index.HelpService
. Used for chaining.altKey
public HelpService setAlternateKey(Text altKey)
ALTERNATE-KEY
mode. Displays a help topic matching the string found in
the alternate keyword (Alink) index.altKey
- The keyword in the alternate keyword index.HelpService
. Used for chaining.altKey
public HelpService setPartialKey(java.lang.String partialKey)
PARTIAL-KEY
mode. Displays the help topic matching the string found
in the keyword list. In Windows, if there is more than one match, no match, or if the string
is omitted, it displays the Help Topics: Window Help Topics dialog box with the Index tab on
top.partialKey
- The partial key for the desired help topic.HelpService
. Used for chaining.partialKey
public HelpService setPartialKey(Text partialKey)
PARTIAL-KEY
mode. Displays the help topic matching the string found
in the keyword list. In Windows, if there is more than one match, no match, or if the string
is omitted, it displays the Help Topics: Window Help Topics dialog box with the Index tab on
top.partialKey
- The partial key for the desired help topic.HelpService
. Used for chaining.partialKey
public HelpService setMultipleKey(java.lang.String tableId, java.lang.String multipleKey)
MULTIPLE-KEY
mode. Displays the help topic matching a keyword from an
alternate keyword table.tableId
- The single character keyword table identifier for the required table.multipleKey
- The keyword that is located in the keyword table.HelpService
. Used for chaining.tableId
,
multipleKey
public HelpService setMultipleKey(Text tableId, java.lang.String multipleKey)
MULTIPLE-KEY
mode. Displays the help topic matching a keyword from an
alternate keyword table.tableId
- The single character keyword table identifier for the required table.multipleKey
- The keyword that is located in the keyword table.HelpService
. Used for chaining.tableId
,
multipleKey
public HelpService setMultipleKey(java.lang.String tableId, Text multipleKey)
MULTIPLE-KEY
mode. Displays the help topic matching a keyword from an
alternate keyword table.tableId
- The single character keyword table identifier for the required table.multipleKey
- The keyword that is located in the keyword table.HelpService
. Used for chaining.tableId
,
multipleKey
public HelpService setMultipleKey(Text tableId, Text multipleKey)
MULTIPLE-KEY
mode. Displays the help topic matching a keyword from an
alternate keyword table.tableId
- The single character keyword table identifier for the required table.multipleKey
- The keyword that is located in the keyword table.HelpService
. Used for chaining.tableId
,
multipleKey
public HelpService setCommand(java.lang.String command)
COMMAND
mode. Executes a help macrocommand
- The command to be executed.HelpService
. Used for chaining.command
public HelpService setCommand(Text command)
COMMAND
mode. Executes a help macrocommand
- The command to be executed.HelpService
. Used for chaining.command
public HelpService quit()
QUIT
mode. Informs the help application that help is no longer
required. The system closes the help window.HelpService
. Used for chaining.quit
public HelpService finder()
FINDER
mode. Displays the Help Topics: Windows Help Topics dialog box,
which contains an Index tab, a Find tab, and optionally a Contents tab, with the most
recently used tab displayed on top. If a Contents tab file (.CNT file) is present when the
user initially call the Help Topics: Windows Help dialog box, then the Content tab displays
on top. However, if a .CNT file is not present, then the dialog box displays with the Index
tab on top; the Contents tab is not available.HelpService
. Used for chaining.finder
public HelpService forceFile()
FORCE-FILE
mode: Ensures that the correct help file is open and
displayed.HelpService
. Used for chaining.forceFile
public HelpService help()
HELP
mode. In this mode, teh statement displays the contents of the
Help-on-Help file. In Windows, HELP displays the Help Topics: Windows Help Topics dialog
box.HelpService
. Used for chaining.help
public HelpService setContextPopup(NumberType contextPopup)
CONTEXT-POPUP
mode. In this mode, when executed, it displays the help
topic in a pop-up window that the context number identifies. The context numbers are
defined in the [MAP] section of the help project file. If a non-scrolling region exists in
a help topic, only that region displays when you use the CONTEXT-POPUP option to display
the topic.contextPopup
- The context number for the help topic.HelpService
. Used for chaining.contextPopup
public HelpService setContextPopup(long contextPopup)
CONTEXT-POPUP
mode. In this mode, when executed, it displays the help
topic in a pop-up window that the context number identifies. The context numbers are
defined in the [MAP] section of the help project file. If a non-scrolling region exists in
a help topic, only that region displays when you use the CONTEXT-POPUP option to display
the topic.contextPopup
- The context number for the help topic.HelpService
. Used for chaining.contextPopup
public HelpService maximized()
POSITION MAXIMIZE
mode, when executed, it maximizes an existing
(already opened) help window.HelpService
. Used for chaining.maximized
public HelpService setContents(long contents)
SET-CONTENTS
mode.
Dynamically re-maps the contents help topic from what is defined in the [OPTIONS] section of the help project file. When a CONTENTS call is made, the new contents help topic is displayed.
contents
- The help window name.HelpService
. Used for chaining.contentTopic
public HelpService setContents(NumberType contents)
SET-CONTENTS
mode.
Dynamically re-maps the contents help topic from what is defined in the [OPTIONS] section of the help project file. When a CONTENTS call is made, the new contents help topic is displayed.
contents
- The help window name.HelpService
. Used for chaining.contentTopic
public HelpService setPosition(NumberType x, NumberType y, NumberType width, NumberType height)
POSITION
and geometry to help window.public HelpService setPosition(long x, long y, long width, long height)
POSITION
and geometry to help window.private void setAction(SystemHelpAction a)
a
- The action to be executed.