public class OverlayUtility
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OverlayUtility.OverlayReferencePanel |
Modifier and Type | Field and Description |
---|---|
static boolean |
FORCE_QUALITY_CHANGE
Set this tag before calling updateQuality to force a quality change to be fired.
|
static java.lang.String |
QUALITY_SUFFIX
If you have a property named "foo", then when its quality changes, you'll get a property change event fired for
"foo"+QUALITY_SUFFIX
|
Constructor and Description |
---|
OverlayUtility() |
Modifier and Type | Method and Description |
---|---|
static java.util.Map<java.lang.String,DataQuality> |
getQualities(javax.swing.JComponent comp)
Return all qualities registered for the component
|
static int |
getQuality(javax.swing.JComponent comp,
java.lang.String propertyName)
Attempts to look up the quality for an individual property.
|
static boolean |
isOverlaysEnabled() |
static boolean |
isTemplateEditingActive() |
static void |
main(java.lang.String[] args) |
static void |
paintOverlay(javax.swing.JComponent comp,
java.awt.Graphics _g,
DataQuality quality) |
static void |
paintOverlay(QualityMonitor qm,
java.awt.Graphics _g) |
static void |
setOverlay(DataQuality quality,
Overlay overlay)
Sets the overlay for the given quality.
|
static void |
setOverlaysEnabled(boolean overlaysEnabled) |
static void |
setTemplateEditingActive(boolean templateEditingActive) |
static void |
updateQuality(QualityMonitor qm,
java.lang.String propName,
int qualityCode)
Iterates through a list of property qualities stored in the JComponent's client property map.
|
public static final java.lang.String QUALITY_SUFFIX
public static boolean FORCE_QUALITY_CHANGE
public static void setOverlay(DataQuality quality, Overlay overlay)
quality
- overlay
- public static void setOverlaysEnabled(boolean overlaysEnabled)
public static boolean isOverlaysEnabled()
public static void setTemplateEditingActive(boolean templateEditingActive)
public static boolean isTemplateEditingActive()
public static void paintOverlay(QualityMonitor qm, java.awt.Graphics _g)
public static void paintOverlay(javax.swing.JComponent comp, java.awt.Graphics _g, DataQuality quality)
public static int getQuality(javax.swing.JComponent comp, java.lang.String propertyName)
public static java.util.Map<java.lang.String,DataQuality> getQualities(javax.swing.JComponent comp)
public static void updateQuality(QualityMonitor qm, java.lang.String propName, int qualityCode)
Iterates through a list of property qualities stored in the JComponent's client property map. Uses a list rather than a map b/c we'd have to iterate through the map anyhow, so its not efficient
If you call this from a non-EDT thread, it will be wrapped in an invokeLater for you automatically.
qm
- propName
- qualityCode
- public static void main(java.lang.String[] args)