public class XMLView extends PlainView
Note: The XML Editor package is based on the JavaEditorKit example as described in the article 'Customizing a Text Editor' by Timothy Prinzing . See: http://java.sun.com/products/jfc/tsc/articles/text/editor_kit/
| Modifier and Type | Field and Description |
|---|---|
static Color |
DEBUG_NORMAL_COLOR |
static Color |
DEBUG_STOP_COLOR |
static Color |
ERROR_COLOR |
static Color |
LINE_MARKER_COLOR |
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXISBOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST| Constructor and Description |
|---|
XMLView(XMLContext context,
Element elem,
XmlTextPane xmlTextPane)
Construct a colorized view of xml text for the element.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
drawLine(int lineIndex,
Graphics g,
int x,
int y) |
protected int |
drawSelectedText(Graphics g,
int x,
int y,
int start,
int end)
Renders the given range in the model as selected text.
|
protected int |
drawUnselectedText(Graphics g,
int x,
int y,
int start,
int end)
Renders the given range in the model as normal unselected text.
|
Color |
getBgPaintColor() |
void |
paint(Graphics g,
Shape a)
Invalidates the scanner, to make sure a new range is set later.
|
void |
paintX(Graphics g,
Shape a) |
changedUpdate, damageLineRange, getLineBuffer, getPreferredSpan, getTabSize, insertUpdate, lineToRect, modelToView, nextTabStop, removeUpdate, setSize, updateDamage, updateMetrics, viewToModelappend, 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, viewToModelpublic static final Color DEBUG_NORMAL_COLOR
public static final Color DEBUG_STOP_COLOR
public static final Color LINE_MARKER_COLOR
public static final Color ERROR_COLOR
public XMLView(XMLContext context, Element elem, XmlTextPane xmlTextPane) throws IOException
context - the styles used to colorize the view.elem - the element to create the view for.xmlTextPane - IOExceptionpublic void paint(Graphics g, Shape a)
paint in class PlainViewg - the graphics context.a - the shape.View.paint( Graphics g, Shape a)protected int drawUnselectedText(Graphics g, int x, int y, int start, int end) throws BadLocationException
drawUnselectedText in class PlainViewg - the graphics contextx - the starting X coordinatey - the starting Y coordinatestart - the beginning position in the modelend - the ending position in the modelBadLocationException - if the range is invalidprotected int drawSelectedText(Graphics g, int x, int y, int start, int end) throws BadLocationException
drawSelectedText in class PlainViewg - the graphics contextx - the starting X coordinatey - the starting Y coordinatestart - the beginning position in the modelend - the ending position in the modelBadLocationException - if the range is invalidprotected void drawLine(int lineIndex,
Graphics g,
int x,
int y)
public Color getBgPaintColor()
Copyright © 2022 WSO2. All rights reserved.