org.jdrawing
Class DefaultDrawingModelCache

java.lang.Object
  extended byorg.jdrawing.AbstractDrawingModelCache
      extended byorg.jdrawing.DefaultDrawingModelCache
All Implemented Interfaces:
DrawingModelCache, DrawingModelListener, java.util.EventListener

public class DefaultDrawingModelCache
extends AbstractDrawingModelCache

Default implementation of DrawingModelCache interface. This implementation does not do any optimizations.


Constructor Summary
DefaultDrawingModelCache()
           
 
Method Summary
 java.lang.Object[] getElementsForPoint(java.awt.geom.Point2D point)
          Returns elements which contains a given point.
 java.lang.Object[] getElementsForRectangle(java.awt.geom.Rectangle2D rectangle)
          Returns elements neccessary for repainting given area.
 java.awt.geom.Rectangle2D getModelBounds2D()
          Returns the high precision bounding box of all elements of the model.
 
Methods inherited from class org.jdrawing.AbstractDrawingModelCache
addDrawingModelCacheListener, elementsAdded, elementsChanged, elementsRemoved, fireAreaChanged, fireDrawingChanged, getDrawingModelCacheListeners, getElementRenderer, getModel, getModelBounds, modelChanged, removeDrawingModelCacheListener, setElementRenderer, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultDrawingModelCache

public DefaultDrawingModelCache()
Method Detail

getModelBounds2D

public java.awt.geom.Rectangle2D getModelBounds2D()
Returns the high precision bounding box of all elements of the model.

Returns:
the high precision bounding box of all elements of the model

getElementsForRectangle

public java.lang.Object[] getElementsForRectangle(java.awt.geom.Rectangle2D rectangle)
Returns elements neccessary for repainting given area. Elements are returned in order suitable for painting.

Parameters:
rectangle - area that will be repainted
Returns:
elements neccessary for repainting

getElementsForPoint

public java.lang.Object[] getElementsForPoint(java.awt.geom.Point2D point)
Returns elements which contains a given point. Elements are returned in order, suitable for painting.

Parameters:
point - the Point2D
Returns:
elements containing given point