javax.swing.plaf.basic
Class BasicTextAreaUI.PlainParagraph

java.lang.Object
  extended byjavax.swing.text.View
      extended byjavax.swing.text.CompositeView
          extended byjavax.swing.text.BoxView
              extended byjavax.swing.text.FlowView
                  extended byjavax.swing.text.ParagraphView
                      extended byjavax.swing.plaf.basic.BasicTextAreaUI.PlainParagraph
All Implemented Interfaces:
SwingConstants, TabExpander
Enclosing class:
BasicTextAreaUI

static class BasicTextAreaUI.PlainParagraph
extends ParagraphView

Paragraph for representing plain-text lines that support bidirectional text.


Nested Class Summary
(package private) static class BasicTextAreaUI.PlainParagraph.LogicalView
          This class can be used to represent a logical view for a flow.
 
Nested classes inherited from class javax.swing.text.ParagraphView
 
Nested classes inherited from class javax.swing.text.FlowView
FlowView.FlowStrategy
 
Field Summary
 
Fields inherited from class javax.swing.text.ParagraphView
firstLineIndent
 
Fields inherited from class javax.swing.text.FlowView
layoutPool, layoutSpan, strategy
 
Fields inherited from class javax.swing.text.BoxView
 
Fields inherited from class javax.swing.text.CompositeView
 
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
(package private) BasicTextAreaUI.PlainParagraph(Element elem)
           
 
Method Summary
protected  SizeRequirements calculateMinorAxisRequirements(int axis, SizeRequirements r)
          Calculate equirements along the minor axis.
 int getFlowSpan(int index)
          Fetch the constraining span to flow against for the given child index.
 void setParent(View parent)
          Sets the parent of the view.
protected  void setPropertiesFromAttributes()
          Set the cached properties from the attributes.
 void setSize(float width, float height)
          Sets the size of the view.
 
Methods inherited from class javax.swing.text.ParagraphView
adjustRow, breakView, changedUpdate, createRow, findOffsetToCharactersInString, flipEastAndWestAtEnds, getAlignment, getBreakWeight, getClosestPositionTo, getFlowStart, getLayoutView, getLayoutViewCount, getNextNorthSouthVisualPositionFrom, getPartialSize, getTabBase, getTabSet, nextTabStop, paint, setFirstLineIndent, setJustification, setLineSpacing
 
Methods inherited from class javax.swing.text.FlowView
getFlowAxis, getViewIndexAtPosition, insertUpdate, layout, loadChildren, removeUpdate
 
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, childAllocation, forwardUpdate, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, viewToModel
 
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, modelToView, setInsets, setParagraphInsets
 
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

BasicTextAreaUI.PlainParagraph

BasicTextAreaUI.PlainParagraph(Element elem)
Method Detail

setParent

public void setParent(View parent)
Description copied from class: CompositeView
Sets the parent of the view. This is reimplemented to provide the superclass behavior as well as calling the loadChildren method if this view does not already have children. The children should not be loaded in the constructor because the act of setting the parent may cause them to try to search up the hierarchy (to get the hosting Container for example). If this view has children (the view is being moved from one place in the view hierarchy to another), the loadChildren method will not be called.

Overrides:
setParent in class CompositeView
Parameters:
parent - the parent of the view, null if none

setPropertiesFromAttributes

protected void setPropertiesFromAttributes()
Description copied from class: ParagraphView
Set the cached properties from the attributes.

Overrides:
setPropertiesFromAttributes in class ParagraphView

getFlowSpan

public int getFlowSpan(int index)
Fetch the constraining span to flow against for the given child index.

Overrides:
getFlowSpan in class ParagraphView
Parameters:
index - the index of the view being queried
Returns:
the constraining span for the given view at index

calculateMinorAxisRequirements

protected SizeRequirements calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements r)
Description copied from class: FlowView
Calculate equirements along the minor axis. This is implemented to forward the request to the logical view by calling getMinimumSpan, getPreferredSpan, and getMaximumSpan on it.

Overrides:
calculateMinorAxisRequirements in class FlowView

setSize

public void setSize(float width,
                    float height)
Sets the size of the view. If the size has changed, layout is redone. The size is the full size of the view including the inset areas.

Overrides:
setSize in class BoxView
Parameters:
width - the width >= 0
height - the height >= 0