public class StationModelView
extends java.lang.Object
implements java.lang.Cloneable, java.io.Serializable
| Constructor and Description |
|---|
StationModelView(java.lang.String name)
constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
addSymbol(MetSymbol ms)
Add a symbol to the collection.
|
void |
changeTextSize(boolean incr)
increment or decrement all MetSymbols that are TextSymbols
|
java.lang.Object |
clone()
Clone this object
|
void |
draw(java.awt.Graphics2D g,
java.awt.geom.Point2D loc)
Draw the entire StationModel at the given location.
|
MetSymbol |
findSymbolByIndex(int idx)
Find the MetSymbol at the specified index
|
MetSymbol |
findSymbolByName(java.lang.String name)
find the MetSymbol with this name
|
java.awt.Rectangle |
getBounds()
Get the bounds
|
java.awt.Rectangle |
getBounds(java.awt.geom.Point2D loc)
Return union of bounding box of all the symbols
|
java.lang.String |
getName()
Get the name
|
MetSymbol |
getSelected()
Get the selected MetSymbol, or null if none.
|
java.util.Iterator |
iterator()
Get an iterator over MetSymbol objects
|
void |
removeSymbol(MetSymbol ms)
Remove a symbol from the collection.
|
void |
setAllMissing(boolean missing)
Set all values to missing if true.
|
void |
setColor(java.awt.Color c)
Set the color of all the MetSymbols
|
void |
setName(java.lang.String name)
Set the name
|
void |
setSelected(MetSymbol ms)
Set the selected MetSymbol.
|
void |
setSize(int size)
Set the size
|
java.lang.String |
toString()
Get a String representation of this object
|
public StationModelView(java.lang.String name)
name - name of this objectpublic void addSymbol(MetSymbol ms)
ms - symbol to addpublic void removeSymbol(MetSymbol ms)
ms - symbol to addpublic void changeTextSize(boolean incr)
incr - : true = increase, false = decreasepublic java.util.Iterator iterator()
public MetSymbol findSymbolByName(java.lang.String name)
name - the name to matchpublic MetSymbol findSymbolByIndex(int idx)
idx - the symbol indexjava.lang.ArrayIndexOutOfBoundsException - if idx is larger than lifepublic void setSize(int size)
size - the new sizepublic java.lang.String getName()
public void setName(java.lang.String name)
name - the new namepublic void setAllMissing(boolean missing)
missing - true to set all missingpublic void draw(java.awt.Graphics2D g,
java.awt.geom.Point2D loc)
g - loc - public MetSymbol getSelected()
public void setSelected(MetSymbol ms)
ms - public void setColor(java.awt.Color c)
c - public java.awt.Rectangle getBounds()
public java.awt.Rectangle getBounds(java.awt.geom.Point2D loc)
loc - public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.Object clone()
clone in class java.lang.Object