|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.ui.WindowHolder
ucar.unidata.idv.IdvManager
ucar.unidata.idv.chooser.IdvChooserManager
public class IdvChooserManager
This creates and manages the set of choosers.
It makes the chooser GUI from an xml specification
e.g.: /ucar/unidata/idv/resources/choosers.xml
It uses the XmlUi to process
the xml.
This class also processes the end-user created choosers. This piece has always been a bit flaky
| Field Summary | |
|---|---|
static String |
ATTR_CHOOSERID
Xml attribute to identify different choosers |
static String |
ATTR_CLASS
Class attribute in choosers.xml |
static String |
ATTR_DATASOURCE
Data source tag |
static String |
ATTR_DOPOLLING
Xml dopolling attribute name. |
static String |
ATTR_HELPPATH
Xml attribute for the help path |
static String |
ATTR_LABEL
Xml label attribute name. |
static String |
ATTR_MENUTITLE
Xml menu title attribute name. |
static String |
ATTR_PATH
Xml path attribute name. |
static String |
ATTR_PATTERN
Xml pattern attribute name. |
static String |
ATTR_POLLINTERVAL
Xml pollinterval attribute name. |
static String |
ATTR_SHOWINMENU
Xml attribute to see if this chooser should go in the data menu |
static String |
ATTR_TITLE
Xml title attribute name. |
static String |
PROP_CHOOSER_TREEVIEW
|
static String |
PROP_CHOOSER_TREEVIEW_USESPLITPANE
|
static String |
PROP_CHOOSER_TREEVIEW_WIDTH
|
static String |
TAG_DIRECTORY
Xml tag name for directory tags. |
static String |
TAG_LABEL
Xml tag name for the label tags. |
static String |
TAG_TAB
Xml tag name for the tab tags. |
| Fields inherited from class ucar.unidata.ui.WindowHolder |
|---|
contents, dialog, frame, window |
| Constructor Summary | |
|---|---|
IdvChooserManager(IntegratedDataViewer idv)
Create a new IdvChooserManager. |
|
| Method Summary | |
|---|---|
void |
activateAddeServerGroup(AddeServer server,
AddeServer.Group group)
Make the group active |
AddeServer |
addAddeServer(String name)
Create a new AddeServer or find an existing one with the given name. |
AddeServer.Group |
addAddeServerGroup(AddeServer server,
String groupName,
String type)
Add the given AddeServer.Group into the list of servers. |
JMenu |
addUserChooserToMenu(JMenu menu,
JMenu pullRight)
Inserts menu items into the given menu for creating the data sources that are defined by the user chooser |
void |
closeDataChooser()
Close me |
Component |
createChooser(Node chooserNode)
Overwrite the component factory method in XmlUi to handler chooser
xml nodes. |
JComponent |
createChoosers(boolean inTabs)
Create the Choosers component from the choosers.xml resources |
JComponent |
createChoosers(boolean inTabs,
List theseChoosers,
Element choosersNode)
Create the Choosers component from the choosers.xml resources |
List |
getAddeServers(String groupType)
Get AddeServers to use |
List |
getAddeServers(String groupType,
boolean onlyActive)
Get AddeServers to use |
JComponent |
getChooserContents()
Deprecated. no longer in use |
static String |
getChooserId(Element node)
This tries to find some identifier for the chooser defied by the given xml node. |
List |
getChooserIds()
Return a list of the (String) chooser ids that have been processed by this manager. |
String |
getChooserName(String chooserId)
Get the name of the given chooser |
List |
getChoosers()
Get the list of current choosers. |
protected String |
getWindowTitle()
Window title |
void |
init()
Initialize the set of choosers. |
List |
makeChooserMenus(List items)
Make the chooser menu items |
void |
makeDataSourceFromXml(Element theNode)
Create the data source from the given user chooser xml |
protected void |
popupXmlChooserDialog(Element tabNode,
Element dirNode)
Show the dialog for editing the user chooser entry |
void |
processChooserXml()
Process the user chooser resources |
void |
processChooserXml(boolean writable,
Element root)
Process the user chooser xml root |
void |
removeAddeServer(AddeServer server,
boolean markAsInactive)
Remove the given adde server. |
void |
removeAddeServerGroup(AddeServer server,
AddeServer.Group group,
boolean markAsInactive)
Remove the group held by the server. |
protected boolean |
shouldMakeDialog()
Should we make a dialog |
void |
writeAddeServers()
Write out the addeservers.xml file |
protected void |
writeChooserXml()
Write out the user chooser xml document |
| Methods inherited from class ucar.unidata.ui.WindowHolder |
|---|
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, setWindowTitle, show, show, showModal, toFront, windowIsClosing |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String PROP_CHOOSER_TREEVIEW
public static final String PROP_CHOOSER_TREEVIEW_WIDTH
public static final String PROP_CHOOSER_TREEVIEW_USESPLITPANE
public static final String ATTR_CLASS
public static final String ATTR_LABEL
public static final String ATTR_HELPPATH
public static final String ATTR_CHOOSERID
public static final String TAG_DIRECTORY
public static final String TAG_TAB
public static final String TAG_LABEL
public static final String ATTR_DATASOURCE
public static final String ATTR_PATH
public static final String ATTR_PATTERN
public static final String ATTR_DOPOLLING
public static final String ATTR_POLLINTERVAL
public static final String ATTR_TITLE
public static final String ATTR_MENUTITLE
public static final String ATTR_SHOWINMENU
| Constructor Detail |
|---|
public IdvChooserManager(IntegratedDataViewer idv)
idv - The singleton IDV| Method Detail |
|---|
public void removeAddeServerGroup(AddeServer server,
AddeServer.Group group,
boolean markAsInactive)
server - The servergroup - The group to removemarkAsInactive - If true then don't really remove the group, just mark it as inactive
public void activateAddeServerGroup(AddeServer server,
AddeServer.Group group)
server - The servergroup - The group to remove
public AddeServer.Group addAddeServerGroup(AddeServer server,
String groupName,
String type)
server - Server to addgroupName - The new group nametype - Its type
public void writeAddeServers()
public AddeServer addAddeServer(String name)
name - new server name
public void removeAddeServer(AddeServer server,
boolean markAsInactive)
server - The server to removemarkAsInactive - If true then don't really remove the server, just mark it as inactivepublic List getAddeServers(String groupType)
groupType - If null return all, else return the servers that have groups of the given type
public List getAddeServers(String groupType,
boolean onlyActive)
groupType - If null return all, else return the servers that have groups of the given typeonlyActive - If true then only fetch the active servers
public List getChoosers()
public JComponent getChooserContents()
public void init()
public JComponent createChoosers(boolean inTabs)
inTabs - Do we use the buttontabbedpane or the treepanel
public JComponent createChoosers(boolean inTabs,
List theseChoosers,
Element choosersNode)
inTabs - Do we use the buttontabbedpane or the treepaneltheseChoosers - List to add the created choosers intochoosersNode - The xml node of the chooser skin
public Component createChooser(Node chooserNode)
XmlUi to handler chooser
xml nodes.
chooserNode - The chooser node
public List makeChooserMenus(List items)
items - List to put the menu items in
public static String getChooserId(Element node)
node - The chooser node
public List getChooserIds()
public String getChooserName(String chooserId)
chooserId - The id of the chooser
public JMenu addUserChooserToMenu(JMenu menu,
JMenu pullRight)
menu - The menupullRight - Will end up being the sub menu
public void makeDataSourceFromXml(Element theNode)
theNode - User chooser xml node that defines a data sourcepublic void closeDataChooser()
protected boolean shouldMakeDialog()
shouldMakeDialog in class WindowHolderprotected String getWindowTitle()
getWindowTitle in class WindowHolder
protected void popupXmlChooserDialog(Element tabNode,
Element dirNode)
tabNode - What tab the entry is indirNode - What entrypublic void processChooserXml()
public void processChooserXml(boolean writable,
Element root)
writable - Is this the writable resourceroot - The xml document rootprotected void writeChooserXml()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||