Sky View Café - Java

org.shetline.gui
Class ImageRetriever

java.lang.Object
  extended by java.awt.Component
      extended by org.shetline.gui.ImageRetriever
All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Runnable

public class ImageRetriever
extends Component
implements Runnable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
 
Field Summary
protected  Object client
           
static String COMMENT
           
static String COMMENT_BYTES
           
protected  boolean completeImage
           
protected  boolean goodImage
           
protected  int height
           
protected  Image image
           
protected  String imagePath
           
protected  URL imageURL
           
protected  Image partialImage
           
protected  Class resourceOwner
           
protected  int width
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ImageRetriever(Image image, Object client)
           
ImageRetriever(String imagePath, Class resourceOwner, Object client)
           
ImageRetriever(String imagePath, Object client)
           
ImageRetriever(URL imageURL, Object client)
           
 
Method Summary
protected static Image get(Image image, Object client)
           
static Image get(String imagePath)
           
static Image get(String imagePath, Class resourceOwnerClass)
           
static Image get(String imagePath, Class resourceOwnerClass, Object client)
           
static Image get(String imagePath, Class resourceOwnerClass, Object client, Map<String,Object> properties)
           
static Image get(URL imageURL)
           
static Image get(URL imageURL, Object client)
           
static Image getByURL(String imageURL)
           
static Image getByURL(String imageURL, Object client)
           
 int getHeight()
           
 Image getImage()
           
static ImageRetriever getImageRetrieverForURL(String imageURL, Object client)
           
static byte[] getJPEGComment(byte[] imageBytes)
           
 Image getPartialImage()
           
 Dimension getSize()
           
 int getWidth()
           
 boolean imageUpdate(Image img, int infoflags, int x, int y, int w, int h)
           
 boolean isComplete()
           
static boolean isGIF(byte[] imageBytes)
           
 boolean isGood()
           
static boolean isJPEG(byte[] imageBytes)
           
 void run()
           
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setMaximumSize, setMinimumSize, setName, setPreferredSize, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

client

protected Object client

image

protected Image image

imagePath

protected String imagePath

imageURL

protected URL imageURL

partialImage

protected Image partialImage

resourceOwner

protected Class resourceOwner

goodImage

protected boolean goodImage

completeImage

protected boolean completeImage

width

protected int width

height

protected int height

COMMENT

public static final String COMMENT
See Also:
Constant Field Values

COMMENT_BYTES

public static final String COMMENT_BYTES
See Also:
Constant Field Values
Constructor Detail

ImageRetriever

public ImageRetriever(String imagePath,
                      Object client)

ImageRetriever

public ImageRetriever(String imagePath,
                      Class resourceOwner,
                      Object client)

ImageRetriever

public ImageRetriever(URL imageURL,
                      Object client)

ImageRetriever

public ImageRetriever(Image image,
                      Object client)
Method Detail

getImageRetrieverForURL

public static ImageRetriever getImageRetrieverForURL(String imageURL,
                                                     Object client)

getImage

public Image getImage()

getPartialImage

public Image getPartialImage()

isGood

public boolean isGood()

isComplete

public boolean isComplete()

getWidth

public int getWidth()
Overrides:
getWidth in class Component

getHeight

public int getHeight()
Overrides:
getHeight in class Component

getSize

public Dimension getSize()
Overrides:
getSize in class Component

imageUpdate

public boolean imageUpdate(Image img,
                           int infoflags,
                           int x,
                           int y,
                           int w,
                           int h)
Specified by:
imageUpdate in interface ImageObserver
Overrides:
imageUpdate in class Component

run

public void run()
Specified by:
run in interface Runnable

get

public static Image get(String imagePath)

get

public static Image get(String imagePath,
                        Class resourceOwnerClass)

get

public static Image get(String imagePath,
                        Class resourceOwnerClass,
                        Object client)

get

public static Image get(String imagePath,
                        Class resourceOwnerClass,
                        Object client,
                        Map<String,Object> properties)

get

public static Image get(URL imageURL)

get

public static Image get(URL imageURL,
                        Object client)

getByURL

public static Image getByURL(String imageURL)

getByURL

public static Image getByURL(String imageURL,
                             Object client)

get

protected static Image get(Image image,
                           Object client)

getJPEGComment

public static byte[] getJPEGComment(byte[] imageBytes)

isGIF

public static boolean isGIF(byte[] imageBytes)

isJPEG

public static boolean isJPEG(byte[] imageBytes)

Sky View Café - Java