Package jsyntaxpane
Class SyntaxView
- java.lang.Object
-
- javax.swing.text.View
-
- javax.swing.text.PlainView
-
- jsyntaxpane.SyntaxView
-
- All Implemented Interfaces:
javax.swing.SwingConstants
,javax.swing.text.TabExpander
public class SyntaxView extends javax.swing.text.PlainView
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROPERTY_RIGHT_MARGIN_COLOR
static java.lang.String
PROPERTY_RIGHT_MARGIN_COLUMN
static java.lang.String
PROPERTY_SINGLE_COLOR_SELECT
-
Constructor Summary
Constructors Constructor Description SyntaxView(javax.swing.text.Element element, Configuration config)
Construct a new view using the given configuration and prefix given
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 o nthe 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, drawLine, drawSelectedText, drawUnselectedText, 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
-
-
-
-
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 classjavax.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 classjavax.swing.text.PlainView
- Throws:
javax.swing.text.BadLocationException
-
setRenderingHits
public static void setRenderingHits(java.awt.Graphics2D g2d)
Sets the Rendering Hints o nthe 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 classjavax.swing.text.PlainView
-
-