public abstract static class GlyphView.GlyphPainter extends Object
| Constructor and Description |
|---|
GlyphPainter()
|
| Modifier and Type | Method and Description |
|---|---|
abstract float |
getAscent(GlyphView
|
abstract int |
getBoundedPosition(GlyphView
Determines the model location that represents the maximum advance that fits within the given span.
|
abstract float |
getDescent(GlyphView
|
abstract float |
getHeight(GlyphView
|
int |
getNextVisualPositionFrom(GlyphView
Provides a way to determine the next visually represented model location that one might place a caret.
|
GlyphView |
getPainter(GlyphView
Create a painter to use for the given GlyphView.
|
abstract float |
getSpan(GlyphView
Determine the span the glyphs given a start location (for tab expansion).
|
abstract Shape |
modelToView(GlyphView
Provides a mapping from the document model coordinate space to the coordinate space of the view mapped to it.
|
abstract void |
paint(GlyphView
Paint the glyphs representing the given range.
|
abstract int |
viewToModel(GlyphView
Provides a mapping from the view coordinate space to the logical coordinate space of the model.
|
public abstract float getSpan(GlyphViewv, int p0, int p1, TabExpander e, float x)
public abstract float getHeight(GlyphViewv)
public abstract float getAscent(GlyphViewv)
public abstract float getDescent(GlyphViewv)
public abstract void paint(GlyphViewv, Graphics g, Shape a, int p0, int p1)
public abstract ShapemodelToView(GlyphView v, int pos, Position .Bias bias, Shape a) throws BadLocationException
v - the
GlyphView containing the destination coordinate space
pos - the position to convert
bias - either
Position.Bias.Forward or
Position.Bias.Backward
a - Bounds of the View
BadLocationException - if the given position does not represent a valid location in the associated document
View.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias)
public abstract int viewToModel(GlyphViewv, float x, float y, Shape a, Position .Bias [] biasReturn)
v - the
GlyphView to provide a mapping for
x - the X coordinate
y - the Y coordinate
a - the allocated region to render into
biasReturn - either
Position.Bias.Forward or
Position.Bias.Backward is returned as the zero-th element of this array
View.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
public abstract int getBoundedPosition(GlyphViewv, int p0, float x, float len)
v - the view to find the model location to break at.
p0 - the location in the model where the fragment should start it's representation >= 0.
x - the graphic location along the axis that the broken view would occupy >= 0. This may be useful for things like tab calculations.
len - specifies the distance into the view where a potential break is desired >= 0.
View.breakView(int, int, float, float)
public GlyphView.GlyphPainter getPainter(GlyphView v, int p0, int p1)
v - the
GlyphView to provide a painter for
p0 - the starting document offset >= 0
p1 - the ending document offset >= p0
public int getNextVisualPositionFrom(GlyphViewv, int pos, Position .Bias b, Shape a, int direction, Position .Bias [] biasRet) throws BadLocationException
v - the view to use
pos - the position to convert >= 0
b - either
Position.Bias.Forward or
Position.Bias.Backward
a - the allocated region to render into
direction - the direction from the current position that can be thought of as the arrow keys typically found on a keyboard. This may be SwingConstants.WEST, SwingConstants.EAST, SwingConstants.NORTH, or SwingConstants.SOUTH.
biasRet - either
Position.Bias.Forward or
Position.Bias.Backward is returned as the zero-th element of this array
BadLocationException -
IllegalArgumentException - for an invalid direction