jsyntaxpane
Class SyntaxView

java.lang.Object
  extended by javax.swing.text.View
      extended by javax.swing.text.PlainView
          extended by jsyntaxpane.SyntaxView
All Implemented Interfaces:
javax.swing.SwingConstants, javax.swing.text.TabExpander

public class SyntaxView
extends javax.swing.text.PlainView


Field Summary
static java.lang.String PROPERTY_RIGHT_MARGIN_COLOR
           
static java.lang.String PROPERTY_RIGHT_MARGIN_COLUMN
           
static java.lang.String PROPERTY_SINGLE_COLOR_SELECT
           
 
Fields inherited from class javax.swing.text.PlainView
metrics
 
Fields inherited from class javax.swing.text.View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS
 
Fields inherited from interface javax.swing.SwingConstants
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST
 
Constructor Summary
SyntaxView(javax.swing.text.Element element, Configuration config)
          Construct a new view using the given configuration and prefix given
 
Method Summary
protected  int drawSelectedText(java.awt.Graphics graphics, int x, int y, int p0, int p1)
           
protected  int drawUnselectedText(java.awt.Graphics graphics, int x, int y, int p0, int p1)
           
static void setRenderingHits(java.awt.Graphics2D g2d)
          Sets the Rendering Hints of the Graphics.
protected  void updateDamage(javax.swing.event.DocumentEvent changes, java.awt.Shape a, javax.swing.text.ViewFactory f)
           
 
Methods inherited from class javax.swing.text.PlainView
changedUpdate, damageLineRange, drawLine, getLineBuffer, getPreferredSpan, getTabSize, insertUpdate, lineToRect, modelToView, nextTabStop, paint, removeUpdate, setSize, updateMetrics, viewToModel
 
Methods inherited from class javax.swing.text.View
append, 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, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROPERTY_RIGHT_MARGIN_COLOR

public static final java.lang.String PROPERTY_RIGHT_MARGIN_COLOR
See Also:
Constant Field Values

PROPERTY_RIGHT_MARGIN_COLUMN

public static final java.lang.String PROPERTY_RIGHT_MARGIN_COLUMN
See Also:
Constant Field Values

PROPERTY_SINGLE_COLOR_SELECT

public static final java.lang.String PROPERTY_SINGLE_COLOR_SELECT
See Also:
Constant Field Values
Constructor Detail

SyntaxView

public SyntaxView(javax.swing.text.Element element,
                  Configuration config)
Construct a new view using the given configuration and prefix given

Parameters:
element -
config -
Method Detail

drawUnselectedText

protected int drawUnselectedText(java.awt.Graphics graphics,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
Overrides:
drawUnselectedText in class javax.swing.text.PlainView

drawSelectedText

protected int drawSelectedText(java.awt.Graphics graphics,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws javax.swing.text.BadLocationException
Overrides:
drawSelectedText in class javax.swing.text.PlainView
Throws:
javax.swing.text.BadLocationException

setRenderingHits

public static void setRenderingHits(java.awt.Graphics2D g2d)
Sets the Rendering Hints of the Graphics. This is used so that any painters can set the Rendering Hits to match the view.

Parameters:
g2d -

updateDamage

protected void updateDamage(javax.swing.event.DocumentEvent changes,
                            java.awt.Shape a,
                            javax.swing.text.ViewFactory f)
Overrides:
updateDamage in class javax.swing.text.PlainView