public class XmlUi
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.ItemListener
Modifier and Type | Class and Description |
---|---|
static interface |
XmlUi.ActionHandler
Interface to pass ActionEvents to along with this XmlUI object
|
static class |
XmlUi.CardPanel
Class CardPanel Holds a card layout state
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ACTION_MENUPOPUP
Action command for popping up a menu
|
static java.lang.String |
ACTION_SETBORDER
Action procedure
|
static java.lang.String |
ACTION_SETTEXT
Action procedure
|
static java.lang.String |
ACTION_UI_FLIP
Action command for flpping through a card layout
|
static java.lang.String |
ACTION_UI_FOCUS
Action command for flpping through a card layout
|
static java.lang.String |
ACTION_UI_GROUP_NEXT
Action procedure
|
static java.lang.String |
ACTION_UI_GROUP_PREV
Action procedure
|
static java.lang.String[] |
ALIGN_NAMES
alignment names
|
static int[] |
ALIGN_VALUES
corresponding alignment values
|
static java.lang.String[] |
ANCHOR_NAMES
grid bag anchors
|
static int[] |
ANCHOR_VALUES
corresponding grid bag anchor values
|
static java.lang.String |
ATTR_ACTION
xml attribute name
|
static java.lang.String |
ATTR_ACTIONTEMPLATE
xml attribute name
|
static java.lang.String |
ATTR_ALIGN
xml attribute name
|
static java.lang.String |
ATTR_ANCHOR
xml attribute name
|
static java.lang.String |
ATTR_BGCOLOR
xml attribute name
|
static java.lang.String |
ATTR_BORDER
xml attribute name
|
static java.lang.String |
ATTR_BORDER_BOTTOM
xml attribute name
|
static java.lang.String |
ATTR_BORDER_COLOR
xml attribute name
|
static java.lang.String |
ATTR_BORDER_HINSET
xml attribute name
|
static java.lang.String |
ATTR_BORDER_INSET
xml attribute name
|
static java.lang.String |
ATTR_BORDER_LEFT
xml attribute name
|
static java.lang.String |
ATTR_BORDER_RIGHT
xml attribute name
|
static java.lang.String |
ATTR_BORDER_THICKNESS
xml attribute name
|
static java.lang.String |
ATTR_BORDER_TITLE
xml attribute name
|
static java.lang.String |
ATTR_BORDER_TOP
xml attribute name
|
static java.lang.String |
ATTR_BORDER_VINSET
xml attribute name
|
static java.lang.String |
ATTR_BSPACE
Bottom space for insets
|
static java.lang.String |
ATTR_CATEGORY
Category attribute for treepanel
|
static java.lang.String |
ATTR_CATEGORYCOMPONENT
Used to define that the component is the category component for a tree panel
|
static java.lang.String |
ATTR_CLASS
xml attribute name
|
static java.lang.String |
ATTR_COLS
xml attribute name
|
static java.lang.String |
ATTR_COLWIDTHS
xml attribute name
|
static java.lang.String |
ATTR_CONTINUOUS
xml attribute name
|
static java.lang.String |
ATTR_DEFAULT
xml attribute name
|
static java.lang.String |
ATTR_DIVIDER
xml attribute name
|
static java.lang.String |
ATTR_DOWNIMAGE
xml attribute name
|
static java.lang.String |
ATTR_EDITABLE
Used for the combobox tag to define if the combobox is editable
|
static java.lang.String |
ATTR_EVENT
xml attribute name
|
static java.lang.String |
ATTR_FGCOLOR
xml attribute name
|
static java.lang.String |
ATTR_FILL
xml attribute name
|
static java.lang.String |
ATTR_FLOAT
xml attribute name
|
static java.lang.String |
ATTR_FONTFACE
xml attribute name
|
static java.lang.String |
ATTR_FONTSIZE
xml attribute name
|
static java.lang.String |
ATTR_FONTSTYLE
xml attribute name
|
static java.lang.String |
ATTR_GROUP
xml attribute name
|
static java.lang.String |
ATTR_HEIGHT
xml attribute name
|
static java.lang.String |
ATTR_HPOSITION
xml attribute name
|
static java.lang.String |
ATTR_HSCROLL
xml attribute name
|
static java.lang.String |
ATTR_HSPACE
xml attribute name
|
static java.lang.String |
ATTR_ICON
xml attribute name
|
static java.lang.String |
ATTR_ID
xml attribute name
|
static java.lang.String |
ATTR_IDREF
xml attribute name
|
static java.lang.String |
ATTR_IMAGE
xml attribute name
|
static java.lang.String |
ATTR_IMAGEHEIGHT
xml attribute name
|
static java.lang.String |
ATTR_IMAGEWIDTH
xml attribute name
|
static java.lang.String |
ATTR_KEYPRESS
xml attribute name
|
static java.lang.String |
ATTR_LABEL
xml attribute name
|
static java.lang.String |
ATTR_LAYOUT
xml attribute name
|
static java.lang.String |
ATTR_LSPACE
Left space for insets
|
static java.lang.String |
ATTR_MARGIN
xml attribute name
|
static java.lang.String |
ATTR_MNEMONIC
xml attribute name
|
static java.lang.String |
ATTR_MOUSE_CLICK
xml attribute name
|
static java.lang.String |
ATTR_MOUSE_ENTER
xml attribute name
|
static java.lang.String |
ATTR_MOUSE_EXIT
xml attribute name
|
static java.lang.String |
ATTR_NAME
xml attribute name
|
static java.lang.String |
ATTR_ONETOUCHEXPANDABLE
xml attribute name
|
static java.lang.String |
ATTR_ORIENTATION
xml attribute name
|
static java.lang.String |
ATTR_OVERIMAGE
xml attribute name
|
static java.lang.String |
ATTR_PLACE
xml attribute name
|
static java.lang.String |
ATTR_PREF_HEIGHT
xml attribute name
|
static java.lang.String |
ATTR_PREF_WIDTH
xml attribute name
|
static java.lang.String |
ATTR_RESIZEWEIGHT
xml attribute name
|
static java.lang.String |
ATTR_ROWHEIGHTS
xml attribute name
|
static java.lang.String |
ATTR_ROWS
xml attribute name
|
static java.lang.String |
ATTR_RSPACE
Right space for insets
|
static java.lang.String |
ATTR_SELECTIMAGE
xml attribute name
|
static java.lang.String |
ATTR_SPACE
xml attribute name
|
static java.lang.String |
ATTR_TABBORDERBOTTOM
xml attribute name
|
static java.lang.String |
ATTR_TABBORDERLEFT
xml attribute name
|
static java.lang.String |
ATTR_TABBORDERRIGHT
xml attribute name
|
static java.lang.String |
ATTR_TABBORDERTOP
xml attribute name
|
static java.lang.String |
ATTR_TABINSETS
xml attribute name
|
static java.lang.String |
ATTR_TABNESTED
xml attribute name
|
static java.lang.String |
ATTR_TABPAD
xml attribute name
|
static java.lang.String |
ATTR_TABPLACE
xml attribute name
|
static java.lang.String |
ATTR_TABTOOLTIP
xml attribute name
|
static java.lang.String |
ATTR_TAGCLASS
xml attribute name
|
static java.lang.String |
ATTR_TEMPLATE
xml attribute name
|
static java.lang.String |
ATTR_TEXT
xml attribute name
|
static java.lang.String |
ATTR_TITLE
xml attribute name
|
static java.lang.String |
ATTR_TOOLTIP
xml attribute name
|
static java.lang.String |
ATTR_TREEWIDTH
xml attribute name
|
static java.lang.String |
ATTR_TSPACE
Top space for insets
|
static java.lang.String |
ATTR_URL
xml attribute name
|
static java.lang.String |
ATTR_USESPLITPANE
xml attribute name
|
static java.lang.String |
ATTR_VALUE
xml attribute name
|
static java.lang.String |
ATTR_VPOSITION
xml attribute name
|
static java.lang.String |
ATTR_VSCROLL
xml attribute name
|
static java.lang.String |
ATTR_VSPACE
xml attribute name
|
static java.lang.String |
ATTR_WIDTH
xml attribute name
|
static java.lang.String |
ATTR_X
xml attribute name
|
static java.lang.String |
ATTR_Y
xml attribute name
|
static java.lang.String |
BORDER_BEVEL
border type
|
static java.lang.String |
BORDER_BEVEL_LOWERED
border type
|
static java.lang.String |
BORDER_BEVEL_RAISED
border type
|
static java.lang.String |
BORDER_BUTTON
border type
|
static java.lang.String |
BORDER_EMPTY
border type
|
static java.lang.String |
BORDER_ETCHED
border type
|
static java.lang.String |
BORDER_ETCHED_LOWERED
border type
|
static java.lang.String |
BORDER_ETCHED_RAISED
border type
|
static java.lang.String |
BORDER_LINE
border type
|
static java.lang.String |
BORDER_MATTE
border type
|
static java.lang.String |
BORDER_TITLED
border type
|
static java.lang.String[] |
FILL_NAMES
fill names
|
static int[] |
FILL_VALUES
corresponding fill valus
|
static java.lang.String[] |
FLOWLAYOUT_NAMES
flow layout names
|
static int[] |
FLOWLAYOUT_VALUES
corresponding flow layout values
|
static java.lang.String[] |
HPOS_NAMES
alignment names
|
static int[] |
HPOS_VALUES
corresponding alignment values
|
static int[] |
HSCROLL_VALUES
corresponding scroll type values
|
static java.lang.String |
LAYOUT_BORDER
layout type
|
static java.lang.String |
LAYOUT_CARD
layout type
|
static java.lang.String |
LAYOUT_FLOW
layout type
|
static java.lang.String |
LAYOUT_GRAPHPAPER
layout type
|
static java.lang.String |
LAYOUT_GRID
layout type
|
static java.lang.String |
LAYOUT_GRIDBAG
layout type
|
static java.lang.String |
LAYOUT_INSET
layout type
|
static java.lang.String |
LAYOUT_WRAP
layout type
|
static int |
NOVALUE
Special value
|
static java.lang.String |
NULLSTRING
More clear then going (String) null.
|
protected java.util.Hashtable |
properties
Holds the properties
|
static java.lang.String[] |
SCROLL_NAMES
scroll type names
|
static java.lang.String[] |
SPLITPANE_NAMES
split pane orientation
|
static int[] |
SPLITPANE_VALUES
corresponding split pane values
|
static java.lang.String[] |
TABPLACE_NAMES
tab place names
|
static int[] |
TABPLACE_VALUES
corresponding tab place values
|
static java.lang.String |
TAG_BUTTON
xml tag
|
static java.lang.String |
TAG_BUTTONTABBEDPANE
xml tag
|
static java.lang.String |
TAG_CARDPANEL
xml tag
|
static java.lang.String |
TAG_CHECKBOX
xml tag
|
static java.lang.String |
TAG_COMBOBOX
Xml tag for creating a combobox
|
static java.lang.String |
TAG_COMPONENT
xml tag
|
static java.lang.String |
TAG_COMPONENTS
xml tag
|
static java.lang.String |
TAG_FILLER
xml tag
|
static java.lang.String |
TAG_HTML
For showing html text.
|
static java.lang.String |
TAG_IMAGE
xml tag
|
static java.lang.String |
TAG_IMPORT
xml tag
|
static java.lang.String |
TAG_ITEM
xml tag
|
static java.lang.String |
TAG_LABEL
xml tag
|
static java.lang.String |
TAG_MENU
xml tag
|
static java.lang.String |
TAG_MENUBAR
xml tag
|
static java.lang.String |
TAG_MENUITEM
xml tag
|
static java.lang.String |
TAG_MENUPOPUP
xml tag
|
static java.lang.String |
TAG_PANEL
xml tag
|
static java.lang.String |
TAG_PROPERTIES
xml tag
|
static java.lang.String |
TAG_PROPERTY
xml tag
|
static java.lang.String |
TAG_RADIO
xml tag
|
static java.lang.String |
TAG_SCROLLER
xml tag
|
static java.lang.String |
TAG_SEPARATOR
xml tag
|
static java.lang.String |
TAG_SKIN
Tag and attribute names for the skin xml
|
static java.lang.String |
TAG_SPLITPANE
xml tag
|
static java.lang.String |
TAG_STYLE
Holds a style definition
|
static java.lang.String |
TAG_STYLES
The xml section that holds the styles
|
static java.lang.String |
TAG_TABBEDPANE
xml tag
|
static java.lang.String |
TAG_TEXTINPUT
xml tag
|
static java.lang.String |
TAG_TOGGLEBUTTON
xml tag
|
static java.lang.String |
TAG_TOOLBAR
xml tag
|
static java.lang.String |
TAG_TREEPANEL
xml tag
|
static java.lang.String |
TAG_UI
xml tag
|
static java.lang.String[] |
TOOLBAR_NAMES
tool bar orientation names
|
static int[] |
TOOLBAR_VALUES
corresponding toolbar orientation values
|
static java.lang.String[] |
VPOS_NAMES
alignment names
|
static int[] |
VPOS_VALUES
corresponding alignment values
|
static int[] |
VSCROLL_VALUES
corresponding scroll type values
|
Constructor and Description |
---|
XmlUi()
default ctor
|
XmlUi(org.w3c.dom.Element root,
java.awt.event.ActionListener actionListener)
ctor
|
XmlUi(org.w3c.dom.Element root,
org.w3c.dom.Element startNode,
java.util.Hashtable idToComponent,
java.awt.event.ActionListener actionListener,
java.util.Hashtable initProperties) |
XmlUi(org.w3c.dom.Element root,
java.util.Hashtable idToComponent,
java.awt.event.ActionListener actionListener,
java.util.Hashtable initProperties)
Create the XmlUi processor.
|
XmlUi(java.lang.String xml,
java.util.Hashtable idToComponent,
java.awt.event.ActionListener actionListener)
ctor
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent event)
handle event.
|
void |
addComponent(java.lang.String id,
java.awt.Component comp)
Add the given component to the idToComponent map.
|
void |
addComponent(java.lang.String id,
org.w3c.dom.Element component)
Add the component
|
java.awt.Component |
createComponent(org.w3c.dom.Element node,
java.lang.String id)
Create the awt Component defined by the given skin node.
|
void |
dispose()
The destructor
|
static java.lang.String |
extractOneArg(java.lang.String cmd)
utility to parse commands
|
static java.lang.String[] |
extractTwoArgs(java.lang.String cmd)
utility to parse commands
|
int |
getAlign(java.lang.String align)
Get the align value from the given string name
|
java.lang.String |
getAttr(org.w3c.dom.Element node,
java.lang.String attr)
Get the value of the given attribute on the node.
|
boolean |
getAttr(org.w3c.dom.Element node,
java.lang.String attr,
boolean dflt)
Get the attribute value
|
java.awt.Color |
getAttr(org.w3c.dom.Element node,
java.lang.String attr,
java.awt.Color dflt)
Get the attribute value
|
double |
getAttr(org.w3c.dom.Element node,
java.lang.String attr,
double dflt)
Get the attribute value
|
javax.swing.ImageIcon |
getAttr(org.w3c.dom.Element node,
java.lang.String attr,
javax.swing.ImageIcon dflt)
Get the attribute value
|
int |
getAttr(org.w3c.dom.Element node,
java.lang.String attr,
int dflt)
Get the attribute value
|
java.lang.String |
getAttr(org.w3c.dom.Element node,
java.lang.String attr,
java.lang.String dflt)
Get the attribute value
|
javax.swing.border.Border |
getBorder(java.lang.String type,
org.w3c.dom.Element node)
Create the border
|
java.awt.Component |
getComponent(java.lang.String id)
Return the Component identified by id
|
java.util.List |
getComponents()
Get the list of components created
|
java.awt.Component |
getContents()
Create, if needed, and return the gui
|
static java.awt.Image |
getImage(java.lang.String path)
Create an image
|
java.awt.Image |
getImageAttr(org.w3c.dom.Element node,
java.lang.String attr)
Get image defined by attr name
|
java.lang.String |
getProperty(java.lang.String name)
Look up the property
|
boolean |
hasComponent(java.lang.String id)
Does this object hold this component
|
static java.lang.String |
inheritName(java.lang.String attr) |
static java.lang.String |
inheritNameOldWay(java.lang.String attr)
Get the inherited attribute name
|
protected void |
initializeComponents(org.w3c.dom.Element root)
initialize
|
void |
itemStateChanged(java.awt.event.ItemEvent event)
handle event
|
static void |
main(java.lang.String[] args)
test
|
javax.swing.JComponent |
makeButton(java.lang.String tag,
org.w3c.dom.Element node)
Make a button
|
void |
setRoot(org.w3c.dom.Element root)
Set the xml root and reinitialize
|
void |
setStartNode(org.w3c.dom.Element node) |
protected java.awt.Component |
xmlToUi(org.w3c.dom.Element node)
Convert the given xml node tree to a gui component
|
public static final java.lang.String NULLSTRING
public static final java.lang.String ACTION_UI_FLIP
public static final java.lang.String ACTION_UI_FOCUS
public static final java.lang.String ACTION_MENUPOPUP
public static final java.lang.String ACTION_SETTEXT
public static final java.lang.String ACTION_SETBORDER
public static final java.lang.String ACTION_UI_GROUP_NEXT
public static final java.lang.String ACTION_UI_GROUP_PREV
public static final java.lang.String TAG_SKIN
public static final java.lang.String TAG_STYLES
public static final java.lang.String TAG_STYLE
public static final java.lang.String TAG_UI
public static final java.lang.String TAG_CARDPANEL
public static final java.lang.String TAG_COMBOBOX
public static final java.lang.String TAG_COMPONENTS
public static final java.lang.String TAG_COMPONENT
public static final java.lang.String TAG_BUTTON
public static final java.lang.String TAG_RADIO
public static final java.lang.String TAG_CHECKBOX
public static final java.lang.String TAG_FILLER
public static final java.lang.String TAG_HTML
public static final java.lang.String TAG_IMAGE
public static final java.lang.String TAG_IMPORT
public static final java.lang.String TAG_ITEM
public static final java.lang.String TAG_LABEL
public static final java.lang.String TAG_MENU
public static final java.lang.String TAG_MENUPOPUP
public static final java.lang.String TAG_MENUBAR
public static final java.lang.String TAG_MENUITEM
public static final java.lang.String TAG_PANEL
public static final java.lang.String TAG_PROPERTIES
public static final java.lang.String TAG_PROPERTY
public static final java.lang.String TAG_SCROLLER
public static final java.lang.String TAG_SEPARATOR
public static final java.lang.String TAG_SPLITPANE
public static final java.lang.String TAG_TABBEDPANE
public static final java.lang.String TAG_BUTTONTABBEDPANE
public static final java.lang.String TAG_TREEPANEL
public static final java.lang.String TAG_TEXTINPUT
public static final java.lang.String TAG_TOGGLEBUTTON
public static final java.lang.String TAG_TOOLBAR
public static final java.lang.String ATTR_ACTION
public static final java.lang.String ATTR_CATEGORY
public static final java.lang.String ATTR_CATEGORYCOMPONENT
public static final java.lang.String ATTR_ACTIONTEMPLATE
public static final java.lang.String ATTR_ALIGN
public static final java.lang.String ATTR_HPOSITION
public static final java.lang.String ATTR_VPOSITION
public static final java.lang.String ATTR_ANCHOR
public static final java.lang.String ATTR_BGCOLOR
public static final java.lang.String ATTR_BORDER
public static final java.lang.String ATTR_BORDER_TITLE
public static final java.lang.String ATTR_BORDER_COLOR
public static final java.lang.String ATTR_BORDER_THICKNESS
public static final java.lang.String ATTR_BORDER_INSET
public static final java.lang.String ATTR_BORDER_HINSET
public static final java.lang.String ATTR_BORDER_VINSET
public static final java.lang.String ATTR_BORDER_TOP
public static final java.lang.String ATTR_BORDER_LEFT
public static final java.lang.String ATTR_BORDER_BOTTOM
public static final java.lang.String ATTR_BORDER_RIGHT
public static final java.lang.String ATTR_CLASS
public static final java.lang.String ATTR_TAGCLASS
public static final java.lang.String ATTR_COLS
public static final java.lang.String ATTR_COLWIDTHS
public static final java.lang.String ATTR_CONTINUOUS
public static final java.lang.String ATTR_ONETOUCHEXPANDABLE
public static final java.lang.String ATTR_DEFAULT
public static final java.lang.String ATTR_DIVIDER
public static final java.lang.String ATTR_DOWNIMAGE
public static final java.lang.String ATTR_EDITABLE
public static final java.lang.String ATTR_EVENT
public static final java.lang.String ATTR_FLOAT
public static final java.lang.String ATTR_FGCOLOR
public static final java.lang.String ATTR_FILL
public static final java.lang.String ATTR_FONTSIZE
public static final java.lang.String ATTR_FONTFACE
public static final java.lang.String ATTR_FONTSTYLE
public static final java.lang.String ATTR_GROUP
public static final java.lang.String ATTR_HEIGHT
public static final java.lang.String ATTR_HSCROLL
public static final java.lang.String ATTR_IMAGEWIDTH
public static final java.lang.String ATTR_IMAGEHEIGHT
public static final java.lang.String ATTR_KEYPRESS
public static final java.lang.String ATTR_MOUSE_ENTER
public static final java.lang.String ATTR_MOUSE_EXIT
public static final java.lang.String ATTR_MOUSE_CLICK
public static final java.lang.String ATTR_NAME
public static final java.lang.String ATTR_PREF_HEIGHT
public static final java.lang.String ATTR_TSPACE
public static final java.lang.String ATTR_BSPACE
public static final java.lang.String ATTR_LSPACE
public static final java.lang.String ATTR_RSPACE
public static final java.lang.String ATTR_HSPACE
public static final java.lang.String ATTR_ID
public static final java.lang.String ATTR_IDREF
public static final java.lang.String ATTR_IMAGE
public static final java.lang.String ATTR_LABEL
public static final java.lang.String ATTR_LAYOUT
public static final java.lang.String ATTR_MARGIN
public static final java.lang.String ATTR_MNEMONIC
public static final java.lang.String ATTR_ORIENTATION
public static final java.lang.String ATTR_OVERIMAGE
public static final java.lang.String ATTR_PLACE
public static final java.lang.String ATTR_PREF_WIDTH
public static final java.lang.String ATTR_RESIZEWEIGHT
public static final java.lang.String ATTR_ROWHEIGHTS
public static final java.lang.String ATTR_ROWS
public static final java.lang.String ATTR_SELECTIMAGE
public static final java.lang.String ATTR_SPACE
public static final java.lang.String ATTR_TABNESTED
public static final java.lang.String ATTR_TABPLACE
public static final java.lang.String ATTR_TABPAD
public static final java.lang.String ATTR_TABINSETS
public static final java.lang.String ATTR_TABBORDERLEFT
public static final java.lang.String ATTR_TABBORDERBOTTOM
public static final java.lang.String ATTR_TABBORDERRIGHT
public static final java.lang.String ATTR_TABBORDERTOP
public static final java.lang.String ATTR_ICON
public static final java.lang.String ATTR_TEMPLATE
public static final java.lang.String ATTR_TEXT
public static final java.lang.String ATTR_TITLE
public static final java.lang.String ATTR_TOOLTIP
public static final java.lang.String ATTR_TABTOOLTIP
public static final java.lang.String ATTR_URL
public static final java.lang.String ATTR_VALUE
public static final java.lang.String ATTR_VSCROLL
public static final java.lang.String ATTR_VSPACE
public static final java.lang.String ATTR_WIDTH
public static final java.lang.String ATTR_TREEWIDTH
public static final java.lang.String ATTR_USESPLITPANE
public static final java.lang.String ATTR_X
public static final java.lang.String ATTR_Y
public static final java.lang.String BORDER_BUTTON
public static final java.lang.String BORDER_TITLED
public static final java.lang.String BORDER_BEVEL
public static final java.lang.String BORDER_BEVEL_LOWERED
public static final java.lang.String BORDER_BEVEL_RAISED
public static final java.lang.String BORDER_EMPTY
public static final java.lang.String BORDER_LINE
public static final java.lang.String BORDER_ETCHED
public static final java.lang.String BORDER_ETCHED_RAISED
public static final java.lang.String BORDER_ETCHED_LOWERED
public static final java.lang.String BORDER_MATTE
public static final java.lang.String LAYOUT_BORDER
public static final java.lang.String LAYOUT_CARD
public static final java.lang.String LAYOUT_FLOW
public static final java.lang.String LAYOUT_GRAPHPAPER
public static final java.lang.String LAYOUT_GRID
public static final java.lang.String LAYOUT_GRIDBAG
public static final java.lang.String LAYOUT_INSET
public static final java.lang.String LAYOUT_WRAP
public static final java.lang.String[] FLOWLAYOUT_NAMES
public static final int[] FLOWLAYOUT_VALUES
public static final java.lang.String[] FILL_NAMES
public static final int[] FILL_VALUES
public static final java.lang.String[] TABPLACE_NAMES
public static final int[] TABPLACE_VALUES
public static final java.lang.String[] TOOLBAR_NAMES
public static final int[] TOOLBAR_VALUES
public static final java.lang.String[] SPLITPANE_NAMES
public static final int[] SPLITPANE_VALUES
public static final java.lang.String[] ANCHOR_NAMES
public static final int[] ANCHOR_VALUES
public static final java.lang.String[] HPOS_NAMES
public static final int[] HPOS_VALUES
public static final java.lang.String[] VPOS_NAMES
public static final int[] VPOS_VALUES
public static final java.lang.String[] ALIGN_NAMES
public static final int[] ALIGN_VALUES
public static final java.lang.String[] SCROLL_NAMES
public static final int[] VSCROLL_VALUES
public static final int[] HSCROLL_VALUES
protected java.util.Hashtable properties
public static final int NOVALUE
public XmlUi()
public XmlUi(java.lang.String xml, java.util.Hashtable idToComponent, java.awt.event.ActionListener actionListener)
xml
- The raw xmlidToComponent
- pre-defined id to component mapping. Allows you to
have your own components that are referenced by the xmlactionListener
- Listener to pass events topublic XmlUi(org.w3c.dom.Element root, java.awt.event.ActionListener actionListener)
root
- xmlactionListener
- Listener to pass events topublic XmlUi(org.w3c.dom.Element root, java.util.Hashtable idToComponent, java.awt.event.ActionListener actionListener, java.util.Hashtable initProperties)
root
- xml rootidToComponent
- pre-defined id to component mapping. Allows you to
have your own components that are referenced by the xmlactionListener
- Listener to pass events toinitProperties
- initial propertiespublic XmlUi(org.w3c.dom.Element root, org.w3c.dom.Element startNode, java.util.Hashtable idToComponent, java.awt.event.ActionListener actionListener, java.util.Hashtable initProperties)
public void setStartNode(org.w3c.dom.Element node)
public void dispose()
protected void initializeComponents(org.w3c.dom.Element root)
root
- xml rootpublic boolean hasComponent(java.lang.String id)
id
- component idpublic void addComponent(java.lang.String id, org.w3c.dom.Element component)
id
- idcomponent
- componentpublic void addComponent(java.lang.String id, java.awt.Component comp)
id
- comp
- public java.awt.Component getComponent(java.lang.String id)
id
- component idpublic java.util.List getComponents()
public int getAlign(java.lang.String align)
align
- namepublic java.lang.String getAttr(org.w3c.dom.Element node, java.lang.String attr)
node
- nodeattr
- attribute namepublic static java.lang.String inheritNameOldWay(java.lang.String attr)
attr
- attr namepublic static java.lang.String inheritName(java.lang.String attr)
public int getAttr(org.w3c.dom.Element node, java.lang.String attr, int dflt)
node
- nodeattr
- attrdflt
- defaultpublic double getAttr(org.w3c.dom.Element node, java.lang.String attr, double dflt)
node
- nodeattr
- attrdflt
- defaultpublic boolean getAttr(org.w3c.dom.Element node, java.lang.String attr, boolean dflt)
node
- nodeattr
- attrdflt
- defaultpublic java.lang.String getAttr(org.w3c.dom.Element node, java.lang.String attr, java.lang.String dflt)
node
- nodeattr
- attrdflt
- defaultpublic java.awt.Color getAttr(org.w3c.dom.Element node, java.lang.String attr, java.awt.Color dflt)
node
- nodeattr
- attrdflt
- defaultpublic javax.swing.ImageIcon getAttr(org.w3c.dom.Element node, java.lang.String attr, javax.swing.ImageIcon dflt)
node
- nodeattr
- attrdflt
- defaultpublic javax.swing.border.Border getBorder(java.lang.String type, org.w3c.dom.Element node)
type
- border typenode
- xml node that holds any other attributes neededpublic void setRoot(org.w3c.dom.Element root)
root
- xml rootpublic java.awt.Component getContents()
public java.lang.String getProperty(java.lang.String name)
name
- property nameprotected java.awt.Component xmlToUi(org.w3c.dom.Element node)
node
- nodepublic static java.awt.Image getImage(java.lang.String path)
path
- image pathpublic java.awt.Image getImageAttr(org.w3c.dom.Element node, java.lang.String attr)
node
- nodeattr
- attrpublic java.awt.Component createComponent(org.w3c.dom.Element node, java.lang.String id)
node
- nodeid
- idpublic javax.swing.JComponent makeButton(java.lang.String tag, org.w3c.dom.Element node)
tag
- tag namenode
- nodepublic void itemStateChanged(java.awt.event.ItemEvent event)
itemStateChanged
in interface java.awt.event.ItemListener
event
- eventpublic void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
event
- eventpublic static java.lang.String extractOneArg(java.lang.String cmd)
cmd
- commandpublic static java.lang.String[] extractTwoArgs(java.lang.String cmd)
cmd
- commandpublic static void main(java.lang.String[] args)
args
- args