|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.view.station.StationModelView
public class StationModelView
Encapsolates how a station observation should be displayed. A StationModelView is essentially a collection of MetSymbols.
| Constructor Summary | |
|---|---|
StationModelView(String name)
constructor |
|
| Method Summary | |
|---|---|
void |
addSymbol(MetSymbol ms)
Add a symbol to the collection. |
void |
changeTextSize(boolean incr)
increment or decrement all MetSymbols that are TextSymbols |
Object |
clone()
Clone this object |
void |
draw(Graphics2D g,
Point2D loc)
Draw the entire StationModel at the given location. |
MetSymbol |
findSymbolByIndex(int idx)
Find the MetSymbol at the specified index |
MetSymbol |
findSymbolByName(String name)
find the MetSymbol with this name |
Rectangle |
getBounds()
Get the bounds |
Rectangle |
getBounds(Point2D loc)
Return union of bounding box of all the symbols |
String |
getName()
Get the name |
MetSymbol |
getSelected()
Get the selected MetSymbol, or null if none. |
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(Color c)
Set the color of all the MetSymbols |
void |
setName(String name)
Set the name |
void |
setSelected(MetSymbol ms)
Set the selected MetSymbol. |
void |
setSize(int size)
Set the size |
String |
toString()
Get a String representation of this object |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public StationModelView(String name)
name - name of this object| Method Detail |
|---|
public 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 Iterator iterator()
public MetSymbol findSymbolByName(String name)
name - the name to match
public MetSymbol findSymbolByIndex(int idx)
idx - the symbol index
ArrayIndexOutOfBoundsException - if idx is larger than lifepublic void setSize(int size)
size - the new sizepublic String getName()
public void setName(String name)
name - the new namepublic void setAllMissing(boolean missing)
missing - true to set all missing
public void draw(Graphics2D g,
Point2D loc)
g - loc - public MetSymbol getSelected()
public void setSelected(MetSymbol ms)
ms - public void setColor(Color c)
c - public Rectangle getBounds()
public Rectangle getBounds(Point2D loc)
loc -
public String toString()
toString in class Objectpublic Object clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||