Class PathIcon
java.lang.Object
javax.swing.ImageIcon
com.inductiveautomation.ignition.client.images.PathIcon
- All Implemented Interfaces:
- Serializable,- Accessible,- Icon
This class loads an icon, possibly stretching and applying filters (color replace, color tint) to it.
 
 For a long time, this class loaded images asynchronously with the EventQueue thread, updating the imageobserver as
 they came in. It was changed to instead load images synchronously, opting to store them in an in-memory cache. See
 ImageLoader This simplifies the code a lot, and was done to eliminate a race condition that was occuring when
 multiple images were loading the same image, and then applying filters (common). See SVN for old methods and inner
 classes.
- See Also:
- 
Nested Class SummaryNested ClassesNested classes/interfaces inherited from class javax.swing.ImageIconImageIcon.AccessibleImageIcon
- 
Field SummaryFields
- 
Constructor SummaryConstructorsConstructorDescriptionPathIcon()PathIcon(ImageObserver observer, String path, int w, int h) PathIcon(ImageObserver observer, String path, int w, int h, boolean useCache, boolean loadInBackground) 
- 
Method SummaryModifier and TypeMethodDescriptionvoiddoFilters(boolean update) intintintgetImage()protected PathIcon.LoadImageTaskgetImageLoadingTask(String path, int sW, int sH, long mySeq) getPath()intgetWidth()booleanbooleanvoidvoidreset()voidsetFilterA(ImageFilter filter) voidsetFilterB(ImageFilter filter) voidsetHeight(int i) voidvoidsetImageObserver(ImageObserver observer) voidsetLoadInBackground(boolean loadInBackground) voidvoidsetScaleMode(int scaleMode) Deprecated.Not used anymore now that scaling is done by the ImageLoadervoidsetStretchSize(int w, int h) voidsetUseCache(boolean useCache) voidsetWidth(int i) static booleanwaitForImage(Image image) Methods inherited from class javax.swing.ImageIcongetAccessibleContext, getDescription, getImageLoadStatus, loadImage, setDescription, toString
- 
Field Details- 
COMP
- 
useCacheprotected boolean useCache
 
- 
- 
Constructor Details- 
PathIconpublic PathIcon()
- 
PathIcon
- 
PathIconpublic PathIcon(ImageObserver observer, String path, int w, int h, boolean useCache, boolean loadInBackground) 
 
- 
- 
Method Details- 
setLoadInBackgroundpublic void setLoadInBackground(boolean loadInBackground) 
- 
isLoadInBackgroundpublic boolean isLoadInBackground()
- 
getIconHeightpublic int getIconHeight()- Specified by:
- getIconHeightin interface- Icon
- Overrides:
- getIconHeightin class- ImageIcon
 
- 
getIconWidthpublic int getIconWidth()- Specified by:
- getIconWidthin interface- Icon
- Overrides:
- getIconWidthin class- ImageIcon
 
- 
paintIcon
- 
setImage
- 
getImage
- 
getHeightpublic int getHeight()
- 
getImageObserver- Overrides:
- getImageObserverin class- ImageIcon
 
- 
getWidthpublic int getWidth()
- 
setHeightpublic void setHeight(int i) 
- 
setStretchSizepublic void setStretchSize(int w, int h) 
- 
resetpublic void reset()
- 
setUseCachepublic void setUseCache(boolean useCache) 
- 
isUseCachepublic boolean isUseCache()
- 
setImageObserver- Overrides:
- setImageObserverin class- ImageIcon
 
- 
setWidthpublic void setWidth(int i) 
- 
getPath
- 
getImageLoadingTask
- 
setPath
- 
waitForImage
- 
setFilterA
- 
setFilterB
- 
doFilterspublic void doFilters(boolean update) 
- 
setScaleModeDeprecated.Not used anymore now that scaling is done by the ImageLoader
 
-