Class XMLView
- java.lang.Object
-
- javax.swing.text.View
-
- javax.swing.text.PlainView
-
- org.apache.batik.util.gui.xmleditor.XMLView
-
- All Implemented Interfaces:
javax.swing.SwingConstants,javax.swing.text.TabExpander
public class XMLView extends javax.swing.text.PlainViewView that uses the lexical information to determine the style characteristics of the text that it renders. This simply colorizes the various tokens and assumes a constant font family and size.- Version:
- $Id: XMLView.java 1733416 2016-03-03 07:07:13Z gadams $
-
-
Field Summary
Fields Modifier and Type Field Description protected XMLContextcontextprotected XMLScannerlexerprotected inttabSize
-
Constructor Summary
Constructors Constructor Description XMLView(XMLContext context, javax.swing.text.Element elem)Construct a simple colorized view of XML text.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected intdrawUnselectedText(java.awt.Graphics g, int x, int y, int p0, int p1)intgetTabSize()-
Methods inherited from class javax.swing.text.PlainView
changedUpdate, damageLineRange, drawLine, drawLine, drawSelectedText, drawSelectedText, drawUnselectedText, getLineBuffer, getPreferredSpan, insertUpdate, lineToRect, modelToView, nextTabStop, paint, removeUpdate, setSize, updateDamage, 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
-
context
protected XMLContext context
-
lexer
protected XMLScanner lexer
-
tabSize
protected int tabSize
-
-
Constructor Detail
-
XMLView
public XMLView(XMLContext context, javax.swing.text.Element elem)
Construct a simple colorized view of XML text.
-
-
Method Detail
-
getTabSize
public int getTabSize()
- Overrides:
getTabSizein classjavax.swing.text.PlainView
-
drawUnselectedText
protected int drawUnselectedText(java.awt.Graphics g, int x, int y, int p0, int p1) throws javax.swing.text.BadLocationException- Overrides:
drawUnselectedTextin classjavax.swing.text.PlainView- Throws:
javax.swing.text.BadLocationException
-
-