Class OverlayUtility
java.lang.Object
com.inductiveautomation.factorypmi.application.components.overlay.OverlayUtility
Class that manages painting data quality overlays for JComponents that are QualityMonitors.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic boolean
Set this tag before calling updateQuality to force a quality change to be fired.static final String
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Map<String,
QualityCode> getQualities
(JComponent comp) Return all qualities registered for the componentstatic QualityCode
getQuality
(JComponent comp, String propertyName) Attempts to look up the quality for an individual property.static boolean
static boolean
static void
static void
paintOverlay
(QualityMonitor qm, Graphics graphics) static void
paintOverlay
(JComponent comp, Graphics graphics, QualityCode quality) static void
setOverlaysEnabled
(boolean overlaysEnabled) static void
setTemplateEditingActive
(boolean templateEditingActive) static void
updateQuality
(QualityMonitor qm, String propName, QualityCode qualityCode) Iterates through a list of property qualities stored in the JComponent's client property map.
-
Field Details
-
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- See Also:
-
FORCE_QUALITY_CHANGE
public static boolean FORCE_QUALITY_CHANGESet this tag before calling updateQuality to force a quality change to be fired.
-
-
Constructor Details
-
OverlayUtility
public OverlayUtility()
-
-
Method Details
-
setOverlaysEnabled
public static void setOverlaysEnabled(boolean overlaysEnabled) -
isOverlaysEnabled
public static boolean isOverlaysEnabled() -
setTemplateEditingActive
public static void setTemplateEditingActive(boolean templateEditingActive) -
isTemplateEditingActive
public static boolean isTemplateEditingActive() -
paintOverlay
-
paintOverlay
-
getQuality
Attempts to look up the quality for an individual property. If no quality is found then good quality is assumed. -
getQualities
Return all qualities registered for the component -
updateQuality
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.
-
main
-