java.lang.Object
javax.swing.text.View
javax.swing.text.PlainView
allensoft.javacvs.client.ui.swing.AnnotatedEditorKit.AnnotatedView
- All Implemented Interfaces:
- javax.swing.SwingConstants, javax.swing.text.TabExpander
- Enclosing class:
- AnnotatedEditorKit
- public static class AnnotatedEditorKit.AnnotatedView
- extends javax.swing.text.PlainView
View which displays the annotations. It fills alternating colors around the annotations
to separate them and displays line numbers and authour and revision for the first line
of a new annotation.
| 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 |
| Methods inherited from class javax.swing.text.PlainView |
changedUpdate, damageLineRange, drawSelectedText, drawUnselectedText, getLineBuffer, getTabSize, insertUpdate, lineToRect, nextTabStop, removeUpdate, updateDamage |
| Methods inherited from class javax.swing.text.View |
append, breakView, createFragment, dump, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getNextVisualPositionFrom, getParent, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, setParent, setSize, updateChildren, updateLayout, viewToModel |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
m_ShowAnnotations
private boolean[] m_ShowAnnotations
m_Annotations
private AnnotatedEditorKit.AnnotatedView.Annotation[] m_Annotations
g_Colors
private static java.awt.Color[] g_Colors
m_nMaxLineNumberWidth
private int m_nMaxLineNumberWidth
m_nMaxAuthorWidth
private int m_nMaxAuthorWidth
m_nMaxRevisionWidth
private int m_nMaxRevisionWidth
m_nMargin
private int m_nMargin
AnnotatedEditorKit.AnnotatedView
public AnnotatedEditorKit.AnnotatedView(javax.swing.text.Element element)
updateMetrics
protected void updateMetrics()
calculateMargins
protected void calculateMargins()
drawLine
protected void drawLine(int lineIndex,
java.awt.Graphics g,
int x,
int y)
- Description copied from class:
javax.swing.text.PlainView
- Draws a line of text. The X and Y coordinates specify the start of
the baseline of the line.
paint
public void paint(java.awt.Graphics g,
java.awt.Shape a)
modelToView
public java.awt.Shape modelToView(int pos,
java.awt.Shape a,
javax.swing.text.Position.Bias b)
throws javax.swing.text.BadLocationException
- Description copied from class:
javax.swing.text.View
- Maps a position in the document into the coordinate space of the View.
The output rectangle usually reflects the font height but has a width
of zero.
viewToModel
public int viewToModel(float fx,
float fy,
java.awt.Shape a,
javax.swing.text.Position.Bias[] bias)
- Description copied from class:
javax.swing.text.PlainView
- Maps coordinates from the
View's space into a position
in the document model.
getPreferredSpan
public float getPreferredSpan(int axis)
- Description copied from class:
javax.swing.text.View
- Returns the preferred span along the specified axis. Normally the view is
rendered with the span returned here if that is possible.
getMinimumSpan
public float getMinimumSpan(int axis)
- Description copied from class:
javax.swing.text.View
- Returns the minimum span along the specified axis. The default
implementation will forward to
View.getPreferredSpan(int)>
View.getPreferredSpan(int) 55 unless View.getResizeWeight(int)>View.getResizeWeight(int) 55
returns a value > 0, in which case this returns 0.
getMaximumSpan
public float getMaximumSpan(int axis)
- Description copied from class:
javax.swing.text.View
- Returns the maximum span along the specified axis. The default
implementation will forward to
View.getPreferredSpan(int)>
View.getPreferredSpan(int) 55 unless View.getResizeWeight(int)>View.getResizeWeight(int) 55
returns a value > 0, in which case this returns Integer.MIN_VALUE>Integer.MIN_VALUE 55 .