public interface QualityMonitor
A component that monitors the quality of its properties' values. The quality can automatically be calculated and tracked for the component via the OverlayUtility. Most components that inherit from AbstractVisionComponent or AbstractVisionPanel will have this ability naturally.
The common implementation of these functions would look like this:
private int quality = -1; public int getDataQuality() { return quality; } public void setDataQuality(int value) { int oldQuality = this.quality; this.quality = value; firePropertyChange("dataQuality", oldQuality, value); repaint(); } public void updateQuality(String propName, int quality) { OverlayUtility.updateQuality(this, propName, quality); } @Override protected void paintChildren(Graphics g) { super.paintChildren(g); OverlayUtility.paintOverlay(this, g); }
Modifier and Type | Method and Description |
---|---|
int |
getDataQuality()
Retrieves the data quality code.
|
void |
setDataQuality(int value)
Sets the current data quality to the given value
|
void |
updateQuality(java.lang.String propName,
int quality)
Updates the quality for the given property name.
|
void setDataQuality(int value)
int getDataQuality()
void updateQuality(java.lang.String propName, int quality)