public class Parser extends Object
 SwingTagLibrary, 
ConverterLibrary| Modifier and Type | Field and Description | 
|---|---|
static String | 
ATTR_ACTION
Allows to provides swixml tags with a dynamic update class 
 | 
static String | 
ATTR_BUNDLE
Additional attribute to collect layout constrain information 
 | 
static String | 
ATTR_CONSTRAINTS
Additional attribute to collect layout constrain information 
 | 
static String | 
ATTR_ID
Allows to provides swixml tags with an unique id 
 | 
static String | 
ATTR_INCLUDE
Allows to provides swixml tags with an unique id 
 | 
static String | 
ATTR_INITCLASS
Allows to provides swixml tags with a dynamic update class 
 | 
static String | 
ATTR_LOCALE
Additional attribute to collect layout constrain information 
 | 
static String | 
ATTR_MACOS_ABOUT
Attribute name that flags an Action as the default Aboutbox handler on a Mac 
 | 
static String | 
ATTR_MACOS_OPENAPP
Attribute name that flags an Action as the default Open Application handler on a Mac 
 | 
static String | 
ATTR_MACOS_OPENFILE
Attribute name that flags an Action as the default Open File handler on a Mac 
 | 
static String | 
ATTR_MACOS_PREF
Attribute name that flags an Action as the default Preferences handler on a Mac 
 | 
static String | 
ATTR_MACOS_PREFIX
Prefix for all MAC OS X related attributes 
 | 
static String | 
ATTR_MACOS_PRINT
Attribute name that flags an Action as the default Print handler on a Mac 
 | 
static String | 
ATTR_MACOS_QUIT
Attribute name that flags an Action as the default Quit handler on a Mac 
 | 
static String | 
ATTR_MACOS_REOPEN
Attribute name that flags an Action as the default Re-Open Applicaiton handler on a Mac 
 | 
static String | 
ATTR_PLAF
Additional attribute to collect information about the PLAF implementation 
 | 
static String | 
ATTR_REFID
Allows to provides swixml tags with a reference to another tag 
 | 
static String | 
ATTR_USE
Deprecated. 
 
use refid instead 
 | 
static String | 
GETINSTANCE
Method name used with initclass - if this exit, the update class will no be instanced but getInstance is called 
 | 
static Vector<String> | 
LOCALIZED_ATTRIBUTES
Localiced Attributes 
 | 
| Constructor and Description | 
|---|
Parser(SwingEngine engine)
Constructs a new SwixMl Parser for the provided engine. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
protected List<Attribute> | 
getAttributes(Element elem)
Retrieve all atributes into list. 
 | 
protected static Element | 
getChildByName(Element parent,
              String childName)  | 
Object | 
parse(Document jdoc)
Converts XML into a javax.swing object tree. 
 | 
void | 
parse(Document jdoc,
     Container container)
Converts XML into a javax.swing object tree. 
 | 
public static final String ATTR_CONSTRAINTS
public static final String ATTR_PLAF
public static final String ATTR_BUNDLE
public static final String ATTR_LOCALE
public static final String ATTR_ID
public static final String ATTR_REFID
public static final String ATTR_USE
ATTR_REFID, 
Constant Field Valuespublic static final String ATTR_INCLUDE
public static final String ATTR_INITCLASS
public static final String ATTR_ACTION
public static final String ATTR_MACOS_PREFIX
public static final String ATTR_MACOS_PREF
public static final String ATTR_MACOS_ABOUT
public static final String ATTR_MACOS_QUIT
public static final String ATTR_MACOS_OPENAPP
public static final String ATTR_MACOS_OPENFILE
public static final String ATTR_MACOS_PRINT
public static final String ATTR_MACOS_REOPEN
public static final String GETINSTANCE
public Parser(SwingEngine engine)
engine - SwingEnginepublic void parse(Document jdoc, Container container) throws Exception
Note: This parse method does not return a swing object but converts all sub nodes of the xml documents root into seing objects and adds those into the provided container. This is useful when a JApplet for instance already exists and need to get some gui inserted.
jdoc - Document providing the XML documentcontainer - Container container for the XML root's childrenException - if parsing failspublic Object parse(Document jdoc) throws Exception
    Reads XML from the provied Reader and builds an intermediate jdom document.
    Tags and their attributes are getting converted into swing objects.
 jdoc - Document providing the XML documentjava.awt.Container root object for the swing object treeException - if parsing failsprotected List<Attribute> getAttributes(Element elem)
elem - element for extract attributesCopyright © 2002 - 2013 - Wolf Paulus - wolfpaulus.com. All rights reserved.