public class AxisRenderer extends AbstractShapeRenderer
m_manageBounds, m_transform, RENDER_TYPE_DRAW, RENDER_TYPE_DRAW_AND_FILL, RENDER_TYPE_FILL, RENDER_TYPE_NONEDEFAULT_GRAPHICS| Constructor and Description |
|---|
AxisRenderer()
Create a new AxisRenderer.
|
AxisRenderer(int xAlign,
int yAlign)
Create a new AxisRenderer.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.awt.Shape |
getRawShape(VisualItem item)
Return a non-transformed shape for the visual representation of the
item.
|
boolean |
locatePoint(java.awt.geom.Point2D p,
VisualItem item)
Returns true if the Point is located inside the extents of the item.
|
void |
render(java.awt.Graphics2D g,
VisualItem item)
Render item into a Graphics2D context.
|
void |
setBounds(VisualItem item)
Calculates and sets the bounding rectangle for an item.
|
void |
setHorizontalAlignment(int xAlign)
Set the horizontal alignment of axis labels.
|
void |
setVerticalAlignment(int yAlign)
Set the vertical alignment of axis labels.
|
drawShape, getRenderType, getShape, getStroke, getTransform, setManageBounds, setRenderTypepublic AxisRenderer()
public AxisRenderer(int xAlign,
int yAlign)
xAlign - the horizontal alignment for the axis label. One of
Constants.LEFT, Constants.RIGHT,
or Constants.CENTER.yAlign - the vertical alignment for the axis label. One of
Constants.TOP, Constants.BOTTOM,
or Constants.CENTER.public void setHorizontalAlignment(int xAlign)
xAlign - the horizontal alignment for the axis label. One of
Constants.LEFT, Constants.RIGHT,
or Constants.CENTER.public void setVerticalAlignment(int yAlign)
yAlign - the vertical alignment for the axis label. One of
Constants.TOP, Constants.BOTTOM,
or Constants.CENTER.protected java.awt.Shape getRawShape(VisualItem item)
AbstractShapeRenderergetRawShape in class AbstractShapeRendereritem - the VisualItem being drawnAbstractShapeRenderer.getRawShape(prefuse.visual.VisualItem)public void render(java.awt.Graphics2D g,
VisualItem item)
Rendererrender in interface Rendererrender in class AbstractShapeRendererg - the Graphics2D contextitem - the visual item to drawRenderer.render(java.awt.Graphics2D, prefuse.visual.VisualItem)public boolean locatePoint(java.awt.geom.Point2D p,
VisualItem item)
RendererlocatePoint in interface RendererlocatePoint in class AbstractShapeRendererp - the point to test for containmentitem - the item to test containment againstRenderer.locatePoint(java.awt.geom.Point2D, prefuse.visual.VisualItem)public void setBounds(VisualItem item)
RenderersetBounds in interface RenderersetBounds in class AbstractShapeRendereritem - the item to compute the bounding box forRenderer.setBounds(prefuse.visual.VisualItem)