|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--edu.iu.iv.common.util.MenuConfigFile
A config file that describes the layout of the IVC user interface's
menu. The config file can specify where and under what name each
plugin appears, as well as the order of items in each submenu. Below
is an example of the file format:
# this is a comment
[path]
edu.iu.iv.gui.ExitPlugin: File/Exit
edu.iu.iv.gui.NothingPlugin: File/Nothing, Visualization/Nothing
# comments can appear on any empty line
[order]
: File, *, Visualization
File: *, Exit
Visualization: Nothing, *
Each entry in the path section is a plugin classname, a colon, and a
comma-delimited list of menu paths where the plugin is to appear in
the menu. Each entry in the order section is a submenu's menu path
followed by a colon and an ordered, comma-delimited list of the items
in that submenu. The * wildcard item in each entry specifies where
unknown plugins (those not listed in the path section) are to appear
in the ordering if their default menu paths place them in the entry's
submenu. If no * is present in an entry, unknown plugins are placed
at the end of the entry's ordering.
| Constructor Summary | |
MenuConfigFile(java.lang.String filename)
Creates a new MenuConfigFile and initializes it from the given file. |
|
| Method Summary | |
java.util.Map |
enforceOrder(java.util.Map pathToUnorderedMap)
Uses this config file's menu ordering information to order the given submenu map. |
java.util.Map |
getPathOverrideMap()
Returns the map of menu path overrides specified by this config file. |
void |
readFromFile(java.lang.String filename)
Loads menu structure information from the given file. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public MenuConfigFile(java.lang.String filename)
throws java.io.IOException
filename - the file to read menu data from
java.io.IOException - if there is an error reading from the file| Method Detail |
public void readFromFile(java.lang.String filename)
throws java.io.IOException
filename - the file to read menu data from
java.io.IOException - if there is an error reading from the filepublic java.util.Map getPathOverrideMap()
public java.util.Map enforceOrder(java.util.Map pathToUnorderedMap)
pathToUnorderedMap - a submenu map to be ordered
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||