Class ViewParagraph

  • All Implemented Interfaces:
    javax.swing.SwingConstants, javax.swing.text.TabExpander

    public class ViewParagraph
    extends javax.swing.text.ParagraphView
    Custom breakspots processing required only for word wrapping issue fix: on the editing line with wordwrap, add a new line at the beginning of the line and write something, the word wrapping behaves in a strange way. If you paste a long line (wrapped one), the word wrap disappears and the line gets looong. JDK bug 6539700(http://bugs.sun.com/view_bug.do?bug_id=6539700) : JTextPane line wrap radically different from previous versions in jre 1.5.0_10+. Fixed in Java 7b70.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.text.FlowView

        javax.swing.text.FlowView.FlowStrategy
    • 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

      Constructors 
      Constructor Description
      ViewParagraph​(javax.swing.text.Element elem)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void changedUpdate​(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)  
      void insertUpdate​(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)  
      void removeUpdate​(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)  
      • Methods inherited from class javax.swing.text.ParagraphView

        breakView, getAlignment, getBreakWeight, getFlowSpan, getFlowStart, nextTabStop, paint
      • Methods inherited from class javax.swing.text.FlowView

        getFlowAxis, setParent
      • Methods inherited from class javax.swing.text.BoxView

        getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getWidth, layoutChanged, modelToView, preferenceChanged, replace, setAxis, setSize, viewToModel
      • Methods inherited from class javax.swing.text.CompositeView

        getNextVisualPositionFrom, getView, getViewCount, getViewIndex, modelToView
      • Methods inherited from class javax.swing.text.View

        append, breakView, createFragment, getAttributes, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, remove, removeAll, viewToModel
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ViewParagraph

        public ViewParagraph​(javax.swing.text.Element elem)
    • Method Detail

      • removeUpdate

        public void removeUpdate​(javax.swing.event.DocumentEvent e,
                                 java.awt.Shape a,
                                 javax.swing.text.ViewFactory f)
        Overrides:
        removeUpdate in class javax.swing.text.FlowView
      • insertUpdate

        public void insertUpdate​(javax.swing.event.DocumentEvent e,
                                 java.awt.Shape a,
                                 javax.swing.text.ViewFactory f)
        Overrides:
        insertUpdate in class javax.swing.text.FlowView
      • changedUpdate

        public void changedUpdate​(javax.swing.event.DocumentEvent e,
                                  java.awt.Shape a,
                                  javax.swing.text.ViewFactory f)
        Overrides:
        changedUpdate in class javax.swing.text.ParagraphView