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 SummaryNested Classes
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic booleanSet this tag before calling updateQuality to force a quality change to be fired.static final StringIf you have a property named "foo", then when its quality changes, you'll get a property change event fired for "foo"+QUALITY_SUFFIX
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic Map<String,QualityCode> getQualities(JComponent comp) Return all qualities registered for the componentstatic QualityCodegetQuality(JComponent comp, String propertyName) Attempts to look up the quality for an individual property.static booleanstatic booleanstatic voidstatic voidpaintOverlay(QualityMonitor qm, Graphics graphics) static voidpaintOverlay(JComponent comp, Graphics graphics, QualityCode quality) static voidsetOverlaysEnabled(boolean overlaysEnabled) static voidsetTemplateEditingActive(boolean templateEditingActive) static voidupdateQuality(QualityMonitor qm, String propName, QualityCode qualityCode) Iterates through a list of property qualities stored in the JComponent's client property map.
- 
Field Details- 
QUALITY_SUFFIXIf 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_CHANGEpublic static boolean FORCE_QUALITY_CHANGESet this tag before calling updateQuality to force a quality change to be fired.
 
- 
- 
Constructor Details- 
OverlayUtilitypublic OverlayUtility()
 
- 
- 
Method Details- 
setOverlaysEnabledpublic static void setOverlaysEnabled(boolean overlaysEnabled) 
- 
isOverlaysEnabledpublic static boolean isOverlaysEnabled()
- 
setTemplateEditingActivepublic static void setTemplateEditingActive(boolean templateEditingActive) 
- 
isTemplateEditingActivepublic static boolean isTemplateEditingActive()
- 
paintOverlay
- 
paintOverlay
- 
getQualityAttempts to look up the quality for an individual property. If no quality is found then good quality is assumed.
- 
getQualitiesReturn all qualities registered for the component
- 
updateQualityIterates 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
 
-