org.jvnet.substance.text
Class SubstanceWrappedPlainView

java.lang.Object
  extended by javax.swing.text.View
      extended by javax.swing.text.CompositeView
          extended by javax.swing.text.BoxView
              extended by javax.swing.text.WrappedPlainView
                  extended by org.jvnet.substance.text.SubstanceWrappedPlainView
All Implemented Interfaces:
javax.swing.SwingConstants, javax.swing.text.TabExpander

public class SubstanceWrappedPlainView
extends javax.swing.text.WrappedPlainView

Custom wrapped plain view for painting text components with SubstanceTextPainter-based approach.

Author:
Kirill Grouchnikov

Field Summary
 
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
SubstanceWrappedPlainView(javax.swing.text.Element elem, boolean wrapStyleWord)
          Creates a new view.
 
Method Summary
protected  int drawSelectedText(java.awt.Graphics g, int x, int y, int p0, int p1)
           
protected  int drawUnselectedText(java.awt.Graphics g, int x, int y, int p0, int p1)
           
 
Methods inherited from class javax.swing.text.WrappedPlainView
calculateBreakPosition, changedUpdate, drawLine, 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
 

Constructor Detail

SubstanceWrappedPlainView

public SubstanceWrappedPlainView(javax.swing.text.Element elem,
                                 boolean wrapStyleWord)
Creates a new view.

Parameters:
elem - Text element.
wrapStyleWord - Wrap style word.
Method Detail

drawSelectedText

protected int drawSelectedText(java.awt.Graphics g,
                               int x,
                               int y,
                               int p0,
                               int p1)
                        throws javax.swing.text.BadLocationException
Overrides:
drawSelectedText in class javax.swing.text.WrappedPlainView
Throws:
javax.swing.text.BadLocationException

drawUnselectedText

protected int drawUnselectedText(java.awt.Graphics g,
                                 int x,
                                 int y,
                                 int p0,
                                 int p1)
                          throws javax.swing.text.BadLocationException
Overrides:
drawUnselectedText in class javax.swing.text.WrappedPlainView
Throws:
javax.swing.text.BadLocationException