public class IdvChooserManager extends IdvManager
XmlUi
to process
the xml.
This class also processes the end-user created choosers. This piece has always been a bit flaky
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ATTR_CHOOSERID
Xml attribute to identify different choosers
|
static java.lang.String |
ATTR_CLASS
Class attribute in choosers.xml
|
static java.lang.String |
ATTR_DATASOURCE
Data source tag
|
static java.lang.String |
ATTR_DOPOLLING
Xml dopolling attribute name.
|
static java.lang.String |
ATTR_HELPPATH
Xml attribute for the help path
|
static java.lang.String |
ATTR_LABEL
Xml label attribute name.
|
static java.lang.String |
ATTR_MENUTITLE
Xml menu title attribute name.
|
static java.lang.String |
ATTR_PATH
Xml path attribute name.
|
static java.lang.String |
ATTR_PATTERN
Xml pattern attribute name.
|
static java.lang.String |
ATTR_POLLINTERVAL
Xml pollinterval attribute name.
|
static java.lang.String |
ATTR_SHOWINMENU
Xml attribute to see if this chooser should go in the data menu
|
static java.lang.String |
ATTR_TITLE
Xml title attribute name.
|
static java.lang.String |
PROP_CHOOSER_TREEVIEW
_more_
|
static java.lang.String |
PROP_CHOOSER_TREEVIEW_USESPLITPANE
_more_
|
static java.lang.String |
PROP_CHOOSER_TREEVIEW_WIDTH
_more_
|
static java.lang.String |
TAG_DIRECTORY
Xml tag name for directory tags.
|
static java.lang.String |
TAG_LABEL
Xml tag name for the label tags.
|
static java.lang.String |
TAG_TAB
Xml tag name for the tab tags.
|
contents, dialog, frame, window
ARG_B64BUNDLE, ARG_B64ISL, ARG_BUNDLE, ARG_CATALOG, ARG_CHOOSER, ARG_CLEARDEFAULT, ARG_CODE, ARG_CONNECT, ARG_CURRENTTIME, ARG_DATA, ARG_DEBUG, ARG_DEFAULT, ARG_DISPLAY, ARG_DXML, ARG_FIXEDTIME, ARG_HELP, ARG_IMAGE, ARG_IMAGESERVER, ARG_INSTALLPLUGIN, ARG_ISLFILE, ARG_ISLINTERACTIVE, ARG_LISTRESOURCES, ARG_MAINCLASS, ARG_MOVIE, ARG_MSG_DEBUG, ARG_MSG_RECORD, ARG_NODEFAULT, ARG_NOERRORSINGUI, ARG_NOGUI, ARG_NOONEINSTANCE, ARG_NOPLUGINS, ARG_NOPREF, ARG_ONEINSTANCEPORT, ARG_PLUGIN, ARG_PORT, ARG_PRINTJNLP, ARG_PROPERTIES, ARG_SCRIPT, ARG_SERVER, ARG_SETFILES, ARG_SITEPATH, ARG_TEMPLATE, ARG_TEST, ARG_TESTEVAL, ARG_TRACE, ARG_TRACEONLY, ARG_USERPATH, DEFAULT_DATE_FORMAT, DEFAULT_DOCPATH, DEFAULT_TIMEZONE, FILTER_CPT, FILTER_ISL, FILTER_JNLP, FILTER_XIDV, FILTER_XIDVZIDV, FILTER_XML, FILTER_ZIDV, ID_COMMANDSTORUN, ID_DATASOURCES, ID_DISPLAYCONTROLS, ID_IDV, ID_JYTHON, ID_MESSAGE, ID_MISCHASHTABLE, ID_NCIDV_VERSION, ID_VERSION, ID_VIEWMANAGERS, ID_WINDOWS, INITIAL_PROBE_EARTHLOCATION, NULL_DATA_SELECTION, NULL_STRING, PREF_APPEARANCEMODE, PREF_ARCHIVEDIR, PREF_ARCHIVENAME, PREF_AUTODISPLAYS_ENABLE, PREF_AUTODISPLAYS_SHOWGUI, PREF_AUTOSELECTDATA, PREF_CACHESIZE, PREF_CONTROLSINTABS, PREF_DATAPREFIX, PREF_DATE_FORMAT, PREF_DISTANCEUNIT, PREF_DOCACHE, PREF_EMBEDDATACHOOSERINDASHBOARD, PREF_EMBEDFIELDSELECTORINDASHBOARD, PREF_EMBEDLEGENDINDASHBOARD, PREF_EMBEDQUICKLINKSINDASHBOARD, PREF_EVENT_KEYBOARDMAP, PREF_EVENT_MOUSEMAP, PREF_EVENT_WHEELMAP, PREF_FAST_RENDER, PREF_FIELD_CACHETHRESHOLD, PREF_FILEREADDIR, PREF_FILEWRITEDIR, PREF_GEOMETRY_BY_REF, PREF_HISTORY, PREF_IMAGE_BY_REF, PREF_LARGE_REMOTE_DATA_WARN, PREF_LASTVERSION, PREF_LATLON_FORMAT, PREF_LEGEND_SHOWICONS, PREF_LOCALE, PREF_LOOKANDFEEL, PREF_MAXIMAGESIZE, PREF_MEMORY, PREF_NPOT_IMAGE, PREF_OPEN_ASK, PREF_OPEN_MERGE, PREF_OPEN_REMOVE, PREF_PROJ_LIST, PREF_SAMPLINGMODE, PREF_SHOWCONTROLWINDOW, PREF_SHOWDASHBOARD, PREF_SHOWDECODEDIALOG, PREF_SHOWHIDDENFILES, PREF_SHOWQUITCONFIRM, PREF_SITEPATH, PREF_THREADS_DATA, PREF_THREADS_RENDER, PREF_TIMEZONE, PREF_VERTICALCS, PREF_VERTICALUNIT, PREF_WINDOW_SHOWTOOLBAR, PREF_ZIDV_ASK, PREF_ZIDV_DIRECTORY, PREF_ZIDV_SAVETOTMP, PROP_3DMODE, PROP_ABOUTTEXT, PROP_APPRESOURCEPATH, PROP_CHOOSERS, PROP_CHOOSERS_ALL, PROP_CONTROLDESCRIPTORS, PROP_CONTROLDESCRIPTORS_ALL, PROP_DATAHOLDERBOUNDS, PROP_DEFAULTLOCATIONS, PROP_DISPLAYLIST_GROUP, PROP_FIXFILELOCKUP, PROP_JNLPCODEBASE, PROP_JNLPTEMPLATE, PROP_JNLPTITLE, PROP_LOADINGXML, PROP_MAP_GLOBE_LEVEL, PROP_MAP_MAP_LEVEL, PROP_MINIMUMFRAMECYCLETIME, PROP_MONITORPORT, PROP_OLDCONTROLDESCRIPTORS, PROP_ONEINSTANCEPORT, PROP_PREFERENCES, PROP_PROJ_NAME, PROP_RESOURCEFILES, PROP_SHOWCLOCK_DASH, PROP_SHOWCLOCK_VIEW, PROP_SHOWDASHBOARD, PROP_SHOWDATATREE, PROP_SHOWFORMULAS, PROP_SHOWSPLASH, PROP_SPLASHICON, PROP_UI_DESKTOP, PROP_USE_DISPLAYAREA, PROP_USE_TIMEDRIVER, PROP_VERSIONFILE, PROP_WINDOW_SCREENSIZEOFFSET, PROP_WINDOW_SIZEHEIGHT, PROP_WINDOW_SIZEWIDTH, PROP_WINDOW_USESCREENSIZE, SUFFIX_BAT, SUFFIX_CPT, SUFFIX_ISL, SUFFIX_JNLP, SUFFIX_RBI, SUFFIX_SH, SUFFIX_XIDV, SUFFIX_XML, SUFFIX_ZIDV
Constructor and Description |
---|
IdvChooserManager(IntegratedDataViewer idv)
Create a new IdvChooserManager.
|
Modifier and Type | Method and Description |
---|---|
void |
activateAddeServerGroup(AddeServer server,
AddeServer.Group group)
Make the group active
|
AddeServer |
addAddeServer(java.lang.String name)
Create a new AddeServer or find an existing one with the given name.
|
AddeServer.Group |
addAddeServerGroup(AddeServer server,
java.lang.String groupName,
java.lang.String type)
Add the given AddeServer.Group into the list of servers.
|
javax.swing.JMenu |
addUserChooserToMenu(javax.swing.JMenu menu,
javax.swing.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
|
java.awt.Component |
createChooser(org.w3c.dom.Node chooserNode)
Overwrite the component factory method in
XmlUi to handler chooser
xml nodes. |
javax.swing.JComponent |
createChoosers(boolean inTabs)
Create the Choosers component from the choosers.xml resources
|
javax.swing.JComponent |
createChoosers(boolean inTabs,
java.util.List theseChoosers,
org.w3c.dom.Element choosersNode)
Create the Choosers component from the choosers.xml resources
|
protected XmlUi |
createXmlUi(org.w3c.dom.Element root)
Factory method to create the IdvXmlUi to be used for the given chooser xml node
|
void |
dataSourceIdSelected(java.lang.String id)
_more_
|
java.util.List |
getAddeServers(java.lang.String groupType)
Get AddeServers to use
|
java.util.List |
getAddeServers(java.lang.String groupType,
boolean onlyActive)
Get AddeServers to use
|
javax.swing.JComponent |
getChooserContents()
Deprecated.
no longer in use
|
static java.lang.String |
getChooserId(org.w3c.dom.Element node)
This tries to find some identifier for the
chooser defied by the given xml node.
|
java.util.List |
getChooserIds()
Return a list of the (String) chooser ids that have been
processed by this manager.
|
java.lang.String |
getChooserName(java.lang.String chooserId)
Get the name of the given chooser
|
java.util.List |
getChoosers()
Get the list of current choosers.
|
javax.swing.JComboBox |
getDataSourcesComponent(boolean justFileSources,
DataManager dataManager)
Return the component that holds the dataSources combo box
|
javax.swing.JComboBox |
getDataSourcesComponent(boolean justFileSources,
DataManager dataManager,
boolean addLucky)
Get the component for listing data source types
|
protected java.lang.String |
getWindowTitle()
Window title
|
void |
init()
Initialize the set of choosers.
|
java.util.List |
makeChooserMenus(java.util.List items)
Make the chooser menu items
|
void |
makeDataSourceFromXml(org.w3c.dom.Element theNode)
Create the data source from the given user chooser xml
|
protected void |
popupXmlChooserDialog(org.w3c.dom.Element tabNode,
org.w3c.dom.Element dirNode)
Show the dialog for editing the user chooser entry
|
void |
processChooserXml()
Process the user chooser resources
|
void |
processChooserXml(boolean writable,
org.w3c.dom.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 |
showCatalogUrl(java.lang.String url)
Show the given catalog URL in the XmlChooser
|
void |
showFileChooser(java.lang.String path)
show the file chooser in the chooser GUI with the given file path
|
java.util.List |
sortDataSourceIds(java.util.List ids)
_more_
|
void |
writeAddeServers()
Write out the addeservers.xml file
|
protected void |
writeChooserXml()
Write out the user chooser xml document
|
getArgsManager, getCollabManager, getColorTableManager, getDataManager, getIdv, getIdvChooserManager, getIdvClass, getIdvProjectionManager, getIdvUIManager, getImageGenerator, getInstallManager, getJythonManager, getPersistenceManager, getPreferenceManager, getProperty, getProperty, getProperty, getPublishManager, getResourceManager, getStateManager, getStationModelManager, getStore, getVMManager, logException, showNormalCursor, showWaitCursor, waitUntilDisplaysAreDone, waitUntilDisplaysAreDone
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, setMenuBar, setWindowTitle, show, show, showModal, toFront, windowIsClosing
public static final java.lang.String PROP_CHOOSER_TREEVIEW
public static final java.lang.String PROP_CHOOSER_TREEVIEW_WIDTH
public static final java.lang.String PROP_CHOOSER_TREEVIEW_USESPLITPANE
public static final java.lang.String ATTR_CLASS
public static final java.lang.String ATTR_LABEL
public static final java.lang.String ATTR_HELPPATH
public static final java.lang.String ATTR_CHOOSERID
public static final java.lang.String TAG_DIRECTORY
public static final java.lang.String TAG_TAB
public static final java.lang.String TAG_LABEL
public static final java.lang.String ATTR_DATASOURCE
public static final java.lang.String ATTR_PATH
public static final java.lang.String ATTR_PATTERN
public static final java.lang.String ATTR_DOPOLLING
public static final java.lang.String ATTR_POLLINTERVAL
public static final java.lang.String ATTR_TITLE
public static final java.lang.String ATTR_MENUTITLE
public static final java.lang.String ATTR_SHOWINMENU
public IdvChooserManager(IntegratedDataViewer idv)
idv
- The singleton IDVpublic 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 inactivepublic void activateAddeServerGroup(AddeServer server, AddeServer.Group group)
server
- The servergroup
- The group to removepublic AddeServer.Group addAddeServerGroup(AddeServer server, java.lang.String groupName, java.lang.String type)
server
- Server to addgroupName
- The new group nametype
- Its typepublic void writeAddeServers()
public AddeServer addAddeServer(java.lang.String name)
name
- new server namepublic 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 java.util.List getAddeServers(java.lang.String groupType)
groupType
- If null return all, else return the servers that have groups of the given typepublic java.util.List getAddeServers(java.lang.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 serverspublic java.util.List getChoosers()
public javax.swing.JComponent getChooserContents()
public void init()
public javax.swing.JComponent createChoosers(boolean inTabs)
inTabs
- Do we use the buttontabbedpane or the treepanelpublic javax.swing.JComponent createChoosers(boolean inTabs, java.util.List theseChoosers, org.w3c.dom.Element choosersNode)
inTabs
- Do we use the buttontabbedpane or the treepaneltheseChoosers
- List to add the created choosers intochoosersNode
- The xml node of the chooser skinprotected XmlUi createXmlUi(org.w3c.dom.Element root)
root
- The chooser xml nodepublic java.awt.Component createChooser(org.w3c.dom.Node chooserNode)
XmlUi
to handler chooser
xml nodes.chooserNode
- The chooser nodepublic void showCatalogUrl(java.lang.String url)
url
- The URL to showpublic void showFileChooser(java.lang.String path)
public java.util.List makeChooserMenus(java.util.List items)
items
- List to put the menu items inpublic static java.lang.String getChooserId(org.w3c.dom.Element node)
node
- The chooser nodepublic java.util.List getChooserIds()
public java.lang.String getChooserName(java.lang.String chooserId)
chooserId
- The id of the chooserpublic javax.swing.JMenu addUserChooserToMenu(javax.swing.JMenu menu, javax.swing.JMenu pullRight)
menu
- The menupullRight
- Will end up being the sub menupublic java.util.List sortDataSourceIds(java.util.List ids)
ids
- _more_public void dataSourceIdSelected(java.lang.String id)
id
- _more_public void makeDataSourceFromXml(org.w3c.dom.Element theNode)
theNode
- User chooser xml node that defines a data sourcepublic void closeDataChooser()
protected boolean shouldMakeDialog()
shouldMakeDialog
in class WindowHolder
protected java.lang.String getWindowTitle()
getWindowTitle
in class WindowHolder
protected void popupXmlChooserDialog(org.w3c.dom.Element tabNode, org.w3c.dom.Element dirNode)
tabNode
- What tab the entry is indirNode
- What entrypublic void processChooserXml()
public void processChooserXml(boolean writable, org.w3c.dom.Element root)
writable
- Is this the writable resourceroot
- The xml document rootprotected void writeChooserXml()
public javax.swing.JComboBox getDataSourcesComponent(boolean justFileSources, DataManager dataManager)
justFileSources
- If true then just use data sources that access filesdataManager
- The data managerpublic javax.swing.JComboBox getDataSourcesComponent(boolean justFileSources, DataManager dataManager, boolean addLucky)
justFileSources
- true for just filesdataManager
- the data manageraddLucky
- true to add the "I'm Feeiling Lucky" option