|
||||||||||
| 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.ui.ParamDefaultsEditor
public class ParamDefaultsEditor
This class provides 2 facilities. First, there is a set of static methods:
init (XmlResourceCollection resources);
Range getParamRange (String paramName);
getParamColorTable (String paramName);
that provide basic lookup of parameter defaults.
The init method is called once. It is passed an XmlResourceCollection
that holds the list of xml files to be used. The first resource in the list
is taken to be the user's "writable" resource. These resources are read in, first to
last, and a static collection of ParamInfo-s are is created that is used to
do the subsequent param default lookups.
This class is also used to provide an end-user editing facility.
| Nested Class Summary | |
|---|---|
class |
ParamDefaultsEditor.ParamDefaultsTable
A JTable that holds a list of ParamInfo objects and provides display and
editing capabilities |
| Field Summary | |
|---|---|
static String |
ATTR_CI_BASE
The contour info base xml attribute name |
static String |
ATTR_CI_DASH
The contour info dash xml attribute name |
static String |
ATTR_CI_INTERVAL
The contour info interval xml attribute name |
static String |
ATTR_CI_LABEL
The contour info label xml attribute name |
static String |
ATTR_CI_MAX
The contour info max xml attribute name |
static String |
ATTR_CI_MIN
The contour info min xml attribute name |
static String |
ATTR_CI_WIDTH
The contour info label xml attribute name |
static String |
ATTR_COLORTABLE
The colortable xml attribute name |
static String |
ATTR_NAME
The name xml attribute name |
static String |
ATTR_RANGE_MAX
The range max xml attribute name |
static String |
ATTR_RANGE_MIN
The range min xml attribute name |
static String |
ATTR_UNIT
The unit xml attribute name |
static boolean |
DFLT_CI_DASH
The contour info default dash value |
static boolean |
DFLT_CI_LABEL
The contour info default label value |
static int |
DFLT_CI_WIDTH
The contour info default width value |
static String |
TAG_PARAM
The param xml tag name |
static String |
TAG_PARAMS
The params xml tag name |
| Fields inherited from class ucar.unidata.ui.WindowHolder |
|---|
contents, dialog, frame, window |
| Constructor Summary | |
|---|---|
ParamDefaultsEditor(IntegratedDataViewer idv)
Create the editor with the given collection of xml resources |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent event)
Handle the CLOSEANCEL, OK, HELP, events. |
void |
addNewRow()
add a new row to users table |
protected void |
copyToUsers(ParamInfo i)
Copy the given ParamInfo object into the user's editable table |
void |
doClose()
Close the window (and the color table editor if it is open) |
void |
doImport()
Import an xml param defaults file |
void |
doOpen()
Open an xml param defaults file |
void |
doSave(List infoList,
String filename)
Save the list of ParamInfo-s into the given file |
void |
doSaveAs()
Save the param infos |
void |
doSaveAs(List infoList)
Prompt for a file and write out the ParamInfo-s from the given list. |
void |
exportSelectedToPlugin()
Export the selected param infos to the plugin manager |
void |
exportToPlugin()
Export allthe param infos to the plugin manager |
ParamDefaultsEditor.ParamDefaultsTable |
getCurrentTable()
Return the ParamDefaultsTable which is currently being shown in the tabbed pane |
ColorTable |
getParamColorTable(String paramName)
Returns a color table based on the parameter name (e.g., rh, t, etc.) |
ContourInfo |
getParamContourInfo(String paramName)
Returns a ContourInfo based on the parameter name (e.g., rh, t, etc.) |
Unit |
getParamDisplayUnit(String paramName)
Returns a Unit based on the parameter name (e.g., rh, t, etc.) |
List |
getParamInfos(boolean justFirst)
Get the param infos |
Range |
getParamRange(String paramName)
Returns a Range based on the parameter name (e.g., rh, t, etc.) |
protected String |
getWindowTitle()
Get the window title to use |
void |
loadResources(XmlResourceCollection resources)
Load in the xml resources |
void |
saveDefaults(DisplayControlImpl displayControl)
Get the color table, range, etc, from the given display control and save them as the param defaults for its data choice |
void |
showHelp()
show help |
| Methods inherited from class ucar.unidata.ui.WindowHolder |
|---|
close, doMakeContents, getContents, getDialog, getFrame, getWindow, isShowing, removeAll, 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 TAG_PARAM
public static final String TAG_PARAMS
public static final String ATTR_UNIT
public static final String ATTR_NAME
public static final String ATTR_COLORTABLE
public static final String ATTR_RANGE_MIN
public static final String ATTR_RANGE_MAX
public static final String ATTR_CI_INTERVAL
public static final String ATTR_CI_BASE
public static final String ATTR_CI_MIN
public static final String ATTR_CI_MAX
public static final String ATTR_CI_DASH
public static final String ATTR_CI_LABEL
public static final String ATTR_CI_WIDTH
public static final boolean DFLT_CI_DASH
public static final boolean DFLT_CI_LABEL
public static final int DFLT_CI_WIDTH
| Constructor Detail |
|---|
public ParamDefaultsEditor(IntegratedDataViewer idv)
idv - The IDV| Method Detail |
|---|
public void exportSelectedToPlugin()
public void exportToPlugin()
public void addNewRow()
public List getParamInfos(boolean justFirst)
justFirst - if true then just get the first table
public void loadResources(XmlResourceCollection resources)
resources - The resourcespublic ParamDefaultsEditor.ParamDefaultsTable getCurrentTable()
public void doImport()
public void doOpen()
public void actionPerformed(ActionEvent event)
actionPerformed in interface ActionListeneractionPerformed in class WindowHolderevent - The eventpublic void showHelp()
public void doClose()
protected String getWindowTitle()
getWindowTitle in class WindowHolder
public void doSave(List infoList,
String filename)
infoList - List of infosfilename - The filename to write topublic void doSaveAs()
public void doSaveAs(List infoList)
infoList - List of ParamInfo-sprotected void copyToUsers(ParamInfo i)
i - the param fino object to copypublic void saveDefaults(DisplayControlImpl displayControl)
displayControl - the display control to get state frompublic Range getParamRange(String paramName)
paramName - Name to look for
Range found or nullpublic ContourInfo getParamContourInfo(String paramName)
paramName - Name to look for
ContourInfo found or nullpublic Unit getParamDisplayUnit(String paramName)
paramName - Name to look for
public ColorTable getParamColorTable(String paramName)
paramName - Name to look for
ColorTable found or null
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||