JHotDraw 6.0b1

org.jhotdraw.contrib.zoom
Class DoubleBufferImage

java.lang.Object
  extended by java.awt.Image
      extended by org.jhotdraw.contrib.zoom.DoubleBufferImage

public class DoubleBufferImage
extends java.awt.Image

A DoubleBufferImage is an image that scaling components, such as a ZoomDrawingView, use for double buffering. Drawing into this image is scaled, but when the image is written to the screen, no more scaling occurs. This is ensured by the implementation here and by the corresponding drawImage methods in ScalingGraphics. Note: this class is only needed for a JDK1.1 compliant implementation


Field Summary
 
Fields inherited from class java.awt.Image
accelerationPriority, SCALE_AREA_AVERAGING, SCALE_DEFAULT, SCALE_FAST, SCALE_REPLICATE, SCALE_SMOOTH, UndefinedProperty
 
Constructor Summary
DoubleBufferImage(java.awt.Image newReal, double newScale)
           
 
Method Summary
 void flush()
           
 java.awt.Graphics getGraphics()
           
 int getHeight(java.awt.image.ImageObserver observer)
           
 java.lang.Object getProperty(java.lang.String name, java.awt.image.ImageObserver observer)
           
 java.awt.Image getRealImage()
           
 java.awt.Image getScaledInstance(int width, int height, int hints)
           
 java.awt.image.ImageProducer getSource()
           
 int getWidth(java.awt.image.ImageObserver observer)
           
 
Methods inherited from class java.awt.Image
getAccelerationPriority, getCapabilities, setAccelerationPriority
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoubleBufferImage

public DoubleBufferImage(java.awt.Image newReal,
                         double newScale)
Method Detail

getRealImage

public java.awt.Image getRealImage()

flush

public void flush()
Specified by:
flush in class java.awt.Image

getGraphics

public java.awt.Graphics getGraphics()
Specified by:
getGraphics in class java.awt.Image

getHeight

public int getHeight(java.awt.image.ImageObserver observer)
Specified by:
getHeight in class java.awt.Image

getProperty

public java.lang.Object getProperty(java.lang.String name,
                                    java.awt.image.ImageObserver observer)
Specified by:
getProperty in class java.awt.Image

getScaledInstance

public java.awt.Image getScaledInstance(int width,
                                        int height,
                                        int hints)
Overrides:
getScaledInstance in class java.awt.Image

getSource

public java.awt.image.ImageProducer getSource()
Specified by:
getSource in class java.awt.Image

getWidth

public int getWidth(java.awt.image.ImageObserver observer)
Specified by:
getWidth in class java.awt.Image

JHotDraw 6.0b1