|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.view.YRenderingHints
public class YRenderingHints
Provides rendering hint keys whose associated values may be interpreted by
NodeRealizer, EdgeRealizer and other objects that are drawn
within a Graph2DView.
![]() |
![]() |
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static interface |
YRenderingHints.AntiAliasingHandler
Specifies the contract for KEY_ANTIALIASING_HANDLER hint values. |
| Field Summary | |
|---|---|
static java.awt.RenderingHints.Key |
GRAPHICS_CONTEXT_KEY
A key whose associated value must be of type GraphicsContext. |
static java.awt.RenderingHints.Key |
KEY_ANTIALIASING_HANDLER
Anti-aliasing handler hint key. |
static java.awt.RenderingHints.Key |
KEY_EDGE_LABEL_PAINTING
Edge label painting hint key. |
static java.awt.RenderingHints.Key |
KEY_GRADIENT_PAINTING
Gradient painting hint key. |
static java.awt.RenderingHints.Key |
KEY_GROUP_STATE_PAINTING
Group state painting hint key. |
static java.awt.RenderingHints.Key |
KEY_NODE_LABEL_PAINTING
Node label painting hint key. |
static java.awt.RenderingHints.Key |
KEY_NODE_PORT_PAINTING
Node port painting hint key. |
static java.awt.RenderingHints.Key |
KEY_SELECTION_PAINTING
Selection painting hint key. |
static java.awt.RenderingHints.Key |
KEY_SHADOW_PAINTING
Shadow painting hint key. |
static java.awt.RenderingHints.Key |
KEY_SLOPPY_POLYLINE_PAINTING
Sloppy polyline hint key. |
static java.awt.RenderingHints.Key |
PAINT_DETAIL_THRESHOLD_KEY
A key whose associated value must be of type Double. |
static java.lang.Object |
VALUE_ANTIALIASING_HANDLER_DESKTOP
Anti-aliasing handler hint value --- sets the standard anti-aliasing hint and
the awt.font.desktophints of the given graphics context's
associated GraphicsDevice instance. |
static java.lang.Object |
VALUE_EDGE_LABEL_PAINTING_DEFAULT
Edge label painting hint value --- rendering takes labels into account depending on rendering mode. |
static java.lang.Object |
VALUE_EDGE_LABEL_PAINTING_OFF
Edge label painting hint value --- rendering ignores labels. |
static java.lang.Object |
VALUE_EDGE_LABEL_PAINTING_ON
Edge label painting hint value --- rendering takes labels into account. |
static java.lang.Object |
VALUE_GRADIENT_PAINTING_OFF
Gradient painting hint value --- rendering uses a single color instead of gradient paints. |
static java.lang.Object |
VALUE_GROUP_STATE_PAINTING_DEFAULT
Group state painting hint value --- a state icon is rendered depending on rendering mode. |
static java.lang.Object |
VALUE_GROUP_STATE_PAINTING_OFF
Group state painting hint value --- no state icon is rendered. |
static java.lang.Object |
VALUE_GROUP_STATE_PAINTING_ON
Group state painting hint value --- a state icon is rendered. |
static java.lang.Object |
VALUE_NODE_LABEL_PAINTING_DEFAULT
Node label painting hint value --- rendering takes labels into account depending on rendering mode. |
static java.lang.Object |
VALUE_NODE_LABEL_PAINTING_OFF
Node label painting hint value --- rendering ignores labels. |
static java.lang.Object |
VALUE_NODE_LABEL_PAINTING_ON
Node label painting hint value --- rendering takes labels into account. |
static java.lang.Object |
VALUE_NODE_PORT_PAINTING_DEFAULT
Node port painting hint value --- rendering takes ports into account depending on rendering mode. |
static java.lang.Object |
VALUE_NODE_PORT_PAINTING_OFF
Node port painting hint value --- rendering ignores ports. |
static java.lang.Object |
VALUE_NODE_PORT_PAINTING_ON
Node port painting hint value --- rendering takes ports into account. |
static java.lang.Object |
VALUE_SELECTION_PAINTING_OFF
Selection painting hint value --- rendering ignores the selection states of graph elements. |
static java.lang.Object |
VALUE_SHADOW_PAINTING_OFF
Shadow painting hint value --- no shadows are rendered.. |
static java.lang.Object |
VALUE_SLOPPY_POLYLINE_PAINTING_OFF
Sloppy polyline painting hint value --- edges in sloppy mode will be rendered as in normal mode |
| Method Summary | |
|---|---|
static GraphicsContext |
getGraphicsContext(java.awt.Graphics2D g)
Convenience method that tries to retrieve the GraphicsContext
from the given graphics object. |
static boolean |
isGradientPaintingEnabled(java.awt.Graphics2D g)
Returns whether the rendering onto the specified graphics context should use gradient paints or single colors only. |
static boolean |
isSelectionPaintingEnabled(java.awt.Graphics2D g)
Returns whether or not rendering onto the specified graphics context should take the selection states of the graph elements being painted into account. |
static boolean |
isShadowPaintingEnabled(java.awt.Graphics2D g)
Returns whether or not shadows should be rendered onto the specified graphics. |
static boolean |
isSloppyPolylinePaintingEnabled(java.awt.Graphics2D g)
Returns whether or not sloppy mode renders edges as polylines onto the specified graphics context. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.awt.RenderingHints.Key KEY_SELECTION_PAINTING
SELECTION_PAINTING hint controls whether or not
selection states are taken into account when rendering graph elements.
The key's associated value must be either null or
VALUE_SELECTION_PAINTING_OFF.
If the associated value is VALUE_SELECTION_PAINTING_OFF,
rendering ignores the selection states of graph elements.
VALUE_SELECTION_PAINTING_OFF,
isSelectionPaintingEnabled(java.awt.Graphics2D)public static final java.lang.Object VALUE_SELECTION_PAINTING_OFF
KEY_SELECTION_PAINTING,
isSelectionPaintingEnabled(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_EDGE_LABEL_PAINTING
EDGE_LABEL_PAINTING hint controls whether or not
labels associated to an edge are rendered.
The key's associated value must be one of
VALUE_EDGE_LABEL_PAINTING_DEFAULT,
VALUE_EDGE_LABEL_PAINTING_ON,
VALUE_EDGE_LABEL_PAINTING_OFFpublic static final java.lang.Object VALUE_EDGE_LABEL_PAINTING_DEFAULT
paint calls paintLabels but
paintSloppy does not.
KEY_EDGE_LABEL_PAINTING,
EdgeRealizer.paint(java.awt.Graphics2D),
EdgeRealizer.paintSloppy(java.awt.Graphics2D),
EdgeRealizer.paintLabels(java.awt.Graphics2D)public static final java.lang.Object VALUE_EDGE_LABEL_PAINTING_ON
paint and paintSloppy call
paintLabels.
KEY_EDGE_LABEL_PAINTING,
EdgeRealizer.paint(java.awt.Graphics2D),
EdgeRealizer.paintSloppy(java.awt.Graphics2D),
EdgeRealizer.paintLabels(java.awt.Graphics2D)public static final java.lang.Object VALUE_EDGE_LABEL_PAINTING_OFF
paint nor paintSloppy calls
paintLabels.
KEY_EDGE_LABEL_PAINTING,
EdgeRealizer.paint(java.awt.Graphics2D),
EdgeRealizer.paintSloppy(java.awt.Graphics2D),
EdgeRealizer.paintLabels(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_NODE_LABEL_PAINTING
NODE_LABEL_PAINTING hint controls whether or not
labels associated to a node are rendered.
The key's associated value must be one of
VALUE_NODE_LABEL_PAINTING_DEFAULT,
VALUE_NODE_LABEL_PAINTING_ON,
VALUE_NODE_LABEL_PAINTING_OFFpublic static final java.lang.Object VALUE_NODE_LABEL_PAINTING_DEFAULT
paint calls paintText but
paintSloppy does not.
KEY_NODE_LABEL_PAINTING,
NodeRealizer.paint(java.awt.Graphics2D),
NodeRealizer.paintSloppy(java.awt.Graphics2D),
NodeRealizer.paintText(java.awt.Graphics2D)public static final java.lang.Object VALUE_NODE_LABEL_PAINTING_ON
paint and paintSloppy call
paintText.
KEY_NODE_LABEL_PAINTING,
NodeRealizer.paint(java.awt.Graphics2D),
NodeRealizer.paintSloppy(java.awt.Graphics2D),
NodeRealizer.paintText(java.awt.Graphics2D)public static final java.lang.Object VALUE_NODE_LABEL_PAINTING_OFF
paint nor paintSloppy calls
paintText.
KEY_NODE_LABEL_PAINTING,
NodeRealizer.paint(java.awt.Graphics2D),
NodeRealizer.paintSloppy(java.awt.Graphics2D),
NodeRealizer.paintText(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_NODE_PORT_PAINTING
NODE_PORT_PAINTING hint controls whether or not
node ports associated to a node are rendered.
The key's associated value must be one of
VALUE_NODE_PORT_PAINTING_DEFAULT,
VALUE_NODE_PORT_PAINTING_ON,
VALUE_NODE_PORT_PAINTING_OFFpublic static final java.lang.Object VALUE_NODE_PORT_PAINTING_DEFAULT
paint calls paintPorts but
paintSloppy does not.
KEY_NODE_PORT_PAINTING,
NodeRealizer.paint(java.awt.Graphics2D),
NodeRealizer.paintSloppy(java.awt.Graphics2D),
NodeRealizer.paintPorts(java.awt.Graphics2D)public static final java.lang.Object VALUE_NODE_PORT_PAINTING_ON
paint and paintSloppy call
paintPorts.
KEY_NODE_PORT_PAINTING,
NodeRealizer.paint(java.awt.Graphics2D),
NodeRealizer.paintSloppy(java.awt.Graphics2D),
NodeRealizer.paintPorts(java.awt.Graphics2D)public static final java.lang.Object VALUE_NODE_PORT_PAINTING_OFF
paint nor paintSloppy calls
paintPorts.
KEY_NODE_PORT_PAINTING,
NodeRealizer.paint(java.awt.Graphics2D),
NodeRealizer.paintSloppy(java.awt.Graphics2D),
NodeRealizer.paintPorts(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_GROUP_STATE_PAINTING
GROUP_STATE_PAINTING hint controls whether or not
GroupNodeRealizer and
GroupNodePainter will paint a state icon
that symbolizes whether a group or a folder node is displayed.
The key's associated value must be one of
VALUE_GROUP_STATE_PAINTING_DEFAULT,
VALUE_GROUP_STATE_PAINTING_ON,
VALUE_GROUP_STATE_PAINTING_OFFpublic static final java.lang.Object VALUE_GROUP_STATE_PAINTING_DEFAULT
KEY_GROUP_STATE_PAINTING,
GroupNodeRealizer.paintGroupState(java.awt.Graphics2D, boolean),
GroupNodePainter.paintGroupState(NodeRealizer, java.awt.Graphics2D, boolean)public static final java.lang.Object VALUE_GROUP_STATE_PAINTING_ON
KEY_GROUP_STATE_PAINTING,
GroupNodeRealizer.paintGroupState(java.awt.Graphics2D, boolean),
GroupNodePainter.paintGroupState(NodeRealizer, java.awt.Graphics2D, boolean)public static final java.lang.Object VALUE_GROUP_STATE_PAINTING_OFF
KEY_GROUP_STATE_PAINTING,
GroupNodeRealizer.paintGroupState(java.awt.Graphics2D, boolean),
GroupNodePainter.paintGroupState(NodeRealizer, java.awt.Graphics2D, boolean)public static final java.awt.RenderingHints.Key KEY_GRADIENT_PAINTING
GRADIENT_PAINTING hint controls whether or not
rendering supports gradient paints.
The key's associated value must be either null or
VALUE_GRADIENT_PAINTING_OFF.
If the associated value is VALUE_GRADIENT_PAINTING_OFF,
rendering uses a single color instead of gradient paints.
VALUE_GRADIENT_PAINTING_OFF,
isGradientPaintingEnabled(java.awt.Graphics2D)public static final java.lang.Object VALUE_GRADIENT_PAINTING_OFF
KEY_GRADIENT_PAINTING,
isGradientPaintingEnabled(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_SHADOW_PAINTING
SHADOW_PAINTING hint controls whether or not
shadows are rendered.
The key's associated value must be either null or
VALUE_SHADOW_PAINTING_OFF.
If the associated value is VALUE_SHADOW_PAINTING_OFF,
no shadows are rendered.
VALUE_SHADOW_PAINTING_OFF,
isShadowPaintingEnabled(java.awt.Graphics2D)public static final java.lang.Object VALUE_SHADOW_PAINTING_OFF
KEY_SHADOW_PAINTING,
isShadowPaintingEnabled(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_SLOPPY_POLYLINE_PAINTING
SLOPPY_POLYLINE_PAINTING hint controls whether or not
edges are rendered as polylines in sloppy mode.
The key's associated value must be either null or VALUE_SLOPPY_POLYLINE_PAINTING_OFF.
If the associated value is VALUE_SLOPPY_POLYLINE_PAINTING_OFF, edges will rendered as in
normal mode.
VALUE_SLOPPY_POLYLINE_PAINTING_OFF,
isSloppyPolylinePaintingEnabled(java.awt.Graphics2D)public static final java.lang.Object VALUE_SLOPPY_POLYLINE_PAINTING_OFF
KEY_SLOPPY_POLYLINE_PAINTING,
isSloppyPolylinePaintingEnabled(java.awt.Graphics2D)public static final java.awt.RenderingHints.Key KEY_ANTIALIASING_HANDLER
null or an instance
of YRenderingHints.AntiAliasingHandler.
If the associated value is an instance of
AntiAliasingHandler, the instance's
setRenderingHints
method is called when painting the contents of a Graph2DView
instance.
Client code should add this rendering hint to a Graph2DView's set
of default rendering hints.
VALUE_ANTIALIASING_HANDLER_DESKTOP,
Graph2DView.setRenderingHints(java.awt.RenderingHints),
Graph2DView.setRenderingHints(java.awt.Graphics2D)public static final java.lang.Object VALUE_ANTIALIASING_HANDLER_DESKTOP
standard anti-aliasing hint and
the awt.font.desktophints of the given graphics context's
associated GraphicsDevice instance.
See
AWT Desktop Properties
for details.
Client code should add this rendering hint to a Graph2DView's set
of default rendering hints.
KEY_ANTIALIASING_HANDLER,
Graph2DView.setRenderingHints(java.awt.RenderingHints)public static final java.awt.RenderingHints.Key PAINT_DETAIL_THRESHOLD_KEY
Graph2DView.setPaintDetailThreshold(double)public static final java.awt.RenderingHints.Key GRAPHICS_CONTEXT_KEY
GraphicsContext.
Graph2DView will register this hint to the Graphics2D
instance during rendering.
GraphicsContext,
Graph2DView.createGraphicsContext(),
getGraphicsContext(java.awt.Graphics2D)| Method Detail |
|---|
public static GraphicsContext getGraphicsContext(java.awt.Graphics2D g)
GraphicsContext
from the given graphics object.
This is done via the GRAPHICS_CONTEXT_KEY.
g - The graphics object to retrieve the context for.
null if none was associated with the context.public static boolean isSelectionPaintingEnabled(java.awt.Graphics2D g)
g - the graphics context to paint upon.
true if the selection states of graph elements
have to be taken into account; false otherwise.KEY_SELECTION_PAINTING,
VALUE_SELECTION_PAINTING_OFFpublic static boolean isGradientPaintingEnabled(java.awt.Graphics2D g)
g - the graphics context to paint upon.
false if flat colors should be used instead of
gradient paints; true otherwise.KEY_GRADIENT_PAINTING,
VALUE_GRADIENT_PAINTING_OFFpublic static boolean isShadowPaintingEnabled(java.awt.Graphics2D g)
g - the graphics context to paint upon.
true if shadows should be rendered;
false otherwise.KEY_SHADOW_PAINTING,
VALUE_SHADOW_PAINTING_OFFpublic static boolean isSloppyPolylinePaintingEnabled(java.awt.Graphics2D g)
g - the graphics context to paint upon.
true if edges are rendered as polylines in sloppy mode, false otherwise.KEY_SLOPPY_POLYLINE_PAINTING,
VALUE_SLOPPY_POLYLINE_PAINTING_OFF
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||