Package ucar.unidata.ui.symbol
Class StationModelManager
java.lang.Object
ucar.unidata.util.ResourceManager
ucar.unidata.ui.symbol.StationModelManager
This manages the set of station models. It provides a wrapper
around a StationModelCan
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final PatternFileFilter
The file pattern for selecting station model filesprotected XmlResourceCollection
This defines where we get the symbol definition xml filesFields inherited from class ucar.unidata.util.ResourceManager
listOfResourceLists, log_, LU, nameToObject, PROP_RESOURCECHANGE, PROP_RESOURCEREMOVE, resources, usersList, writablePath
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addStationModel
(StationModel stationModel) Add the station model into the list of user SMSboolean
Check if there has been a change to the currently edited station model.Get the default station model.Get the file filters to use for selecting files.getFrame()
Get the frame.Get the station model to use for selected locationsReturn the currently station model being edited.getStationModel
(String name) Get the named station modelReturn the name of currently station model being edited.Get the list of all station models.getTitle()
Override the ResourceManager method to get the title to usevoid
init
(XmlResourceCollection symbolTypes, ResourceCollection stationModels) Initialize.static void
testvoid
show()
Show the editor windowvoid
Show the editor dialog for the named station modelvoid
show
(StationModel initModel) Show the editor dialog for the station model.Methods inherited from class ucar.unidata.util.ResourceManager
addPropertyChangeListener, addUsers, doExport, doExport, doImport, doImport, doImport, doNew, doNew, doNew, doSaveAs, firePropertyChange, firePropertyChange, getDefault, getEncoder, getExportContents, getFileSuffix, getObject, getReadFileFilters, getResources, getResourceTimestamp, getUsersIndex, getUsersObject, getWriteFileFilters, hasUsers, init, initDone, initResource, isUsers, processObject, reloadResources, removePropertyChangeListener, removeUsers, resourceExists, shouldWeIgnoreThisXml, toObject, toObject
-
Field Details
-
FILTER_ISM
The file pattern for selecting station model files -
symbolTypes
This defines where we get the symbol definition xml files
-
-
Constructor Details
-
StationModelManager
public StationModelManager()ctor -
StationModelManager
ctor- Parameters:
encoder
- The XML encoder to use
-
-
Method Details
-
init
Initialize.- Parameters:
symbolTypes
- This defines where we get the symbol definition xml filesstationModels
- Where we get the station model files
-
addStationModel
Add the station model into the list of user SMS- Parameters:
stationModel
- Station model to add
-
getFileFilters
Get the file filters to use for selecting files.- Overrides:
getFileFilters
in classResourceManager
- Returns:
- List of file filters
-
getTitle
Override the ResourceManager method to get the title to use- Overrides:
getTitle
in classResourceManager
- Returns:
- The title
-
show
public void show()Show the editor window -
show
Show the editor dialog for the named station model- Parameters:
modelName
- Station model
-
checkCloseWindow
public boolean checkCloseWindow()Check if there has been a change to the currently edited station model. If there is ask the user if they want to save it. If they cancel then don't close the window.- Returns:
- true if it is ok to close, false if the user hits cancel
-
show
Show the editor dialog for the station model. This may be null.- Parameters:
initModel
- Initial model to show. May be null.
-
getFrame
Get the frame.- Returns:
- The frame
-
getDefaultStationModel
Get the default station model.- Returns:
- Default station model.
-
getStationModel
Return the currently station model being edited.- Returns:
- the station model being edited
-
getStationModelName
Return the name of currently station model being edited.- Returns:
- the station model name being edited
-
getSelectedStationModel
Get the station model to use for selected locations- Returns:
- selected station model
-
getStationModel
Get the named station model- Parameters:
name
- station model name- Returns:
- The station model or null if none found.
-
getStationModels
Get the list of all station models.- Returns:
- All station models
-
main
test- Parameters:
args
- cmd line args
-