Save This Page
Home » openjdk-7 » javax » swing » text » html » [javadoc | source]
javax.swing.text.html
class: LineView [javadoc | source]
java.lang.Object
   javax.swing.text.View
      javax.swing.text.CompositeView
         javax.swing.text.BoxView
            javax.swing.text.FlowView
               javax.swing.text.ParagraphView
                  javax.swing.text.html.ParagraphView
                     javax.swing.text.html.LineView

All Implemented Interfaces:
    TabExpander, SwingConstants

A view implementation to display an unwrapped preformatted line.

This subclasses ParagraphView, but this really only contains one Row of text.

Field Summary
 int tabBase    Last place painted at. 
Fields inherited from javax.swing.text.ParagraphView:
firstLineIndent,  i18nStrategy,  tabChars,  tabDecimalChars
Fields inherited from javax.swing.text.FlowView:
layoutSpan,  layoutPool,  strategy
Fields inherited from javax.swing.text.BoxView:
majorAxis,  majorSpan,  minorSpan,  majorReqValid,  minorReqValid,  majorRequest,  minorRequest,  majorAllocValid,  majorOffsets,  majorSpans,  minorAllocValid,  minorOffsets,  minorSpans,  tempRect
Fields inherited from javax.swing.text.View:
BadBreakWeight,  GoodBreakWeight,  ExcellentBreakWeight,  ForcedBreakWeight,  X_AXIS,  Y_AXIS,  sharedBiasReturn
Constructor:
 public LineView(Element elem) 
    Creates a LineView object.
    Parameters:
    elem - the element to wrap in a view
Method from javax.swing.text.html.LineView Summary:
getAlignment,   getCharactersPerTab,   getMinimumSpan,   getPreTab,   getResizeWeight,   isVisible,   layout,   nextTabStop
Methods from javax.swing.text.html.ParagraphView:
calculateMinorAxisRequirements,   getAttributes,   getMaximumSpan,   getMinimumSpan,   getPreferredSpan,   getStyleSheet,   isVisible,   paint,   setParent,   setPropertiesFromAttributes
Methods from javax.swing.text.ParagraphView:
adjustRow,   breakView,   calculateMinorAxisRequirements,   changedUpdate,   createRow,   findOffsetToCharactersInString,   flipEastAndWestAtEnds,   getAlignment,   getBreakWeight,   getClosestPositionTo,   getFlowSpan,   getFlowStart,   getLayoutView,   getLayoutViewCount,   getNextNorthSouthVisualPositionFrom,   getPartialSize,   getTabBase,   getTabSet,   nextTabStop,   paint,   setFirstLineIndent,   setJustification,   setLineSpacing,   setPropertiesFromAttributes
Methods from javax.swing.text.FlowView:
calculateMinorAxisRequirements,   changedUpdate,   createRow,   getFlowAxis,   getFlowSpan,   getFlowStart,   getViewIndexAtPosition,   insertUpdate,   layout,   loadChildren,   removeUpdate,   setParent
Methods from javax.swing.text.BoxView:
baselineLayout,   baselineRequirements,   calculateMajorAxisRequirements,   calculateMinorAxisRequirements,   checkRequests,   childAllocation,   flipEastAndWestAtEnds,   forwardUpdate,   getAlignment,   getAxis,   getChildAllocation,   getHeight,   getMaximumSpan,   getMinimumSpan,   getOffset,   getPreferredSpan,   getResizeWeight,   getSpan,   getSpanOnAxis,   getViewAtPoint,   getWidth,   isAfter,   isAllocationValid,   isBefore,   isLayoutValid,   layout,   layoutChanged,   layoutMajorAxis,   layoutMinorAxis,   modelToView,   paint,   paintChild,   preferenceChanged,   replace,   setAxis,   setSize,   setSpanOnAxis,   updateChildSizes,   updateLayoutArray,   viewToModel
Methods from javax.swing.text.CompositeView:
childAllocation,   flipEastAndWestAtEnds,   getBottomInset,   getChildAllocation,   getInsideAllocation,   getLeftInset,   getNextEastWestVisualPositionFrom,   getNextNorthSouthVisualPositionFrom,   getNextVisualPositionFrom,   getRightInset,   getTopInset,   getView,   getViewAtPoint,   getViewAtPosition,   getViewCount,   getViewIndex,   getViewIndexAtPosition,   isAfter,   isBefore,   loadChildren,   modelToView,   modelToView,   replace,   setInsets,   setParagraphInsets,   setParent,   viewToModel
Methods from javax.swing.text.View:
append,   breakView,   changedUpdate,   createFragment,   forwardUpdate,   forwardUpdateToView,   getAlignment,   getAttributes,   getBreakWeight,   getChildAllocation,   getContainer,   getDocument,   getElement,   getEndOffset,   getGraphics,   getMaximumSpan,   getMinimumSpan,   getNextVisualPositionFrom,   getParent,   getPreferredSpan,   getResizeWeight,   getStartOffset,   getToolTipText,   getView,   getViewCount,   getViewFactory,   getViewIndex,   getViewIndex,   insert,   insertUpdate,   isVisible,   modelToView,   modelToView,   modelToView,   paint,   preferenceChanged,   remove,   removeAll,   removeUpdate,   replace,   setParent,   setSize,   updateChildren,   updateLayout,   viewToModel,   viewToModel
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from javax.swing.text.html.LineView Detail:
 public float getAlignment(int axis) 
    Gets the alignment for an axis.
 protected int getCharactersPerTab() 
 public float getMinimumSpan(int axis) 
    Determines the minimum span for this view along an axis. The preformatted line should refuse to be sized less than the preferred size.
 protected float getPreTab(float x,
    int tabOffset) 
    Returns the location for the tab.
 public int getResizeWeight(int axis) 
    Gets the resize weight for the specified axis.
 public boolean isVisible() 
    Preformatted lines are not suppressed if they have only whitespace, so they are always visible.
 protected  void layout(int width,
    int height) 
    Lays out the children. If the layout span has changed, the rows are rebuilt. The superclass functionality is called after checking and possibly rebuilding the rows. If the height has changed, the preferenceChanged method is called on the parent since the vertical preference is rigid.
 public float nextTabStop(float x,
    int tabOffset) 
    Returns the next tab stop position given a reference position. This view implements the tab coordinate system, and calls getTabbedSpan on the logical children in the process of layout to determine the desired span of the children. The logical children can delegate their tab expansion upward to the paragraph which knows how to expand tabs. LabelView is an example of a view that delegates its tab expansion needs upward to the paragraph.

    This is implemented to try and locate a TabSet in the paragraph element's attribute set. If one can be found, its settings will be used, otherwise a default expansion will be provided. The base location for for tab expansion is the left inset from the paragraphs most recent allocation (which is what the layout of the children is based upon).