|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
kawigi.cmd.UIHandler
public class UIHandler
This class loads UI constructs from XML. This has a bit of magic that needs to be cleaned up a bit, and the answer may be to just set properties' values in such a way that is strongly typed.
| Constructor Summary | |
|---|---|
UIHandler(Dispatcher disp)
Constructs a new UIHandler to handle an XML GUI specification and create actions using the given Dispatcher. |
|
| Method Summary | |
|---|---|
void |
characters(char[] ch,
int start,
int length)
Notifies us of non-tag characters between tags. |
void |
endDocument()
Notifies us that the parser has reached the end of the UI document. |
void |
endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
Notifies us of an end tag being reached. |
void |
fatalError(org.xml.sax.SAXParseException e)
Notifies us of any error encountered in parsing. |
java.awt.Container |
getCurrentComponent()
Returns the control that we created, or null if we aren't finished. |
static java.awt.Container |
loadMenu(MenuID menu,
Dispatcher disp)
Returns the result of loading of the given MenuID, and actions will be created using the given Dispatcher. |
static void |
reportError(java.lang.Throwable e,
boolean warning)
Prints the stack trace of an error or warning and notifies the user with a dialog. |
void |
startDocument()
Called when we begin parsing the GUI XML. |
void |
startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
Called when a start XML tag is encountered. |
void |
warning(org.xml.sax.SAXParseException e)
Notifies us of any recoverable warning encountered in parsing. |
| Methods inherited from class org.xml.sax.helpers.DefaultHandler |
|---|
endPrefixMapping, error, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startPrefixMapping, unparsedEntityDecl |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UIHandler(Dispatcher disp)
| Method Detail |
|---|
public static java.awt.Container loadMenu(MenuID menu,
Dispatcher disp)
public java.awt.Container getCurrentComponent()
public void startDocument()
startDocument in interface org.xml.sax.ContentHandlerstartDocument in class org.xml.sax.helpers.DefaultHandler
public void startElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName,
org.xml.sax.Attributes attributes)
startElement in interface org.xml.sax.ContentHandlerstartElement in class org.xml.sax.helpers.DefaultHandler
public void characters(char[] ch,
int start,
int length)
characters in interface org.xml.sax.ContentHandlercharacters in class org.xml.sax.helpers.DefaultHandler
public void endElement(java.lang.String uri,
java.lang.String localName,
java.lang.String qName)
endElement in interface org.xml.sax.ContentHandlerendElement in class org.xml.sax.helpers.DefaultHandlerpublic void endDocument()
endDocument in interface org.xml.sax.ContentHandlerendDocument in class org.xml.sax.helpers.DefaultHandlerpublic void fatalError(org.xml.sax.SAXParseException e)
fatalError in interface org.xml.sax.ErrorHandlerfatalError in class org.xml.sax.helpers.DefaultHandlerpublic void warning(org.xml.sax.SAXParseException e)
warning in interface org.xml.sax.ErrorHandlerwarning in class org.xml.sax.helpers.DefaultHandler
public static void reportError(java.lang.Throwable e,
boolean warning)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||