|
||||||||||
| 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.PluginManager
public class PluginManager
| Field Summary | |
|---|---|
static String |
ATTR_CATEGORY
Xml attr |
static String |
ATTR_DESC
Xml attr name |
static String |
ATTR_NAME
Xml attr |
static String |
ATTR_SIZE
Xml attr |
static String |
ATTR_URL
Xml attr name |
static String |
ATTR_VERSION
Xml attr |
static String |
PLUGIN_PROTOCOL
for url plugins |
static String |
TAG_PLUGIN
xml tag |
| Fields inherited from class ucar.unidata.ui.WindowHolder |
|---|
contents, dialog, frame, window |
| Constructor Summary | |
|---|---|
PluginManager(IntegratedDataViewer idv)
ctor |
|
| Method Summary | |
|---|---|
void |
addCreateFile()
Let user select a file to put into the plugin |
void |
addCreateFile(String file)
Add the file to the list of plugin files |
protected void |
addError(String message,
Throwable exc)
add an error |
void |
addObject(Object obj)
Add some object to the list |
void |
addObjects(List objects)
Add the list of objects |
void |
addPreferences()
Add main.xml |
void |
addText(String text,
String filename)
Add the given text with the given filename. |
void |
applyPreferences()
Apply preferences |
void |
closeCreatePlugin()
Close the dialog |
void |
closePluginDialog()
close dialog |
protected void |
closeResources()
This gets called on System.exit and closes any open plugin jar files |
void |
createPlugin()
Write the plugin |
static String |
decode(File f)
Decode the name of the file. |
static String |
decode(String filename)
Decode the name of the file. |
static String |
encode(String filename)
Encode the filename |
String |
getPluginHtml()
Show a dialog that lists the loaded plugins |
void |
handlePlugin(String path)
Handle the extension file. |
void |
importPlugin()
import plugin from file |
void |
importPlugin(String filename)
import plugin from file |
void |
importPlugin(String filename,
boolean merge)
import plugin from file |
void |
initializeColorTableMenu(JMenu menu)
Add entries to menu |
void |
initializeFavoritesMenu(JMenu menu)
Add entries to menu |
void |
initializeFormulasMenu(JMenu menu)
Add entries to menu |
void |
initializeMenu(JMenu menu,
List list,
String name)
Add entries to menu |
void |
initializeParamDefaultsMenu(JMenu menu)
Add entries to menu |
void |
initializeProjectionsMenu(JMenu menu)
Add entries to menu |
void |
initializeStationModelsMenu(JMenu menu)
Add entries to menu |
void |
installPlugin(String plugin)
install the plugin |
void |
installPluginFromFile()
Prompt for a plugin filename and install it. |
void |
installPluginFromFile(String filename)
Install a plugin from a file |
void |
installPluginFromUrl()
Prompt for a plugin url and install it. |
void |
installPluginInThread(String plugin)
install the plugin |
void |
listPlugin(String file)
List the contents of the plugin file |
void |
loadBundlesFromDisk()
Load bundles from disk |
protected void |
loadJar(String jarFilePath)
Load the jar file |
protected void |
loadPlugin(String filename,
boolean topLevel)
Try to process the given file. |
protected void |
loadPlugin(String filename,
String prefix,
boolean topLevel)
Try to process the given file. |
protected void |
loadPlugin(String filename,
String prefix,
boolean topLevel,
String label)
load plugin |
protected void |
loadPlugins()
Load in any plugins |
static void |
main(String[] args)
test |
protected void |
notifyUser()
Notify the users to restart the IDV |
void |
removeCreateFile()
Remove the selected entry(ies) in the list of resources |
void |
removePlugin(File file)
remove plugin |
void |
removePlugin(String file)
remove plugin |
String |
selectJarFile()
Ask the user to seelct a jar file. |
void |
showCreatePlugin()
Show the create dialog |
void |
showCreatorHelp()
Show help |
void |
showManagerHelp()
Show help |
void |
showPluginList()
show dialog |
void |
toggleCategory(String category)
Show or hide the category |
void |
updatePlugins()
Show a dialog that lists the loaded plugins |
void |
updatePlugins(boolean doLoaded)
Show a dialog that lists the loaded plugins |
void |
viewPluginFile(Object[] args)
View the plugin file. |
| Methods inherited from class ucar.unidata.ui.WindowHolder |
|---|
actionPerformed, close, doMakeContents, getContents, getDialog, getFrame, getWindow, getWindowTitle, isShowing, removeAll, setMenuBar, setWindowTitle, shouldMakeDialog, 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 PLUGIN_PROTOCOL
public static final String TAG_PLUGIN
public static final String ATTR_NAME
public static final String ATTR_SIZE
public static final String ATTR_VERSION
public static final String ATTR_CATEGORY
public static final String ATTR_DESC
public static final String ATTR_URL
| Constructor Detail |
|---|
public PluginManager(IntegratedDataViewer idv)
idv - the idv| Method Detail |
|---|
public void viewPluginFile(Object[] args)
args - The argspublic void listPlugin(String file)
file - The plugin filepublic String selectJarFile()
public void addText(String text,
String filename)
text - Text to writefilename - Filename to usepublic void addObjects(List objects)
objects - Objectspublic void addObject(Object obj)
obj - The object to addpublic void createPlugin()
public void closeCreatePlugin()
public void applyPreferences()
public void addCreateFile()
public void addCreateFile(String file)
file - The filepublic void removeCreateFile()
public void initializeColorTableMenu(JMenu menu)
menu - the menupublic void initializeStationModelsMenu(JMenu menu)
menu - the menupublic void initializeFavoritesMenu(JMenu menu)
menu - the menupublic void initializeFormulasMenu(JMenu menu)
menu - the menupublic void loadBundlesFromDisk()
public void initializeParamDefaultsMenu(JMenu menu)
menu - the menupublic void initializeProjectionsMenu(JMenu menu)
menu - the menu
public void initializeMenu(JMenu menu,
List list,
String name)
menu - the menulist - List of entriesname - name of the sub menupublic void addPreferences()
public void showCreatePlugin()
public void showCreatorHelp()
public void showManagerHelp()
public void showPluginList()
protected void closeResources()
protected void loadPlugins()
throws Exception
Exception - On badness_
protected void addError(String message,
Throwable exc)
message - msgexc - exception
public void handlePlugin(String path)
throws Exception
path - file path or url
Exception - On badness
protected void loadPlugin(String filename,
boolean topLevel)
throws Exception
filename - The filetopLevel - Flag that designates that this plugin is one of the main files in the plugins
directory.
Exception - On badnesspublic void removePlugin(String file)
file - filepublic void removePlugin(File file)
file - file
protected void loadPlugin(String filename,
String prefix,
boolean topLevel)
throws Exception
filename - The fileprefix - Prefix to prepend on the filename for jar based entriestopLevel - Flag that designates that this plugin is one of the main files in the plugins
directory.
Exception - On badness
protected void loadPlugin(String filename,
String prefix,
boolean topLevel,
String label)
throws Exception
filename - plugin fileprefix - prefixtopLevel - top levellabel - label
Exception - on badnessprotected void loadJar(String jarFilePath)
jarFilePath - Load the jarpublic String getPluginHtml()
public void importPlugin()
public void importPlugin(String filename)
filename - filename
public void importPlugin(String filename,
boolean merge)
filename - filenamemerge - mergepublic void installPluginFromFile()
public void installPluginFromFile(String filename)
filename - file nameprotected void notifyUser()
public void installPluginFromUrl()
public void installPlugin(String plugin)
plugin - url or file name of the pluginpublic void installPluginInThread(String plugin)
plugin - url or file name of the pluginpublic void closePluginDialog()
public static String decode(File f)
f - file
public static String decode(String filename)
filename - filen
public static String encode(String filename)
filename - file or url
public void toggleCategory(String category)
category - category to show or hidepublic void updatePlugins()
public void updatePlugins(boolean doLoaded)
doLoaded - Update the loaded list as well
public static void main(String[] args)
throws IOException
args - args
IOException - on badness
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||