Class XMLView
java.lang.Object
javax.swing.text.View
javax.swing.text.PlainView
org.apache.batik.util.gui.xmleditor.XMLView
- All Implemented Interfaces:
SwingConstants, TabExpander
View 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$
-
Field Summary
FieldsFields inherited from class View
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISFields inherited from interface 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
ConstructorsConstructorDescriptionXMLView(XMLContext context, Element elem) Construct a simple colorized view of XML text. -
Method Summary
Modifier and TypeMethodDescriptionprotected intdrawUnselectedText(Graphics g, int x, int y, int p0, int p1) intMethods inherited from class PlainView
changedUpdate, damageLineRange, drawLine, drawLine, drawSelectedText, drawSelectedText, drawUnselectedText, getLineBuffer, getPreferredSpan, insertUpdate, lineToRect, modelToView, nextTabStop, paint, removeUpdate, setSize, updateDamage, updateMetrics, viewToModelMethods inherited from class 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 Details
-
context
-
lexer
-
tabSize
protected int tabSize
-
-
Constructor Details
-
XMLView
Construct a simple colorized view of XML text.
-
-
Method Details
-
getTabSize
public int getTabSize()- Overrides:
getTabSizein classPlainView
-
drawUnselectedText
protected int drawUnselectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException - Overrides:
drawUnselectedTextin classPlainView- Throws:
BadLocationException
-