|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
jview.JNormalizedCanvas
jview.JViewportCanvas
jview.JFrameCanvas
jview.JBoxedCanvas
jview.JDataCanvas
stella.jview.JWeatherCanvas
public class JWeatherCanvas
A canvas that collects weather data from a repository and displays it. The set names known to the data canvas must be equal to the sensor names displayed.
| Nested Class Summary | |
|---|---|
static class |
JWeatherCanvas.Show
|
| Nested classes/interfaces inherited from class jview.JDataCanvas |
|---|
JDataCanvas.AnimTest, JDataCanvas.Highlight, JDataCanvas.Histogram, JDataCanvas.Test, JDataCanvas.TestCanvas |
| Nested classes/interfaces inherited from class jview.JBoxedCanvas |
|---|
JBoxedCanvas.Datum |
| Nested classes/interfaces inherited from class jview.JViewportCanvas |
|---|
JViewportCanvas.ViewportKey |
| Nested classes/interfaces inherited from class jview.JNormalizedCanvas |
|---|
JNormalizedCanvas.ShowImage |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
private static String |
BAD
A bad bar. |
private static String |
DEFDRAWINGSETS
Per default we display humidity sensors. |
private static long |
DEFMAXRETARD
Default mximum retard. |
private static String |
DEFPOLYGONSHAPE
The default shapes. |
private static String |
DEFTABLE
Incoming sensor names are translated to set names using this table. |
private static String |
GOOD
A good bar. |
static String |
KEY_BADTOGGLE
If given, a vertical line is drawn at this normalized coordinate. |
static String |
KEY_GOODTOGGLE
If given, a vertical line is drawn at this normalized coordinate. |
static String |
KEY_MAXRETARD
Maximum time the received data event may be out-of-date. |
static String |
KEY_TABLE
A lookup table converting sensor names to set names. |
private Map<String,String> |
lookup
We translate sensor-names to set-names. |
| Fields inherited from class jview.JViewportCanvas |
|---|
MAXVIEW, VIEWPORTIMAGEPROPERTY, VIEWPORTPROPERTY |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
JWeatherCanvas(ResourceSupplying prop)
Constructs a new data canvas that goes into listening state on init(). |
|
| Method Summary | |
|---|---|
void |
applyData(Map<String,DataEvent> readings)
Process a data event generated by a sensor repository to reflect changes. |
void |
blockData(List<WeatherSurveying.DataBlock> block)
Sets a list of WeatherSurveying.BlockData measures. |
void |
init()
To increase readability, we set up a look-up table here. |
void |
setComposedProperties(ResourceSupplying prop)
Defaults the repository name and the sensors to monitor. |
| Methods inherited from class jview.JBoxedCanvas |
|---|
getBestDateFormat, getDefaultFormatX, getDefaultFormatY, getUserTransformation, getUserTransformation, printComponent, setUserTransformation, setUserTransformation, silentlySelectViewport, xIsDate, yIsDate |
| Methods inherited from class jview.JFrameCanvas |
|---|
calculateActiveCanvas, calculateShapeTransform, getArea, isScreenInNormalized, paintObjects, wasReshaped |
| Methods inherited from class jview.JViewportCanvas |
|---|
addAttachedViewport, addZoom, getViewport, getViewportImage, isMaximalViewport, isNormalizedOnScreen, removeAttachedViewport, resetViewport, selectArea, selectViewport, setViewportImage, transferView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface jview.NormalizedCoordinates |
|---|
getArea, getNormalized, getNormalizedRect, getScreen, getScreenRect, getViewport, isNormalizedOnScreen, isScreenInNormalized |
| Field Detail |
|---|
public static final String KEY_TABLE
public static final String KEY_BADTOGGLE
public static final String KEY_GOODTOGGLE
public static final String KEY_MAXRETARD
private static final String DEFTABLE
private static final String BAD
private static final String GOOD
private static final long DEFMAXRETARD
private static final String DEFDRAWINGSETS
private static final String DEFPOLYGONSHAPE
private Map<String,String> lookup
| Constructor Detail |
|---|
public JWeatherCanvas(ResourceSupplying prop)
init().
| Method Detail |
|---|
public void setComposedProperties(ResourceSupplying prop)
setComposedProperties in interface ResourceAwaresetComposedProperties in class JDataCanvaspublic void init()
init in interface Initializableinit in class JDataCanvaspublic void applyData(Map<String,DataEvent> readings)
readings - A mapping of sensor names to data events.public void blockData(List<WeatherSurveying.DataBlock> block)
WeatherSurveying.BlockData measures. This data is
most likely reconstructed from a database.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||