|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.WrappedPlainView
ui.editor.XmlView
public class XmlView
Thanks: http://groups.google.com/group/de.comp.lang.java/msg/2bbeb016abad270 IMPORTANT NOTE: regex should contain 1 group. Originally using PlainView here because we don't want line wrapping to occur. Replaced by WrappedPlainView by B.Mascret (2010)
Field Summary | |
---|---|
private static java.lang.String |
GENERIC_XML_NAME
pattern for XM name |
private static java.util.HashMap<java.util.regex.Pattern,java.awt.Color> |
patternColors
map between colors and String patterns |
private static java.lang.String |
TAG_ATTRIBUTE_PATTERN
attribute tag pattern |
private static java.lang.String |
TAG_ATTRIBUTE_VALUE
attribute value pattern |
private static java.lang.String |
TAG_CDATA
cdaTA tag pattern |
private static java.lang.String |
TAG_COMMENT
comment tag pattern |
private static java.lang.String |
TAG_END_PATTERN
end tag pattern |
private static java.lang.String |
TAG_PATTERN
pattern for a tag |
Fields inherited from class javax.swing.text.View |
---|
BadBreakWeight, ExcellentBreakWeight, ForcedBreakWeight, GoodBreakWeight, X_AXIS, Y_AXIS |
Fields inherited from interface javax.swing.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 | |
---|---|
XmlView(javax.swing.text.Element element)
constructor set up tabSize and fonte |
Method Summary | |
---|---|
protected int |
drawUnselectedText(java.awt.Graphics graphics,
int x,
int y,
int p0,
int p1)
|
Methods inherited from class javax.swing.text.WrappedPlainView |
---|
calculateBreakPosition, changedUpdate, drawLine, drawSelectedText, getLineBuffer, getMaximumSpan, getMinimumSpan, getPreferredSpan, getTabSize, insertUpdate, loadChildren, nextTabStop, paint, removeUpdate, setSize |
Methods inherited from class javax.swing.text.BoxView |
---|
baselineLayout, 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, viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
---|
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, modelToView, setInsets, setParagraphInsets, setParent |
Methods inherited from class javax.swing.text.View |
---|
append, breakView, createFragment, forwardUpdateToView, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, updateChildren, updateLayout, viewToModel |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static java.util.HashMap<java.util.regex.Pattern,java.awt.Color> patternColors
private static java.lang.String GENERIC_XML_NAME
private static java.lang.String TAG_PATTERN
private static java.lang.String TAG_END_PATTERN
private static java.lang.String TAG_ATTRIBUTE_PATTERN
private static java.lang.String TAG_ATTRIBUTE_VALUE
private static java.lang.String TAG_COMMENT
private static java.lang.String TAG_CDATA
Constructor Detail |
---|
public XmlView(javax.swing.text.Element element)
element
- the element to displayMethod Detail |
---|
protected int drawUnselectedText(java.awt.Graphics graphics, int x, int y, int p0, int p1) throws javax.swing.text.BadLocationException
drawUnselectedText
in class javax.swing.text.WrappedPlainView
javax.swing.text.BadLocationException
Draws the text between p0
and p1
indexes
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |