org.apache.batik.gvt
Interface TextPainter

All Known Implementing Classes:
BasicTextPainter

public interface TextPainter

Renders the attributed character iterator of a TextNode.


Method Summary
 java.awt.geom.Rectangle2D getBounds(TextNode node)
           
 java.awt.geom.Rectangle2D getDecoratedBounds(TextNode node)
           
 java.awt.Shape getDecoratedShape(TextNode node)
           
 java.awt.Shape getHighlightShape(Mark beginMark, Mark endMark)
           
 Mark getMark(TextNode node, int index, boolean beforeGlyph)
          Returns a mark for the char at index in node's AttributedCharacterIterator.
 java.awt.geom.Rectangle2D getPaintedBounds(TextNode node)
           
 int[] getSelected(Mark start, Mark finish)
           
 java.awt.Shape getShape(TextNode node)
           
 void paint(TextNode node, java.awt.Graphics2D g2d)
          Paints the specified attributed character iterator using the specified Graphics2D and context and font context.
 Mark selectAt(double x, double y, TextNode node)
          Initiates a text selection on a particular AttributedCharacterIterator, using the text/font metrics employed by this TextPainter instance.
 Mark selectFirst(TextNode node)
          Selects the first glyph in the text node.
 Mark selectLast(TextNode node)
          Selects the last glyph in the text node.
 Mark selectTo(double x, double y, Mark beginMark)
          Continues a text selection on a particular AttributedCharacterIterator, using the text/font metrics employed by this TextPainter instance.
 

Method Detail

paint

public void paint(TextNode node,
                  java.awt.Graphics2D g2d)
Paints the specified attributed character iterator using the specified Graphics2D and context and font context.
Parameters:
node - the TextNode to paint
g2d - the Graphics2D to use
context - the rendering context.

selectAt

public Mark selectAt(double x,
                     double y,
                     TextNode node)
Initiates a text selection on a particular AttributedCharacterIterator, using the text/font metrics employed by this TextPainter instance.

selectTo

public Mark selectTo(double x,
                     double y,
                     Mark beginMark)
Continues a text selection on a particular AttributedCharacterIterator, using the text/font metrics employed by this TextPainter instance.

selectFirst

public Mark selectFirst(TextNode node)
Selects the first glyph in the text node.

selectLast

public Mark selectLast(TextNode node)
Selects the last glyph in the text node.

getMark

public Mark getMark(TextNode node,
                    int index,
                    boolean beforeGlyph)
Returns a mark for the char at index in node's AttributedCharacterIterator. Leading edge indicates if the mark should be considered immediately 'before' glyph or after

getSelected

public int[] getSelected(Mark start,
                         Mark finish)

getHighlightShape

public java.awt.Shape getHighlightShape(Mark beginMark,
                                        Mark endMark)

getShape

public java.awt.Shape getShape(TextNode node)

getDecoratedShape

public java.awt.Shape getDecoratedShape(TextNode node)

getBounds

public java.awt.geom.Rectangle2D getBounds(TextNode node)

getDecoratedBounds

public java.awt.geom.Rectangle2D getDecoratedBounds(TextNode node)

getPaintedBounds

public java.awt.geom.Rectangle2D getPaintedBounds(TextNode node)


Copyright © 2001 Apache Software Foundation. All Rights Reserved.