public class UI extends java.lang.Object implements UIFactory, UIObjectFactory
See src/examples/ui/* for usage details
Constructor and Description |
---|
UI()
Create a new UI object
|
UI(org.jdom2.Element config)
Creates a new UI object
|
Modifier and Type | Method and Description |
---|---|
void |
configure()
configure this UI object
|
protected void |
configure(org.jdom2.Element ui) |
javax.swing.JComponent |
create(org.jdom2.Element e) |
javax.swing.JComponent |
create(UI ui,
org.jdom2.Element e)
UI is itself a UIFactory.
|
void |
dispose()
dispose this UI object
|
protected javax.swing.JComponent |
doScript(javax.swing.JComponent component,
org.jdom2.Element e) |
java.lang.Object |
get(java.lang.String id) |
Log |
getLog() |
javax.swing.JFrame |
getMainFrame() |
java.util.Map |
getRegistrar()
UI uses a map to hold references to its components
("id" attribute)
|
boolean |
isDestroyed() |
java.lang.Object |
newInstance(java.lang.String clazz)
UIObjectFactory implementation.
|
void |
reconfigure(java.lang.String elementName,
java.lang.String panelName)
reconfigure can be used in order to re-configure components
inside a container (i.e.
|
void |
setConfig(org.jdom2.Element config) |
void |
setLog(Log log) |
protected void |
setLookAndFeel(org.jdom2.Element ui) |
void |
setObjectFactory(UIObjectFactory objFactory)
Assigns an object factory use to create new object instances.
|
protected void |
warn(java.lang.Object obj) |
protected void |
warn(java.lang.Object obj,
java.lang.Exception ex) |
public UI()
public UI(org.jdom2.Element config)
config
- configuration elementpublic void setObjectFactory(UIObjectFactory objFactory)
objFactory
- reference to an Object Factorypublic void setConfig(org.jdom2.Element config)
config
- the Configuration elementpublic Log getLog()
public java.util.Map getRegistrar()
public java.lang.Object get(java.lang.String id)
id
- Component id ("id" configuration attribute)public javax.swing.JComponent create(UI ui, org.jdom2.Element e)
public java.lang.Object newInstance(java.lang.String clazz) throws java.lang.Exception
newInstance
in interface UIObjectFactory
clazz
- the Clazzzzjava.lang.Exception
- if unable to instantiatesetLog(org.jpos.util.Log)
public void configure() throws org.jdom2.JDOMException
org.jdom2.JDOMException
public void reconfigure(java.lang.String elementName, java.lang.String panelName)
elementName
- the element name used as new configurationpanelName
- panel ID (see "id" attribute)Redirect
public void dispose()
public boolean isDestroyed()
protected void configure(org.jdom2.Element ui) throws org.jdom2.JDOMException
org.jdom2.JDOMException
protected void setLookAndFeel(org.jdom2.Element ui)
protected javax.swing.JComponent doScript(javax.swing.JComponent component, org.jdom2.Element e)
public javax.swing.JComponent create(org.jdom2.Element e)
public javax.swing.JFrame getMainFrame()
protected void warn(java.lang.Object obj)
protected void warn(java.lang.Object obj, java.lang.Exception ex)