org.apache.batik.gvt
Class MarkerShapePainter

java.lang.Object
  |
  +--org.apache.batik.gvt.MarkerShapePainter
All Implemented Interfaces:
ShapePainter

public class MarkerShapePainter
extends java.lang.Object
implements ShapePainter

A shape painter that can be used to paint markers on a shape.


Field Summary
protected  java.awt.Shape shape
          The Shape to be painted
 
Constructor Summary
MarkerShapePainter(java.awt.Shape shape)
          Constructs a new FillShapePainter that can be used to fill a Shape.
 
Method Summary
 ProxyGraphicsNode buildEndMarkerProxy()
          Builds a proxy GraphicsNode for the input Marker to be drawn at the end position
 ProxyGraphicsNode[] buildMiddleMarkerProxies()
          Builds a proxy GraphicsNode for the input Marker to be drawn at the middle positions
 ProxyGraphicsNode buildStartMarkerProxy()
          Builds a proxy GraphicsNode for the input Marker to be drawn at the start position
 Marker getEndMarker()
           
 Marker getMiddleMarker()
           
 java.awt.Shape getPaintedArea(GraphicsNodeRenderContext rc)
          Returns the area painted by this painter
 java.awt.Shape getShape()
          Gets the Shape this painter is associated with.
 Marker getStartMarker()
           
 void paint(java.awt.Graphics2D g2d, GraphicsNodeRenderContext ctx)
          Paints the specified shape using the specified Graphics2D and context.
 void setEndMarker(Marker endMarker)
           
 void setMiddleMarker(Marker middleMarker)
           
 void setShape(java.awt.Shape shape)
          Sets the Shape this painter is associated with.
 void setStartMarker(Marker startMarker)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shape

protected java.awt.Shape shape
The Shape to be painted
Constructor Detail

MarkerShapePainter

public MarkerShapePainter(java.awt.Shape shape)
Constructs a new FillShapePainter that can be used to fill a Shape.
Parameters:
shape - Shape to be painted by this painter. Should not be null
Method Detail

setStartMarker

public void setStartMarker(Marker startMarker)

setMiddleMarker

public void setMiddleMarker(Marker middleMarker)

setEndMarker

public void setEndMarker(Marker endMarker)

getStartMarker

public Marker getStartMarker()

getMiddleMarker

public Marker getMiddleMarker()

getEndMarker

public Marker getEndMarker()

buildStartMarkerProxy

public ProxyGraphicsNode buildStartMarkerProxy()
Builds a proxy GraphicsNode for the input Marker to be drawn at the start position

buildEndMarkerProxy

public ProxyGraphicsNode buildEndMarkerProxy()
Builds a proxy GraphicsNode for the input Marker to be drawn at the end position

buildMiddleMarkerProxies

public ProxyGraphicsNode[] buildMiddleMarkerProxies()
Builds a proxy GraphicsNode for the input Marker to be drawn at the middle positions

paint

public void paint(java.awt.Graphics2D g2d,
                  GraphicsNodeRenderContext ctx)
Paints the specified shape using the specified Graphics2D and context.
Specified by:
paint in interface ShapePainter
Parameters:
shape - the shape to paint
g2d - the Graphics2D to use
ctx - the render context to use

getPaintedArea

public java.awt.Shape getPaintedArea(GraphicsNodeRenderContext rc)
Returns the area painted by this painter
Specified by:
getPaintedArea in interface ShapePainter

setShape

public void setShape(java.awt.Shape shape)
Sets the Shape this painter is associated with.
Specified by:
setShape in interface ShapePainter
Parameters:
shape - new shape this painter should be associated with. should not be null.

getShape

public java.awt.Shape getShape()
Gets the Shape this painter is associated with.
Specified by:
getShape in interface ShapePainter
Returns:
shape associated with this Painter.


Copyright © 2001 Apache Software Foundation. All Rights Reserved.