Package ucar.unidata.view.station
Class StationModelView
java.lang.Object
ucar.unidata.view.station.StationModelView
- All Implemented Interfaces:
Serializable
,Cloneable
Encapsolates how a station observation should be displayed.
A StationModelView is essentially a collection of MetSymbols.
- Version:
- $Revision: 1.8 $ $Date: 2005/08/11 22:26:12 $
- Author:
- MetApps Development Team
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add a symbol to the collection.void
changeTextSize
(boolean incr) increment or decrement all MetSymbols that are TextSymbolsclone()
Clone this objectvoid
draw
(Graphics2D g, Point2D loc) Draw the entire StationModel at the given location.findSymbolByIndex
(int idx) Find the MetSymbol at the specified indexfindSymbolByName
(String name) find the MetSymbol with this nameGet the boundsReturn union of bounding box of all the symbolsgetName()
Get the nameGet the selected MetSymbol, or null if none.iterator()
Get an iterator over MetSymbol objectsvoid
Remove a symbol from the collection.void
setAllMissing
(boolean missing) Set all values to missing if true.void
Set the color of all the MetSymbolsvoid
Set the namevoid
setSelected
(MetSymbol ms) Set the selected MetSymbol.void
setSize
(int size) Set the sizetoString()
Get a String representation of this object
-
Constructor Details
-
StationModelView
constructor- Parameters:
name
- name of this object
-
-
Method Details
-
addSymbol
Add a symbol to the collection.- Parameters:
ms
- symbol to add
-
removeSymbol
Remove a symbol from the collection.- Parameters:
ms
- symbol to add
-
changeTextSize
public void changeTextSize(boolean incr) increment or decrement all MetSymbols that are TextSymbols- Parameters:
incr
- : true = increase, false = decrease
-
iterator
Get an iterator over MetSymbol objects- Returns:
- the iterator for the collection
-
findSymbolByName
find the MetSymbol with this name- Parameters:
name
- the name to match- Returns:
- the found MetSybpol or null if no match
-
findSymbolByIndex
Find the MetSymbol at the specified index- Parameters:
idx
- the symbol index- Returns:
- the found MetSymbol
- Throws:
ArrayIndexOutOfBoundsException
- if idx is larger than life
-
setSize
public void setSize(int size) Set the size- Parameters:
size
- the new size
-
getName
Get the name- Returns:
- the name
-
setName
Set the name- Parameters:
name
- the new name
-
setAllMissing
public void setAllMissing(boolean missing) Set all values to missing if true.- Parameters:
missing
- true to set all missing
-
draw
Draw the entire StationModel at the given location. Note that all MetSymbols expect to use "normalized device" coordinates.- Parameters:
g
-loc
-
-
getSelected
Get the selected MetSymbol, or null if none. (Used for editing)- Returns:
- the selected MetSymbol
-
setSelected
Set the selected MetSymbol. (Used for editing)- Parameters:
ms
-
-
setColor
Set the color of all the MetSymbols- Parameters:
c
-
-
getBounds
Get the bounds- Returns:
- the bounds
-
getBounds
Return union of bounding box of all the symbols- Parameters:
loc
-- Returns:
- the union of bounding box of all the symbols
-
toString
Get a String representation of this object -
clone
Clone this object
-