public class AxisRenderer extends AbstractShapeRenderer
m_manageBounds, m_transform, RENDER_TYPE_DRAW, RENDER_TYPE_DRAW_AND_FILL, RENDER_TYPE_FILL, RENDER_TYPE_NONE
DEFAULT_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, setRenderType
public 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)
AbstractShapeRenderer
getRawShape
in class AbstractShapeRenderer
item
- the VisualItem being drawnAbstractShapeRenderer.getRawShape(prefuse.visual.VisualItem)
public void render(java.awt.Graphics2D g, VisualItem item)
Renderer
render
in interface Renderer
render
in class AbstractShapeRenderer
g
- 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)
Renderer
locatePoint
in interface Renderer
locatePoint
in class AbstractShapeRenderer
p
- 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)
Renderer
setBounds
in interface Renderer
setBounds
in class AbstractShapeRenderer
item
- the item to compute the bounding box forRenderer.setBounds(prefuse.visual.VisualItem)
Copyright ? 2013 Regents of the University of California