Search this API

y.view
Class ViewCoordDrawableAdapter

java.lang.Object
  extended by y.view.ViewCoordDrawableAdapter
All Implemented Interfaces:
Drawable

public class ViewCoordDrawableAdapter
extends java.lang.Object
implements Drawable

A Drawable that serves as an adapter for another Drawable that uses the view coordinate space to render itself.

 

Field Summary
protected  Graph2DView view
           
protected  Drawable viewCoordDrawable
           
 
Constructor Summary
ViewCoordDrawableAdapter(Graph2DView view, Drawable viewCoordDrawable)
           
 
Method Summary
 java.awt.Rectangle getBounds()
          Translates the bounds returned by the Drawable delegate from view coordinate space to world coordinate space.
protected  java.awt.Rectangle getViewCoordinateDrawableBounds()
          Returns the bounds of the view coordinate Drawable
 void paint(java.awt.Graphics2D gfx)
          Puts the given graphics context into view coordinate space and invokes the paint method of the Drawable delegate.
protected  void paintViewCoordinateDrawable(java.awt.Graphics2D gfx)
          Paints the view coordinate Drawable
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

view

protected Graph2DView view

viewCoordDrawable

protected Drawable viewCoordDrawable
Constructor Detail

ViewCoordDrawableAdapter

public ViewCoordDrawableAdapter(Graph2DView view,
                                Drawable viewCoordDrawable)
Method Detail

getBounds

public java.awt.Rectangle getBounds()
Translates the bounds returned by the Drawable delegate from view coordinate space to world coordinate space.

Specified by:
getBounds in interface Drawable

paint

public void paint(java.awt.Graphics2D gfx)
Puts the given graphics context into view coordinate space and invokes the paint method of the Drawable delegate.

Specified by:
paint in interface Drawable

paintViewCoordinateDrawable

protected void paintViewCoordinateDrawable(java.awt.Graphics2D gfx)
Paints the view coordinate Drawable


getViewCoordinateDrawableBounds

protected java.awt.Rectangle getViewCoordinateDrawableBounds()
Returns the bounds of the view coordinate Drawable


© Copyright 2000-2022,
yWorks GmbH.
All rights reserved.