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.StringPROPERTY_RIGHT_MARGIN_COLORstatic java.lang.StringPROPERTY_RIGHT_MARGIN_COLUMNstatic java.lang.StringPROPERTY_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 intdrawSelectedText(java.awt.Graphics graphics, int x, int y, int p0, int p1)protected intdrawUnselectedText(java.awt.Graphics graphics, int x, int y, int p0, int p1)static voidsetRenderingHits(java.awt.Graphics2D g2d)Sets the Rendering Hints o nthe Graphics.protected voidupdateDamage(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:
drawUnselectedTextin 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:
drawSelectedTextin 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:
updateDamagein classjavax.swing.text.PlainView
-
-