public class WrappedXMLView extends WrappedPlainView
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/
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 |
|---|
WrappedXMLView(XMLContext context,
Element elem)
Construct a colorized view of xml text for the element.
|
WrappedXMLView(XMLContext context,
Element elem,
boolean wrapStyleWord)
Construct a colorized view of xml text for the element.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
void |
paint(Graphics g,
Shape a)
Invalidates the scanner, to make sure a new range is set later.
|
calculateBreakPosition, changedUpdate, drawLine, getLineBuffer, getMaximumSpan, getMinimumSpan, getPreferredSpan, getTabSize, insertUpdate, loadChildren, nextTabStop, removeUpdate, setSizebaselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getOffset, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, viewToModelgetBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, modelToView, setInsets, setParagraphInsets, setParentappend, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModelpublic WrappedXMLView(XMLContext context, Element elem) throws IOException
context - the styles used to colorize the view.elem - the element to create the view for.IOExceptionpublic WrappedXMLView(XMLContext context, Element elem, boolean wrapStyleWord) throws IOException
context - the styles used to colorize the view.elem - the element to create the view for.wrapStyleWord - the word wrapping-style.IOExceptionpublic void paint(Graphics g, Shape a)
paint in class WrappedPlainViewg - 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 WrappedPlainViewg - 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 WrappedPlainViewg - 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 invalidCopyright © 2022 WSO2. All rights reserved.