public final class SyntaxView
extends javax.swing.text.PlainView
| Constructor and Description |
|---|
SyntaxView(javax.swing.text.Element elem)
Creates a new
SyntaxView for painting the specified element. |
| Modifier and Type | Method and Description |
|---|---|
void |
drawLine(int lineIndex,
java.awt.Graphics g,
int x,
int y)
Paints the specified line.
|
protected java.awt.Color |
getDefaultColor()
Return default foreground colour
|
java.awt.Rectangle |
lineToRect(java.awt.Shape a,
int aline)
redefined from PlainView private method to allow for redefinition of
modelToView method
|
java.awt.Shape |
modelToView(int pos,
java.awt.Shape a,
javax.swing.text.Position.Bias b)
Provides a mapping from the document model coordinate space to the
coordinate space of the view mapped to it.
|
float |
nextTabStop(float x,
int tabOffset)
Returns the next tab stop position after a given reference position.
|
int |
viewToModel(float fx,
float fy,
java.awt.Shape a,
javax.swing.text.Position.Bias[] bias)
Provides a mapping from the view coordinate space to the logical
coordinate space of the model.
|
changedUpdate, damageLineRange, drawSelectedText, drawUnselectedText, getLineBuffer, getPreferredSpan, getTabSize, insertUpdate, paint, removeUpdate, setSize, updateDamage, updateMetricsappend, breakView, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, updateChildren, updateLayout, viewToModelpublic SyntaxView(javax.swing.text.Element elem)
SyntaxView for painting the specified element.elem - The elementpublic void drawLine(int lineIndex,
java.awt.Graphics g,
int x,
int y)
drawLine in class javax.swing.text.PlainViewlineIndex - The line numberg - The graphics contextx - The x co-ordinate where the line should be paintedy - The y co-ordinate where the line should be paintedpublic java.awt.Rectangle lineToRect(java.awt.Shape a,
int aline)
lineToRect in class javax.swing.text.PlainViewa - DOCUMENT ME!aline - DOCUMENT ME!public java.awt.Shape modelToView(int pos,
java.awt.Shape a,
javax.swing.text.Position.Bias b)
throws javax.swing.text.BadLocationException
modelToView in class javax.swing.text.PlainViewpos - the position to convert >= 0a - the allocated region to render intob - DOCUMENT ME!javax.swing.text.BadLocationException - if the given position does not represent a valid location
in the associated documentView#modelToViewpublic float nextTabStop(float x,
int tabOffset)
nextTabStop in interface javax.swing.text.TabExpandernextTabStop in class javax.swing.text.PlainViewx - the current position >= 0tabOffset - the position within the text stream that the tab occurred at
>= 0.public int viewToModel(float fx,
float fy,
java.awt.Shape a,
javax.swing.text.Position.Bias[] bias)
viewToModel in class javax.swing.text.PlainViewfx - the X coordinate >= 0fy - the Y coordinate >= 0a - the allocated region to render intobias - DOCUMENT ME!View#viewToModelprotected java.awt.Color getDefaultColor()