|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectucar.unidata.ui.XmlUi
ucar.unidata.idv.ui.IdvXmlUi
edu.wisc.ssec.mcidasv.ui.McIDASVXmlUi
public class McIDASVXmlUi
McIDAS-V mostly extends this class to preempt the IDV. McIDAS-V needs to
control some HTML processing, ensure that McvComponentGroup
s
and McvComponentHolder
s are created, and handle some special
problems that occur when attempting to load bundles that do not contain
component groups.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class ucar.unidata.ui.XmlUi |
---|
XmlUi.ActionHandler, XmlUi.CardPanel |
Field Summary | |
---|---|
private Map<String,Element> |
idToElement
Maps an ID to an Element . |
private IntegratedDataViewer |
idv
Avoids unneeded getIdv() calls. |
private IdvWindow |
window
Keep around a reference to the window we were built for, useful for associated component groups with the appropriate window. |
Constructor Summary | |
---|---|
McIDASVXmlUi(IdvWindow window,
List viewManagers,
IntegratedDataViewer idv,
Element root)
|
|
McIDASVXmlUi(IntegratedDataViewer idv,
Element root)
|
Method Summary | |
---|---|
void |
addComponent(String id,
Element component)
Add the component |
Component |
createComponent(Element node,
String id)
McIDAS-V overrides this so that it can seize control of some HTML processing in addition to attempting to associate newly-created ViewManager s with ViewManagers found in a
bundle. |
private TreePanel |
createTreePanel(Element node,
String id)
|
private ViewManager |
createViewManager(Element node)
Attempts to build a ViewManager based upon
node. |
private static String |
decodeHtml(String text)
Convert the > and < entities to > and <. |
private Element |
getReffedNode(Element node)
The xml nodes can contain an idref field. |
protected IdvComponentGroup |
makeComponentGroup(Element node)
Overridden so that any attempts to generate IdvComponentGroup s or IdvComponentHolder s will return
the respective McIDAS-V equivalents. |
Methods inherited from class ucar.unidata.idv.ui.IdvXmlUi |
---|
dispose, getBorder, getViewManager, getViewManagers, processToolbarXml |
Methods inherited from class ucar.unidata.ui.XmlUi |
---|
actionPerformed, addComponent, extractOneArg, extractTwoArgs, getAlign, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getAttr, getComponent, getComponents, getContents, getImage, getImageAttr, getProperty, hasComponent, inheritName, inheritNameOldWay, initializeComponents, itemStateChanged, main, makeButton, setRoot, setStartNode, xmlToUi |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Map<String,Element> idToElement
Element
.
private IntegratedDataViewer idv
private IdvWindow window
Constructor Detail |
---|
public McIDASVXmlUi(IntegratedDataViewer idv, Element root)
public McIDASVXmlUi(IdvWindow window, List viewManagers, IntegratedDataViewer idv, Element root)
Method Detail |
---|
private static String decodeHtml(String text)
text
- The text you'd like to convert.
public void addComponent(String id, Element component)
addComponent
in class XmlUi
id
- idcomponent
- componentprotected IdvComponentGroup makeComponentGroup(Element node)
Overridden so that any attempts to generate
IdvComponentGroup
s or IdvComponentHolder
s will return
the respective McIDAS-V equivalents.
It makes things like the draggable tabs possible.
makeComponentGroup
in class IdvXmlUi
node
- The XML representation of the desired component group.
node
.IdvXmlUi.makeComponentGroup(Element)
public Component createComponent(Element node, String id)
McIDAS-V overrides this so that it can seize control of some HTML
processing in addition to attempting to associate newly-created
ViewManager
s with ViewManagers found in a
bundle.
The latter is done so that McIDAS-V can load bundles that do not use
component groups. A "dynamic skin" is built with ViewManagers
for each ViewManager in the bundle. The "viewid" attribute of
the dynamic skin ViewManager is the name of the
ViewDescriptor
from the bundled ViewManager.
createViewManager() is used to actually associate the new
ViewManager with its bundled ViewManager.
createComponent
in class IdvXmlUi
node
- The XML describing the component to be created.id
- node's ID.
Component
described by node.IdvXmlUi.createComponent(Element, String)
,
createViewManager(Element)
private ViewManager createViewManager(Element node)
Attempts to build a ViewManager
based upon
node. If the XML has a "viewid" attribute, the
value will be used to search for a ViewManager that has been cached by
the McIDAS-V UIManager
. If the UIManager has a matching
ViewManager, we'll use the cached ViewManager to initialize a
"blank" ViewManager. The cached ViewManager is then removed
from the cache and deleted. This method will return null
if
no cached ViewManager was found.
The ViewManager "cache" will only contain bundled ViewManagers that were not held in a component holder. This means that any ViewManager returned was created for a dynamic skin, but initialized with the contents of the corresponding bundled ViewManager.
node
- The XML description of the ViewManager that needs building.
private TreePanel createTreePanel(Element node, String id)
private Element getReffedNode(Element node)
node
- node
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |