ucar.unidata.ui.symbol
Class StationModel

java.lang.Object
  extended by ucar.unidata.util.NamedList
      extended by ucar.unidata.ui.symbol.StationModel
All Implemented Interfaces:
NamedObject

public class StationModel
extends NamedList


Constructor Summary
StationModel()
          default ctor
StationModel(String name)
          ctor
StationModel(String name, List l)
          ctor
 
Method Summary
 void addSymbol(MetSymbol s)
          Add the symbol
 void draw(Graphics2D g, Point2D loc)
          Draw the entire StationModel at the given location.
 MetSymbol findSymbolByName(String name)
          Find the named symbol
 Rectangle getBounds()
          Get the bounds.
 String getDisplayName()
           
 List getSymbols()
          Get the list of symbols
 void removeSymbol(MetSymbol s)
          Remove the symbol
 
Methods inherited from class ucar.unidata.util.NamedList
equals, getDescription, getList, getName, iterator, setList, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

StationModel

public StationModel()
default ctor


StationModel

public StationModel(String name)
ctor

Parameters:
name - The name of the station model

StationModel

public StationModel(String name,
                    List l)
ctor

Parameters:
name - name
l - List of MetSymbols in this station model
Method Detail

getSymbols

public List getSymbols()
Get the list of symbols

Returns:
list of symbols

addSymbol

public void addSymbol(MetSymbol s)
Add the symbol

Parameters:
s - The symbol to add

removeSymbol

public void removeSymbol(MetSymbol s)
Remove the symbol

Parameters:
s - Symbol to remove

getBounds

public Rectangle getBounds()
Get the bounds. This is the union of the bounds of each symbol

Returns:
bounds

getDisplayName

public String getDisplayName()

findSymbolByName

public MetSymbol findSymbolByName(String name)
Find the named symbol

Parameters:
name - Symbol name
Returns:
Named symbol or null

draw

public void draw(Graphics2D g,
                 Point2D loc)
Draw the entire StationModel at the given location. Note that all MetSymbols expect to use "normalized device" coordinates.

Parameters:
g -
loc -