javax.swing.text.html
Class HTMLEditorKit.HTMLFactory.BodyBlockView

java.lang.Object
  extended byjavax.swing.text.View
      extended byjavax.swing.text.CompositeView
          extended byjavax.swing.text.BoxView
              extended byjavax.swing.text.html.BlockView
                  extended byjavax.swing.text.html.HTMLEditorKit.HTMLFactory.BodyBlockView
All Implemented Interfaces:
ComponentListener, EventListener, SwingConstants
Enclosing class:
HTMLEditorKit.HTMLFactory

private static class HTMLEditorKit.HTMLFactory.BodyBlockView
extends BlockView
implements ComponentListener


Field Summary
private  Reference cachedViewPort
           
private  int componentVisibleWidth
           
private  boolean isListening
           
private  int viewVisibleWidth
           
 
Fields inherited from class javax.swing.text.html.BlockView
 
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
HTMLEditorKit.HTMLFactory.BodyBlockView(Element elem)
           
 
Method Summary
protected  SizeRequirements calculateMajorAxisRequirements(int axis, SizeRequirements r)
          Calculate the requirements of the block along the major axis (i.e. the axis along with it tiles).
 void componentHidden(ComponentEvent e)
          Invoked when the component has been made invisible.
 void componentMoved(ComponentEvent e)
          Invoked when the component's position changes.
 void componentResized(ComponentEvent e)
          Invoked when the component's size changes.
 void componentShown(ComponentEvent e)
          Invoked when the component has been made visible.
protected  void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
          Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents).
 void setParent(View parent)
          Establishes the parent view for this view.
 
Methods inherited from class javax.swing.text.html.BlockView
calculateMinorAxisRequirements, changedUpdate, getAlignment, getAttributes, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getStyleSheet, isPercentage, paint, setPropertiesFromAttributes, spanSetFromAttributes
 
Methods inherited from class javax.swing.text.BoxView
baselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAxis, getChildAllocation, getHeight, getOffset, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, modelToView, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel
 
Methods inherited from class javax.swing.text.CompositeView
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets
 
Methods inherited from class javax.swing.text.View
append, breakView, createFragment, forwardUpdateToView, getBreakWeight, getContainer, getDocument, getElement, getEndOffset, getGraphics, getParent, getStartOffset, getToolTipText, getViewFactory, getViewIndex, insert, insertUpdate, isVisible, modelToView, remove, removeAll, removeUpdate, updateChildren, updateLayout, viewToModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cachedViewPort

private Reference cachedViewPort

isListening

private boolean isListening

viewVisibleWidth

private int viewVisibleWidth

componentVisibleWidth

private int componentVisibleWidth
Constructor Detail

HTMLEditorKit.HTMLFactory.BodyBlockView

public HTMLEditorKit.HTMLFactory.BodyBlockView(Element elem)
Method Detail

calculateMajorAxisRequirements

protected SizeRequirements calculateMajorAxisRequirements(int axis,
                                                          SizeRequirements r)
Description copied from class: BlockView
Calculate the requirements of the block along the major axis (i.e. the axis along with it tiles). This is implemented to provide the superclass behavior and then adjust it if the CSS width or height attribute is specified and applicable to the axis.

Overrides:
calculateMajorAxisRequirements in class BlockView

layoutMinorAxis

protected void layoutMinorAxis(int targetSpan,
                               int axis,
                               int[] offsets,
                               int[] spans)
Description copied from class: BlockView
Perform layout for the minor axis of the box (i.e. the axis orthoginal to the axis that it represents). The results of the layout should be placed in the given arrays which represent the allocations to the children along the minor axis.

Overrides:
layoutMinorAxis in class BlockView
Parameters:
targetSpan - the total span given to the view, which whould be used to layout the childre.
axis - the axis being layed out
offsets - the offsets from the origin of the view for each of the child views; this is a return value and is filled in by the implementation of this method
spans - the span of each child view; this is a return value and is filled in by the implementation of this method
Returns:
the offset and span for each child view in the offsets and spans parameters

setParent

public void setParent(View parent)
Description copied from class: BlockView
Establishes the parent view for this view. This is guaranteed to be called before any other methods if the parent view is functioning properly.

This is implemented to forward to the superclass as well as call the BlockView.setPropertiesFromAttributes() method to set the paragraph properties from the css attributes. The call is made at this time to ensure the ability to resolve upward through the parents view attributes.

Overrides:
setParent in class BlockView
Parameters:
parent - the new parent, or null if the view is being removed from a parent it was previously added to

componentResized

public void componentResized(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's size changes.

Specified by:
componentResized in interface ComponentListener

componentHidden

public void componentHidden(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made invisible.

Specified by:
componentHidden in interface ComponentListener

componentMoved

public void componentMoved(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component's position changes.

Specified by:
componentMoved in interface ComponentListener

componentShown

public void componentShown(ComponentEvent e)
Description copied from interface: ComponentListener
Invoked when the component has been made visible.

Specified by:
componentShown in interface ComponentListener