kawigi.cmd
Enum MenuID
java.lang.Object
java.lang.Enum<MenuID>
kawigi.cmd.MenuID
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Comparable<MenuID>
public enum MenuID
- extends java.lang.Enum<MenuID>
Enumeration corresponding to .ui files in the rc/ui directory.
The .ui files are XML representations of a graphical user interface that are
parsed and instantiated by the UIHandler class.
Each ui file can be customized - open the contestapplet.conf file (in
Windows XP, this is usually in C:\Documents and Settings\\), add
a line that says something like:
kawigi.ui.[a name from this enum]=[full file path to .ui file]
Then that file will be parsed instead of the one from the KawigiEdit jar for
that UI element. This way you can customize any UI in KawigiEdit if you
want. Perhaps in a future version of KawigiEdit, there will be a way to do
this through the UI, as well as some other options (like no text on buttons,
or large icons, which are there but aren't used yet).
|
Field Summary |
java.lang.String |
filename
The name of the file of the default .ui file in rc/ui. |
|
Method Summary |
java.lang.String |
getCustomUI()
Returns the name of the file that stores the customized version of this
ui file. |
java.io.InputStream |
getXMLStream()
Returns an InputStream which either comes from a file if this UI is
customized or from the jar (or classpath) otherwise. |
static MenuID |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static MenuID[] |
values()
Returns an array containing the constants of this enum type, in
the order they're declared. |
| Methods inherited from class java.lang.Enum |
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
| Methods inherited from class java.lang.Object |
finalize, getClass, notify, notifyAll, wait, wait, wait |
FindReplaceDialog
public static final MenuID FindReplaceDialog
- The Find/Replace dialog
StandaloneFrame
public static final MenuID StandaloneFrame
- The window for KawigiEditStandalone.
PluginPanel
public static final MenuID PluginPanel
- The main KawigiEdit panel shown in the applet.
ConfigPanel
public static final MenuID ConfigPanel
- Panel on the configuration dialog.
RootSnippetCategory
public static final MenuID RootSnippetCategory
- This is a placeholder for the Snippets menu.
What really happens here is before you add any snippets, this is the
blank snippet database menu. When you add a snippet, you are prompted
to save your snippets and kawigi.ui.RootSnippetCategory is set to point
to that file, so that it will be loaded as customized UI in the future.
From then on, whenever you add a snippet, the snippet UI file is resaved
in that location. The nice thing about this system is that I only have
to write the saving code, and the loading is taken care of by the
UIHandler. Also, relative to KawigiEdit 1, this format is nice because
it can be edited in notepad or any other editor (if you're careful to
properly escape XML control characters, like <, >, " and &.
EditorContextMenu
public static final MenuID EditorContextMenu
- The right click menu for the editor.
SnippetDialog
public static final MenuID SnippetDialog
- The dialog for adding snippets.
filename
public java.lang.String filename
- The name of the file of the default .ui file in rc/ui.
values
public static final MenuID[] values()
- Returns an array containing the constants of this enum type, in
the order they're declared. This method may be used to iterate
over the constants as follows:
for(MenuID c : MenuID.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they're declared
valueOf
public static MenuID valueOf(java.lang.String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name - the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
java.lang.IllegalArgumentException - if this enum type has no constant
with the specified name
getCustomUI
public java.lang.String getCustomUI()
- Returns the name of the file that stores the customized version of this
ui file.
getXMLStream
public java.io.InputStream getXMLStream()
- Returns an InputStream which either comes from a file if this UI is
customized or from the jar (or classpath) otherwise.