Package com.iizigo.image
Class ImageInfo
java.lang.Object
com.iizigo.image.ImageInfo
- All Implemented Interfaces:
- EventListener,- Runnable
The image info used by the image editor components.
- Author:
- Christopher Mindus
- Constructor SummaryConstructorsConstructorDescription- ImageInfo- (org.eclipse.core.resources.IFile file) Creates an instance from an existing file to load the image.
- Method SummaryModifier and TypeMethodDescription- void- addListener- (IImageInfoChanged listener) Adds listener.- void- dispose()Disposes of the instance, i.e.Gets the reference.- getError()Gets the error text when not valid.- org.eclipse.core.resources.IFile- getFile()Gets the file.- intGets the height.- org.eclipse.swt.graphics.Image- getImage()Gets the image.- getSize()Gets the size.- int- getWidth()Gets the width.- static ImageInfo- grab- (AssetReference ref, GProp<?> anyPropInTree) From a AssetReference, gets the ImageInfo instance and adds a reference count to it.- boolean- isValid()Checks for validity.- voidProperty event.- void- release()Releases this instance that was "grabbed".- void- removeListener- (IImageInfoChanged listener) Adds listener.- void- run()Called at async prop events.- toString()Prints a string representation.
- Constructor Details- ImageInfopublic ImageInfo- (org.eclipse.core.resources.IFile file) Creates an instance from an existing file to load the image.
 
- Method Details- grabFrom a AssetReference, gets the ImageInfo instance and adds a reference count to it.
- addListenerAdds listener.
- removeListenerAdds listener.
- disposepublic void dispose()Disposes of the instance, i.e. the image.
- releasepublic void release()Releases this instance that was "grabbed".
- onEventProperty event.- Specified by:
- onEventin interface- EventListener
- Parameters:
- event- The event.
 
- runpublic void run()Called at async prop events.
- isValidpublic boolean isValid()Checks for validity.
- getImagepublic org.eclipse.swt.graphics.Image getImage()Gets the image.
- getWidthpublic int getWidth()Gets the width.
- getHeightpublic int getHeight()Gets the height.
- getSizeGets the size.- Returns:
- The size, or null if not valid.
 
- getFilepublic org.eclipse.core.resources.IFile getFile()Gets the file.
- getErrorGets the error text when not valid.- Returns:
- The error string, null when valid.
 
- getAssetReferenceGets the reference.
- toStringPrints a string representation.