y.view
Class YRenderingHints

java.lang.Object
  extended by y.view.YRenderingHints

public class YRenderingHints
extends Object

Provides rendering hint keys whose associated values may be interpreted by NodeRealizer, EdgeRealizer and other objects that are drawn within a Graph2DView..

 

Field Summary
static RenderingHints.Key GRAPHICS_CONTEXT_KEY
          A key whose associated value must be of type GraphicsContext.
static RenderingHints.Key PAINT_DETAIL_THRESHOLD_KEY
          A key whose associated value must be of type Double.
 
Method Summary
static GraphicsContext getGraphicsContext(Graphics2D g)
          Convenience method that tries to retrieve the GraphicsContext from the given graphics object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PAINT_DETAIL_THRESHOLD_KEY

public static final RenderingHints.Key PAINT_DETAIL_THRESHOLD_KEY
A key whose associated value must be of type Double. The value is interpreted as a threshold value of the graphics context scale value. If the actual scale value is smaller than the threshold then the client is requested to draw in an inexpensive less detailed mode. Otherwise the client is requested to draw in normal mode.

See Also:
Graph2DView.setPaintDetailThreshold(double)

GRAPHICS_CONTEXT_KEY

public static final RenderingHints.Key GRAPHICS_CONTEXT_KEY
A key whose associated value must be of type GraphicsContext. Graph2DView will register this hint to the Graphics2D instance during rendering.

See Also:
GraphicsContext, Graph2DView.createGraphicsContext(), getGraphicsContext(java.awt.Graphics2D)
Method Detail

getGraphicsContext

public static GraphicsContext getGraphicsContext(Graphics2D g)
Convenience method that tries to retrieve the GraphicsContext from the given graphics object. This is done via the GRAPHICS_CONTEXT_KEY.

Parameters:
g - The graphics object to retrieve the context for.
Returns:
The context or null if none was associated with the context.

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