Class AppleImage
- java.lang.Object
-
- com.webcodepro.applecommander.storage.filters.imagehandlers.AppleImage
-
- Direct Known Subclasses:
ImageIoImage,SunJpegImage
public abstract class AppleImage extends java.lang.ObjectAppleImage is an abstract class that represents a generic interface for handing graphic images. This abstraction is needed because not all graphic routines use BufferedImage. AppleImage itself acts as a factory for creating "the best" AppleImage subclass.Date Created: Mar 25, 2003
-
-
Constructor Summary
Constructors Constructor Description AppleImage(java.lang.String[] availableExtensions)Construct AppleImage.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static AppleImagecreate(int width, int height)Create a specific instance of AppleImage.java.lang.String[]getAvailableExtensions()Return a list of file extensions that this specific implementation can handle.java.lang.StringgetDefaultExtension()Get the default file extension.java.lang.StringgetFileExtension()Returns the file extension.abstract intgetHeight()Return the height of the image.abstract intgetPoint(int x, int y)Get a color point.abstract intgetWidth()Return the width of the image.abstract voidsave(java.io.OutputStream outputStream)Save the image.protected voidsetAvailableExtensions(java.lang.String[] availableExtensions)Set the list of file extensions that can be handled.voidsetFileExtension(java.lang.String fileExtension)Sets the file extension.abstract voidsetPoint(int x, int y, int color)Set a color point.
-
-
-
Method Detail
-
create
public static AppleImage create(int width, int height)
Create a specific instance of AppleImage. This has been coded using Reflection to ease native compilation for the most part.
-
getDefaultExtension
public java.lang.String getDefaultExtension()
Get the default file extension. Used to "prime" the graphics FileFilter.
-
getAvailableExtensions
public java.lang.String[] getAvailableExtensions()
Return a list of file extensions that this specific implementation can handle.
-
setAvailableExtensions
protected void setAvailableExtensions(java.lang.String[] availableExtensions)
Set the list of file extensions that can be handled.
-
getFileExtension
public java.lang.String getFileExtension()
Returns the file extension.
-
setFileExtension
public void setFileExtension(java.lang.String fileExtension)
Sets the file extension.
-
setPoint
public abstract void setPoint(int x, int y, int color)Set a color point.
-
getPoint
public abstract int getPoint(int x, int y)Get a color point.
-
save
public abstract void save(java.io.OutputStream outputStream) throws java.io.IOExceptionSave the image.- Throws:
java.io.IOException
-
getWidth
public abstract int getWidth()
Return the width of the image.
-
getHeight
public abstract int getHeight()
Return the height of the image.
-
-