@MinDoc(copyright="Copyright 2005, 2009 A. Weinert", author="Albrecht Weinert", version="see enclosing class GrafHelper", lastModified="see enclosing class GrafHelper", lastModifiedBy="A. Weinert", usage="make a (multilingual) XML description for a menubar and produce it", purpose="a factory for MenuBars") public static class GrafHelper.MBarFactory extends SAXHandler
SAXHandler
, factoring either a
MenuBar
or a JMenuBar
depending on the property
swingy
). The XML syntax — just five tags as of V.111
— is quite simple. The SAXHandler
's syntax to produce MenuBar
s or
JMenuBar
s isde.frame4j.xml
,
TextHelper
,
PropMap
Modifier and Type | Field and Description |
---|---|
protected boolean |
debug
Debug outputs.
|
protected String |
la
Two letter language code (de, en, fr, etc.).
|
protected String |
laLabel
Language specific parameter names.
|
protected String |
laShortcut
Language specific parameter names.
|
protected boolean |
swingy
Swing, not AWT.
|
errorCount, fatalCount, log, name, reThrow, warningCount
Constructor and Description |
---|
MBarFactory(CharSequence name,
CharSequence language,
boolean swingy,
PrintWriter log)
Providing the factory.
|
Modifier and Type | Method and Description |
---|---|
void |
endElement(String namespaceURI,
String localName,
String qName)
End of a XML element.
|
Object |
getProduct()
Deliver the product of the (ready, successful) parsing.
|
boolean |
isDebug()
Debug outputs.
|
MenuContainer |
product()
MenuContainer / result.
|
void |
setDebug(boolean debug)
Debug outputs.
|
void |
startDocument()
Re-initialise the handler.
|
void |
startElement(String namespaceURI,
String localName,
String qName,
Attributes atts)
Start of a XML element.
|
characters, endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startPrefixMapping
appRep, error, fatalError, getName, init, report, reportErrors, toString, toStringBuilder, warning
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
error, fatalError, warning
protected boolean swingy
protected boolean debug
isDebug()
protected String la
laLabel
,
laShortcut
protected String laLabel
la
public MBarFactory(CharSequence name, CharSequence language, boolean swingy, PrintWriter log)
SAXHandler
inheritor is made. It's name
is the
parameter value or "...".log
supplied.name
- the handler's namelanguage
- the preferred language's two letter code, default enswingy
- true: Swing; false: AWTlog
- the logParseErrorHandler.ParseErrorHandler(CharSequence, PrintWriter, boolean)
public void startDocument()
startDocument
in interface ContentHandler
startDocument
in class SAXHandler
ContentHandler.startDocument()
public MenuContainer product()
public Object getProduct()
SAXHandler
getProduct
in class SAXHandler
public final boolean isDebug()
public void setDebug(boolean debug)
isDebug()
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException
startElement
in interface ContentHandler
startElement
in class SAXHandler
SAXException
ContentHandler.startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes)
public void endElement(String namespaceURI, String localName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class SAXHandler
SAXException
ContentHandler.endElement(String, String, String)