|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object avrora.util.help.HelpCategory
The HelpCategory
class implements a category that provides help from the
command line. It can contain multiple sections, including sections on options, and a list
of other help items (such as what the values of each option does).
Field Summary | |
static java.util.Comparator |
COMPARATOR
|
java.lang.String |
help
|
java.lang.String |
name
|
Constructor Summary | |
HelpCategory(java.lang.String name,
java.lang.String help)
The constructor for the HelpCategory class creates a new help category with the specified
short name and the specified default help. |
Method Summary | |
void |
addCommandExample(java.lang.String prefix,
java.lang.String command)
The addCommandExample() method adds a command example, properly formatted, to
this section. |
void |
addListSection(java.lang.String title,
java.lang.String para,
java.util.List l)
The addListSection() method adds a new section to this help category with the specified
list of help items. |
void |
addOptionSection(java.lang.String para,
Options opts)
The addOptionSection() method adds a new section to this help category with the specified
options. |
void |
addSection(java.lang.String title,
java.lang.String paragraph)
The addSection() method adds a new section to this help category with the specified title
and a paragraph that is automatically formatted when printed out. |
void |
addSubcategorySection(java.lang.String title,
java.lang.String para,
java.util.List l)
The addSubcategorySection method adds a new section that is a list of subcategories
under this main category. |
java.lang.String |
getHelp()
The getHelp() method returns a string representing help for this help item. |
java.lang.String |
getName()
The getName() method returns the short name for this help category. |
void |
printHelp()
The printHelp() method prints out all of the help sections in order for this category. |
void |
setName(java.lang.String nm)
The setName() method is used to set the short name for this help category. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public java.lang.String name
public final java.lang.String help
public static final java.util.Comparator COMPARATOR
Constructor Detail |
public HelpCategory(java.lang.String name, java.lang.String help)
HelpCategory
class creates a new help category with the specified
short name and the specified default help.
name
- the short name of this category (where it is accessible from the command line)help
- the help description for this categoryMethod Detail |
public java.lang.String getHelp()
getHelp()
method returns a string representing help for this help item.
getHelp
in interface HelpItem
public java.lang.String getName()
getName()
method returns the short name for this help category. This short name
is used to add this help category to the global help category database.
public void setName(java.lang.String nm)
setName()
method is used to set the short name for this help category.
nm
- the new short name for this categorypublic void addSection(java.lang.String title, java.lang.String paragraph)
addSection()
method adds a new section to this help category with the specified title
and a paragraph that is automatically formatted when printed out.
title
- the title of the new sectionparagraph
- a long string representing the text for this sectionpublic void addOptionSection(java.lang.String para, Options opts)
addOptionSection()
method adds a new section to this help category with the specified
options. The new section will contain a paragraph description of the options and list the options in
alphabetical order.
para
- a summary of the optionsopts
- the options for this help categorypublic void addListSection(java.lang.String title, java.lang.String para, java.util.List l)
addListSection()
method adds a new section to this help category with the specified
list of help items.
title
- the title of the new sectiobnpara
- a paragraph description of the sectionl
- a list of HelpItem
instances that will be added to the end of the sectionpublic void addSubcategorySection(java.lang.String title, java.lang.String para, java.util.List l)
addSubcategorySection
method adds a new section that is a list of subcategories
under this main category.
title
- the title of the sectionpara
- a paragraph description of this sectionl
- a list of subcategoriespublic void addCommandExample(java.lang.String prefix, java.lang.String command)
addCommandExample()
method adds a command example, properly formatted, to
this section.
prefix
- a string that is the prefix to the command linecommand
- the command line example to addpublic void printHelp()
printHelp()
method prints out all of the help sections in order for this category.
printHelp
in interface HelpItem
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |