|
JFCML - JFC/Swing
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.xml.sax.helpers.DefaultHandler
com.metasolutions.jfcml.TagHandler
public class TagHandler
A SAX Event Handler which is also a JFCML DocumentHandler manager.
Field Summary | |
---|---|
protected AttributeHandler |
attributeHandler
|
protected ChildHandler |
childHandler
|
protected WindowContext |
context
|
protected ElementHandler |
elementHandler
|
protected WindowHandler |
windowHandler
|
Constructor Summary | |
---|---|
TagHandler()
Constructs a TagHandler using the configuration stored in the PackageRegistry. |
|
TagHandler(WindowContext ctxt,
ElementHandler elem,
AttributeHandler attr,
WindowHandler window,
ChildHandler child)
Constructs a TagHandler which uses the specified configuration. |
Method Summary | |
---|---|
void |
addAttributeHandler(AttributeHandler handler)
|
void |
addChildHandler(ChildHandler handler)
|
void |
addElementHandler(ElementHandler handler)
|
void |
addWindowHandler(WindowHandler handler)
|
void |
characters(char[] ch,
int start,
int length)
|
void |
endElement(String namespaceURI,
String sName,
String qName)
Part of the DefaultHandler, this method is invoked by the SaxParser when it finds an end tag. |
void |
endWindow()
|
void |
error(SAXParseException e)
Part of the DefaultHandler, this method is invoked by the SaxParser when an error occurs. |
WindowContext |
getWindowContext()
|
void |
handleAttribute(Element target,
Attribute attrib,
SimpleStack children)
|
void |
handleChildren(Element elem,
SimpleStack children)
|
Object |
handleElement(Element element,
SimpleStack children)
|
void |
setWindowContext(WindowContext windowContext)
Sets the WindowContext for this 'Handler tree. |
void |
startElement(String namespaceURI,
String lName,
String qName,
Attributes attrs)
Part of the DefaultHandler, this method is invoked by the SaxParser when it begins an element tag. |
void |
startWindow(String fileid,
Container window)
|
Methods inherited from class org.xml.sax.helpers.DefaultHandler |
---|
endDocument, endPrefixMapping, fatalError, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping, unparsedEntityDecl, warning |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected ElementHandler elementHandler
protected AttributeHandler attributeHandler
protected WindowHandler windowHandler
protected ChildHandler childHandler
protected WindowContext context
Constructor Detail |
---|
public TagHandler()
public TagHandler(WindowContext ctxt, ElementHandler elem, AttributeHandler attr, WindowHandler window, ChildHandler child)
ctxt
- the WindowContext to useelem
- the ElementHandler to useattr
- the AttributeHandler to usewindow
- the WindowHandler to usechild
- the ChildHandler to useMethod Detail |
---|
public WindowContext getWindowContext()
public void setWindowContext(WindowContext windowContext)
context
- The WindowContext to set.public Object handleElement(Element element, SimpleStack children)
public void addElementHandler(ElementHandler handler)
elementHandler
- The elementHandler to set.public void handleAttribute(Element target, Attribute attrib, SimpleStack children)
public void addAttributeHandler(AttributeHandler handler)
handler
- The AttributeHandler to add to the chain.public void handleChildren(Element elem, SimpleStack children)
elem
- children
- public void addChildHandler(ChildHandler handler)
childHandler
- The ChildHandler to add to the chain.public void startWindow(String fileid, Container window)
public void endWindow()
public void addWindowHandler(WindowHandler handler)
windowHandler
- The WindowHandler to add to the chain.public void characters(char[] ch, int start, int length) throws SAXException
characters
in interface ContentHandler
characters
in class DefaultHandler
SAXException
public void startElement(String namespaceURI, String lName, String qName, Attributes attrs) throws SAXException
In the default implementation, this method will compute a hashCode of the qName parameter, and capture this and the attrs parameter into an Element data structure.
startElement
in interface ContentHandler
startElement
in class DefaultHandler
SAXException
Element
,
SAXParser
,
DefaultHandler
public void endElement(String namespaceURI, String sName, String qName) throws SAXException
endElement
in interface ContentHandler
endElement
in class DefaultHandler
SAXException
public void error(SAXParseException e) throws SAXParseException
In the default implementation, this method simply rethrows the Exception.
error
in interface ErrorHandler
error
in class DefaultHandler
SAXParseException
SAXParser
,
DefaultHandler
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |