javax.swing.text.html
Class BlockView

java.lang.Object sample code for java.lang.Object definition code for java.lang.Object 
  extended by javax.swing.text.View sample code for javax.swing.text.View definition code for javax.swing.text.View 
      extended by javax.swing.text.CompositeView sample code for javax.swing.text.CompositeView definition code for javax.swing.text.CompositeView 
          extended by javax.swing.text.BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView 
              extended by javax.swing.text.html.BlockView
All Implemented Interfaces:
SwingConstants sample code for javax.swing.SwingConstants definition code for javax.swing.SwingConstants
Direct Known Subclasses:
ListView sample code for javax.swing.text.html.ListView definition code for javax.swing.text.html.ListView

public class BlockView
extends BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView

A view implementation to display a block (as a box) with CSS specifications.


Field Summary
 
Fields inherited from class javax.swing.text.View sample code for javax.swing.text.View definition code for javax.swing.text.View
BadBreakWeight sample code for javax.swing.text.View.BadBreakWeight definition code for javax.swing.text.View.BadBreakWeight , ExcellentBreakWeight sample code for javax.swing.text.View.ExcellentBreakWeight definition code for javax.swing.text.View.ExcellentBreakWeight , ForcedBreakWeight sample code for javax.swing.text.View.ForcedBreakWeight definition code for javax.swing.text.View.ForcedBreakWeight , GoodBreakWeight sample code for javax.swing.text.View.GoodBreakWeight definition code for javax.swing.text.View.GoodBreakWeight , X_AXIS sample code for javax.swing.text.View.X_AXIS definition code for javax.swing.text.View.X_AXIS , Y_AXIS sample code for javax.swing.text.View.Y_AXIS definition code for javax.swing.text.View.Y_AXIS
 
Fields inherited from interface javax.swing.SwingConstants sample code for javax.swing.SwingConstants definition code for javax.swing.SwingConstants
BOTTOM sample code for javax.swing.SwingConstants.BOTTOM definition code for javax.swing.SwingConstants.BOTTOM , CENTER sample code for javax.swing.SwingConstants.CENTER definition code for javax.swing.SwingConstants.CENTER , EAST sample code for javax.swing.SwingConstants.EAST definition code for javax.swing.SwingConstants.EAST , HORIZONTAL sample code for javax.swing.SwingConstants.HORIZONTAL definition code for javax.swing.SwingConstants.HORIZONTAL , LEADING sample code for javax.swing.SwingConstants.LEADING definition code for javax.swing.SwingConstants.LEADING , LEFT sample code for javax.swing.SwingConstants.LEFT definition code for javax.swing.SwingConstants.LEFT , NEXT sample code for javax.swing.SwingConstants.NEXT definition code for javax.swing.SwingConstants.NEXT , NORTH sample code for javax.swing.SwingConstants.NORTH definition code for javax.swing.SwingConstants.NORTH , NORTH_EAST sample code for javax.swing.SwingConstants.NORTH_EAST definition code for javax.swing.SwingConstants.NORTH_EAST , NORTH_WEST sample code for javax.swing.SwingConstants.NORTH_WEST definition code for javax.swing.SwingConstants.NORTH_WEST , PREVIOUS sample code for javax.swing.SwingConstants.PREVIOUS definition code for javax.swing.SwingConstants.PREVIOUS , RIGHT sample code for javax.swing.SwingConstants.RIGHT definition code for javax.swing.SwingConstants.RIGHT , SOUTH sample code for javax.swing.SwingConstants.SOUTH definition code for javax.swing.SwingConstants.SOUTH , SOUTH_EAST sample code for javax.swing.SwingConstants.SOUTH_EAST definition code for javax.swing.SwingConstants.SOUTH_EAST , SOUTH_WEST sample code for javax.swing.SwingConstants.SOUTH_WEST definition code for javax.swing.SwingConstants.SOUTH_WEST , TOP sample code for javax.swing.SwingConstants.TOP definition code for javax.swing.SwingConstants.TOP , TRAILING sample code for javax.swing.SwingConstants.TRAILING definition code for javax.swing.SwingConstants.TRAILING , VERTICAL sample code for javax.swing.SwingConstants.VERTICAL definition code for javax.swing.SwingConstants.VERTICAL , WEST sample code for javax.swing.SwingConstants.WEST definition code for javax.swing.SwingConstants.WEST
 
Constructor Summary
BlockView sample code for javax.swing.text.html.BlockView.BlockView(javax.swing.text.Element, int) definition code for javax.swing.text.html.BlockView.BlockView(javax.swing.text.Element, int) (Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem, int axis)
          Creates a new view that represents an html box.
 
Method Summary
protected  SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements calculateMajorAxisRequirements sample code for javax.swing.text.html.BlockView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.html.BlockView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements) (int axis, SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements  r)
          Calculate the requirements of the block along the major axis (i.e.
protected  SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements calculateMinorAxisRequirements sample code for javax.swing.text.html.BlockView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.html.BlockView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements) (int axis, SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements  r)
          Calculate the requirements of the block along the minor axis (i.e.
 void changedUpdate sample code for javax.swing.text.html.BlockView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.html.BlockView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) (DocumentEvent sample code for javax.swing.event.DocumentEvent definition code for javax.swing.event.DocumentEvent  changes, Shape sample code for java.awt.Shape definition code for java.awt.Shape  a, ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory  f)
          Gives notification from the document that attributes were changed in a location that this view is responsible for.
 float getAlignment sample code for javax.swing.text.html.BlockView.getAlignment(int) definition code for javax.swing.text.html.BlockView.getAlignment(int) (int axis)
          Gets the alignment.
 AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet getAttributes sample code for javax.swing.text.html.BlockView.getAttributes() definition code for javax.swing.text.html.BlockView.getAttributes() ()
          Fetches the attributes to use when rendering.
 float getMaximumSpan sample code for javax.swing.text.html.BlockView.getMaximumSpan(int) definition code for javax.swing.text.html.BlockView.getMaximumSpan(int) (int axis)
          Determines the maximum span for this view along an axis.
 float getMinimumSpan sample code for javax.swing.text.html.BlockView.getMinimumSpan(int) definition code for javax.swing.text.html.BlockView.getMinimumSpan(int) (int axis)
          Determines the minimum span for this view along an axis.
 float getPreferredSpan sample code for javax.swing.text.html.BlockView.getPreferredSpan(int) definition code for javax.swing.text.html.BlockView.getPreferredSpan(int) (int axis)
          Determines the preferred span for this view along an axis.
 int getResizeWeight sample code for javax.swing.text.html.BlockView.getResizeWeight(int) definition code for javax.swing.text.html.BlockView.getResizeWeight(int) (int axis)
          Gets the resize weight.
protected  StyleSheet sample code for javax.swing.text.html.StyleSheet definition code for javax.swing.text.html.StyleSheet getStyleSheet sample code for javax.swing.text.html.BlockView.getStyleSheet() definition code for javax.swing.text.html.BlockView.getStyleSheet() ()
           
protected  void layoutMinorAxis sample code for javax.swing.text.html.BlockView.layoutMinorAxis(int, int, int[], int[]) definition code for javax.swing.text.html.BlockView.layoutMinorAxis(int, int, int[], int[]) (int targetSpan, int axis, int[] offsets, int[] spans)
          Perform layout for the minor axis of the box (i.e.
 void paint sample code for javax.swing.text.html.BlockView.paint(java.awt.Graphics, java.awt.Shape) definition code for javax.swing.text.html.BlockView.paint(java.awt.Graphics, java.awt.Shape) (Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g, Shape sample code for java.awt.Shape definition code for java.awt.Shape  allocation)
          Renders using the given rendering surface and area on that surface.
 void setParent sample code for javax.swing.text.html.BlockView.setParent(javax.swing.text.View) definition code for javax.swing.text.html.BlockView.setParent(javax.swing.text.View) (View sample code for javax.swing.text.View definition code for javax.swing.text.View  parent)
          Establishes the parent view for this view.
protected  void setPropertiesFromAttributes sample code for javax.swing.text.html.BlockView.setPropertiesFromAttributes() definition code for javax.swing.text.html.BlockView.setPropertiesFromAttributes() ()
          Update any cached values that come from attributes.
 
Methods inherited from class javax.swing.text.BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
baselineLayout sample code for javax.swing.text.BoxView.baselineLayout(int, int, int[], int[]) definition code for javax.swing.text.BoxView.baselineLayout(int, int, int[], int[]) , baselineRequirements sample code for javax.swing.text.BoxView.baselineRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.BoxView.baselineRequirements(int, javax.swing.SizeRequirements) , childAllocation sample code for javax.swing.text.BoxView.childAllocation(int, java.awt.Rectangle) definition code for javax.swing.text.BoxView.childAllocation(int, java.awt.Rectangle) , flipEastAndWestAtEnds sample code for javax.swing.text.BoxView.flipEastAndWestAtEnds(int, javax.swing.text.Position.Bias) definition code for javax.swing.text.BoxView.flipEastAndWestAtEnds(int, javax.swing.text.Position.Bias) , forwardUpdate sample code for javax.swing.text.BoxView.forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.BoxView.forwardUpdate(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) , getAxis sample code for javax.swing.text.BoxView.getAxis() definition code for javax.swing.text.BoxView.getAxis() , getChildAllocation sample code for javax.swing.text.BoxView.getChildAllocation(int, java.awt.Shape) definition code for javax.swing.text.BoxView.getChildAllocation(int, java.awt.Shape) , getHeight sample code for javax.swing.text.BoxView.getHeight() definition code for javax.swing.text.BoxView.getHeight() , getOffset sample code for javax.swing.text.BoxView.getOffset(int, int) definition code for javax.swing.text.BoxView.getOffset(int, int) , getSpan sample code for javax.swing.text.BoxView.getSpan(int, int) definition code for javax.swing.text.BoxView.getSpan(int, int) , getViewAtPoint sample code for javax.swing.text.BoxView.getViewAtPoint(int, int, java.awt.Rectangle) definition code for javax.swing.text.BoxView.getViewAtPoint(int, int, java.awt.Rectangle) , getWidth sample code for javax.swing.text.BoxView.getWidth() definition code for javax.swing.text.BoxView.getWidth() , isAfter sample code for javax.swing.text.BoxView.isAfter(int, int, java.awt.Rectangle) definition code for javax.swing.text.BoxView.isAfter(int, int, java.awt.Rectangle) , isAllocationValid sample code for javax.swing.text.BoxView.isAllocationValid() definition code for javax.swing.text.BoxView.isAllocationValid() , isBefore sample code for javax.swing.text.BoxView.isBefore(int, int, java.awt.Rectangle) definition code for javax.swing.text.BoxView.isBefore(int, int, java.awt.Rectangle) , isLayoutValid sample code for javax.swing.text.BoxView.isLayoutValid(int) definition code for javax.swing.text.BoxView.isLayoutValid(int) , layout sample code for javax.swing.text.BoxView.layout(int, int) definition code for javax.swing.text.BoxView.layout(int, int) , layoutChanged sample code for javax.swing.text.BoxView.layoutChanged(int) definition code for javax.swing.text.BoxView.layoutChanged(int) , layoutMajorAxis sample code for javax.swing.text.BoxView.layoutMajorAxis(int, int, int[], int[]) definition code for javax.swing.text.BoxView.layoutMajorAxis(int, int, int[], int[]) , modelToView sample code for javax.swing.text.BoxView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias) definition code for javax.swing.text.BoxView.modelToView(int, java.awt.Shape, javax.swing.text.Position.Bias) , paintChild sample code for javax.swing.text.BoxView.paintChild(java.awt.Graphics, java.awt.Rectangle, int) definition code for javax.swing.text.BoxView.paintChild(java.awt.Graphics, java.awt.Rectangle, int) , preferenceChanged sample code for javax.swing.text.BoxView.preferenceChanged(javax.swing.text.View, boolean, boolean) definition code for javax.swing.text.BoxView.preferenceChanged(javax.swing.text.View, boolean, boolean) , replace sample code for javax.swing.text.BoxView.replace(int, int, javax.swing.text.View[]) definition code for javax.swing.text.BoxView.replace(int, int, javax.swing.text.View[]) , setAxis sample code for javax.swing.text.BoxView.setAxis(int) definition code for javax.swing.text.BoxView.setAxis(int) , setSize sample code for javax.swing.text.BoxView.setSize(float, float) definition code for javax.swing.text.BoxView.setSize(float, float) , viewToModel sample code for javax.swing.text.BoxView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[]) definition code for javax.swing.text.BoxView.viewToModel(float, float, java.awt.Shape, javax.swing.text.Position.Bias[])
 
Methods inherited from class javax.swing.text.CompositeView sample code for javax.swing.text.CompositeView definition code for javax.swing.text.CompositeView
getBottomInset sample code for javax.swing.text.CompositeView.getBottomInset() definition code for javax.swing.text.CompositeView.getBottomInset() , getInsideAllocation sample code for javax.swing.text.CompositeView.getInsideAllocation(java.awt.Shape) definition code for javax.swing.text.CompositeView.getInsideAllocation(java.awt.Shape) , getLeftInset sample code for javax.swing.text.CompositeView.getLeftInset() definition code for javax.swing.text.CompositeView.getLeftInset() , getNextEastWestVisualPositionFrom sample code for javax.swing.text.CompositeView.getNextEastWestVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) definition code for javax.swing.text.CompositeView.getNextEastWestVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) , getNextNorthSouthVisualPositionFrom sample code for javax.swing.text.CompositeView.getNextNorthSouthVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) definition code for javax.swing.text.CompositeView.getNextNorthSouthVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) , getNextVisualPositionFrom sample code for javax.swing.text.CompositeView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) definition code for javax.swing.text.CompositeView.getNextVisualPositionFrom(int, javax.swing.text.Position.Bias, java.awt.Shape, int, javax.swing.text.Position.Bias[]) , getRightInset sample code for javax.swing.text.CompositeView.getRightInset() definition code for javax.swing.text.CompositeView.getRightInset() , getTopInset sample code for javax.swing.text.CompositeView.getTopInset() definition code for javax.swing.text.CompositeView.getTopInset() , getView sample code for javax.swing.text.CompositeView.getView(int) definition code for javax.swing.text.CompositeView.getView(int) , getViewAtPosition sample code for javax.swing.text.CompositeView.getViewAtPosition(int, java.awt.Rectangle) definition code for javax.swing.text.CompositeView.getViewAtPosition(int, java.awt.Rectangle) , getViewCount sample code for javax.swing.text.CompositeView.getViewCount() definition code for javax.swing.text.CompositeView.getViewCount() , getViewIndex sample code for javax.swing.text.CompositeView.getViewIndex(int, javax.swing.text.Position.Bias) definition code for javax.swing.text.CompositeView.getViewIndex(int, javax.swing.text.Position.Bias) , getViewIndexAtPosition sample code for javax.swing.text.CompositeView.getViewIndexAtPosition(int) definition code for javax.swing.text.CompositeView.getViewIndexAtPosition(int) , loadChildren sample code for javax.swing.text.CompositeView.loadChildren(javax.swing.text.ViewFactory) definition code for javax.swing.text.CompositeView.loadChildren(javax.swing.text.ViewFactory) , modelToView sample code for javax.swing.text.CompositeView.modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape) definition code for javax.swing.text.CompositeView.modelToView(int, javax.swing.text.Position.Bias, int, javax.swing.text.Position.Bias, java.awt.Shape) , setInsets sample code for javax.swing.text.CompositeView.setInsets(short, short, short, short) definition code for javax.swing.text.CompositeView.setInsets(short, short, short, short) , setParagraphInsets sample code for javax.swing.text.CompositeView.setParagraphInsets(javax.swing.text.AttributeSet) definition code for javax.swing.text.CompositeView.setParagraphInsets(javax.swing.text.AttributeSet)
 
Methods inherited from class javax.swing.text.View sample code for javax.swing.text.View definition code for javax.swing.text.View
append sample code for javax.swing.text.View.append(javax.swing.text.View) definition code for javax.swing.text.View.append(javax.swing.text.View) , breakView sample code for javax.swing.text.View.breakView(int, int, float, float) definition code for javax.swing.text.View.breakView(int, int, float, float) , createFragment sample code for javax.swing.text.View.createFragment(int, int) definition code for javax.swing.text.View.createFragment(int, int) , forwardUpdateToView sample code for javax.swing.text.View.forwardUpdateToView(javax.swing.text.View, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.forwardUpdateToView(javax.swing.text.View, javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) , getBreakWeight sample code for javax.swing.text.View.getBreakWeight(int, float, float) definition code for javax.swing.text.View.getBreakWeight(int, float, float) , getContainer sample code for javax.swing.text.View.getContainer() definition code for javax.swing.text.View.getContainer() , getDocument sample code for javax.swing.text.View.getDocument() definition code for javax.swing.text.View.getDocument() , getElement sample code for javax.swing.text.View.getElement() definition code for javax.swing.text.View.getElement() , getEndOffset sample code for javax.swing.text.View.getEndOffset() definition code for javax.swing.text.View.getEndOffset() , getGraphics sample code for javax.swing.text.View.getGraphics() definition code for javax.swing.text.View.getGraphics() , getParent sample code for javax.swing.text.View.getParent() definition code for javax.swing.text.View.getParent() , getStartOffset sample code for javax.swing.text.View.getStartOffset() definition code for javax.swing.text.View.getStartOffset() , getToolTipText sample code for javax.swing.text.View.getToolTipText(float, float, java.awt.Shape) definition code for javax.swing.text.View.getToolTipText(float, float, java.awt.Shape) , getViewFactory sample code for javax.swing.text.View.getViewFactory() definition code for javax.swing.text.View.getViewFactory() , getViewIndex sample code for javax.swing.text.View.getViewIndex(float, float, java.awt.Shape) definition code for javax.swing.text.View.getViewIndex(float, float, java.awt.Shape) , insert sample code for javax.swing.text.View.insert(int, javax.swing.text.View) definition code for javax.swing.text.View.insert(int, javax.swing.text.View) , insertUpdate sample code for javax.swing.text.View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.insertUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) , isVisible sample code for javax.swing.text.View.isVisible() definition code for javax.swing.text.View.isVisible() , modelToView sample code for javax.swing.text.View.modelToView(int, java.awt.Shape) definition code for javax.swing.text.View.modelToView(int, java.awt.Shape) , remove sample code for javax.swing.text.View.remove(int) definition code for javax.swing.text.View.remove(int) , removeAll sample code for javax.swing.text.View.removeAll() definition code for javax.swing.text.View.removeAll() , removeUpdate sample code for javax.swing.text.View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.removeUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) , updateChildren sample code for javax.swing.text.View.updateChildren(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.updateChildren(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, javax.swing.text.ViewFactory) , updateLayout sample code for javax.swing.text.View.updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape) definition code for javax.swing.text.View.updateLayout(javax.swing.event.DocumentEvent.ElementChange, javax.swing.event.DocumentEvent, java.awt.Shape) , viewToModel sample code for javax.swing.text.View.viewToModel(float, float, java.awt.Shape) definition code for javax.swing.text.View.viewToModel(float, float, java.awt.Shape)
 
Methods inherited from class java.lang.Object sample code for java.lang.Object definition code for java.lang.Object
clone sample code for java.lang.Object.clone() definition code for java.lang.Object.clone() , equals sample code for java.lang.Object.equals(java.lang.Object) definition code for java.lang.Object.equals(java.lang.Object) , finalize sample code for java.lang.Object.finalize() definition code for java.lang.Object.finalize() , getClass sample code for java.lang.Object.getClass() definition code for java.lang.Object.getClass() , hashCode sample code for java.lang.Object.hashCode() definition code for java.lang.Object.hashCode() , notify sample code for java.lang.Object.notify() definition code for java.lang.Object.notify() , notifyAll sample code for java.lang.Object.notifyAll() definition code for java.lang.Object.notifyAll() , toString sample code for java.lang.Object.toString() definition code for java.lang.Object.toString() , wait sample code for java.lang.Object.wait() definition code for java.lang.Object.wait() , wait sample code for java.lang.Object.wait(long) definition code for java.lang.Object.wait(long) , wait sample code for java.lang.Object.wait(long, int) definition code for java.lang.Object.wait(long, int)
 

Constructor Detail

BlockView sample code for javax.swing.text.html.BlockView(javax.swing.text.Element, int) definition code for javax.swing.text.html.BlockView(javax.swing.text.Element, int)

public BlockView(Element sample code for javax.swing.text.Element definition code for javax.swing.text.Element  elem,
                 int axis)
Creates a new view that represents an html box. This can be used for a number of elements.

Parameters:
elem - the element to create a view for
axis - either View.X_AXIS or View.Y_AXIS
Method Detail

setParent sample code for javax.swing.text.html.BlockView.setParent(javax.swing.text.View) definition code for javax.swing.text.html.BlockView.setParent(javax.swing.text.View)

public void setParent(View sample code for javax.swing.text.View definition code for javax.swing.text.View  parent)
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 setPropertiesFromAttributes() sample code for javax.swing.text.html.BlockView.setPropertiesFromAttributes() definition code for javax.swing.text.html.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 sample code for javax.swing.text.CompositeView.setParent(javax.swing.text.View) definition code for javax.swing.text.CompositeView.setParent(javax.swing.text.View) in class CompositeView sample code for javax.swing.text.CompositeView definition code for javax.swing.text.CompositeView
Parameters:
parent - the new parent, or null if the view is being removed from a parent it was previously added to

calculateMajorAxisRequirements sample code for javax.swing.text.html.BlockView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.html.BlockView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements)

protected SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements  calculateMajorAxisRequirements(int axis,
                                                          SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements  r)
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 sample code for javax.swing.text.BoxView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.BoxView.calculateMajorAxisRequirements(int, javax.swing.SizeRequirements) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - the axis being studied
r - the SizeRequirements object; if null one will be created
Returns:
the newly initialized SizeRequirements object
See Also:
SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements

calculateMinorAxisRequirements sample code for javax.swing.text.html.BlockView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.html.BlockView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements)

protected SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements  calculateMinorAxisRequirements(int axis,
                                                          SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements  r)
Calculate the requirements of the block along the minor axis (i.e. the axis orthoginal to 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:
calculateMinorAxisRequirements sample code for javax.swing.text.BoxView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements) definition code for javax.swing.text.BoxView.calculateMinorAxisRequirements(int, javax.swing.SizeRequirements) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - the axis being studied
r - the SizeRequirements object; if null one will be created
Returns:
the newly initialized SizeRequirements object
See Also:
SizeRequirements sample code for javax.swing.SizeRequirements definition code for javax.swing.SizeRequirements

layoutMinorAxis sample code for javax.swing.text.html.BlockView.layoutMinorAxis(int, int, int[], int[]) definition code for javax.swing.text.html.BlockView.layoutMinorAxis(int, int, int[], int[])

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). 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 sample code for javax.swing.text.BoxView.layoutMinorAxis(int, int, int[], int[]) definition code for javax.swing.text.BoxView.layoutMinorAxis(int, int, int[], int[]) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
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

paint sample code for javax.swing.text.html.BlockView.paint(java.awt.Graphics, java.awt.Shape) definition code for javax.swing.text.html.BlockView.paint(java.awt.Graphics, java.awt.Shape)

public void paint(Graphics sample code for java.awt.Graphics definition code for java.awt.Graphics  g,
                  Shape sample code for java.awt.Shape definition code for java.awt.Shape  allocation)
Renders using the given rendering surface and area on that surface. This is implemented to delegate to the css box painter to paint the border and background prior to the interior.

Overrides:
paint sample code for javax.swing.text.BoxView.paint(java.awt.Graphics, java.awt.Shape) definition code for javax.swing.text.BoxView.paint(java.awt.Graphics, java.awt.Shape) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
g - the rendering surface to use
allocation - the allocated region to render into
See Also:
View.paint(java.awt.Graphics, java.awt.Shape) sample code for javax.swing.text.View.paint(java.awt.Graphics, java.awt.Shape) definition code for javax.swing.text.View.paint(java.awt.Graphics, java.awt.Shape)

getAttributes sample code for javax.swing.text.html.BlockView.getAttributes() definition code for javax.swing.text.html.BlockView.getAttributes()

public AttributeSet sample code for javax.swing.text.AttributeSet definition code for javax.swing.text.AttributeSet  getAttributes()
Fetches the attributes to use when rendering. This is implemented to multiplex the attributes specified in the model with a StyleSheet.

Overrides:
getAttributes sample code for javax.swing.text.View.getAttributes() definition code for javax.swing.text.View.getAttributes() in class View sample code for javax.swing.text.View definition code for javax.swing.text.View

getResizeWeight sample code for javax.swing.text.html.BlockView.getResizeWeight(int) definition code for javax.swing.text.html.BlockView.getResizeWeight(int)

public int getResizeWeight(int axis)
Gets the resize weight.

Overrides:
getResizeWeight sample code for javax.swing.text.BoxView.getResizeWeight(int) definition code for javax.swing.text.BoxView.getResizeWeight(int) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - may be either X_AXIS or Y_AXIS
Returns:
the weight
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - for an invalid axis

getAlignment sample code for javax.swing.text.html.BlockView.getAlignment(int) definition code for javax.swing.text.html.BlockView.getAlignment(int)

public float getAlignment(int axis)
Gets the alignment.

Overrides:
getAlignment sample code for javax.swing.text.BoxView.getAlignment(int) definition code for javax.swing.text.BoxView.getAlignment(int) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - may be either X_AXIS or Y_AXIS
Returns:
the alignment

changedUpdate sample code for javax.swing.text.html.BlockView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.html.BlockView.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

public void changedUpdate(DocumentEvent sample code for javax.swing.event.DocumentEvent definition code for javax.swing.event.DocumentEvent  changes,
                          Shape sample code for java.awt.Shape definition code for java.awt.Shape  a,
                          ViewFactory sample code for javax.swing.text.ViewFactory definition code for javax.swing.text.ViewFactory  f)
Description copied from class: View sample code for javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)
Gives notification from the document that attributes were changed in a location that this view is responsible for. To reduce the burden to subclasses, this functionality is spread out into the following calls that subclasses can reimplement:
  1. updateChildren is called if there were any changes to the element this view is responsible for. If this view has child views that are represent the child elements, then this method should do whatever is necessary to make sure the child views correctly represent the model.
  2. forwardUpdate is called to forward the DocumentEvent to the appropriate child views.
  3. updateLayout is called to give the view a chance to either repair its layout, to reschedule layout, or do nothing.

Overrides:
changedUpdate sample code for javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) in class View sample code for javax.swing.text.View definition code for javax.swing.text.View
Parameters:
changes - the change information from the associated document
a - the current allocation of the view
f - the factory to use to rebuild if the view has children
See Also:
View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) sample code for javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory) definition code for javax.swing.text.View.changedUpdate(javax.swing.event.DocumentEvent, java.awt.Shape, javax.swing.text.ViewFactory)

getPreferredSpan sample code for javax.swing.text.html.BlockView.getPreferredSpan(int) definition code for javax.swing.text.html.BlockView.getPreferredSpan(int)

public float getPreferredSpan(int axis)
Determines the preferred span for this view along an axis.

Overrides:
getPreferredSpan sample code for javax.swing.text.BoxView.getPreferredSpan(int) definition code for javax.swing.text.BoxView.getPreferredSpan(int) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Returns:
the span the view would like to be rendered into >= 0; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the view
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - for an invalid axis type
See Also:
View.getPreferredSpan(int) sample code for javax.swing.text.View.getPreferredSpan(int) definition code for javax.swing.text.View.getPreferredSpan(int)

getMinimumSpan sample code for javax.swing.text.html.BlockView.getMinimumSpan(int) definition code for javax.swing.text.html.BlockView.getMinimumSpan(int)

public float getMinimumSpan(int axis)
Determines the minimum span for this view along an axis.

Overrides:
getMinimumSpan sample code for javax.swing.text.BoxView.getMinimumSpan(int) definition code for javax.swing.text.BoxView.getMinimumSpan(int) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Returns:
the span the view would like to be rendered into >= 0; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the view
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - for an invalid axis type
See Also:
View.getPreferredSpan(int) sample code for javax.swing.text.View.getPreferredSpan(int) definition code for javax.swing.text.View.getPreferredSpan(int)

getMaximumSpan sample code for javax.swing.text.html.BlockView.getMaximumSpan(int) definition code for javax.swing.text.html.BlockView.getMaximumSpan(int)

public float getMaximumSpan(int axis)
Determines the maximum span for this view along an axis.

Overrides:
getMaximumSpan sample code for javax.swing.text.BoxView.getMaximumSpan(int) definition code for javax.swing.text.BoxView.getMaximumSpan(int) in class BoxView sample code for javax.swing.text.BoxView definition code for javax.swing.text.BoxView
Parameters:
axis - may be either View.X_AXIS or View.Y_AXIS
Returns:
the span the view would like to be rendered into >= 0; typically the view is told to render into the span that is returned, although there is no guarantee; the parent may choose to resize or break the view
Throws:
IllegalArgumentException sample code for java.lang.IllegalArgumentException definition code for java.lang.IllegalArgumentException - for an invalid axis type
See Also:
View.getPreferredSpan(int) sample code for javax.swing.text.View.getPreferredSpan(int) definition code for javax.swing.text.View.getPreferredSpan(int)

setPropertiesFromAttributes sample code for javax.swing.text.html.BlockView.setPropertiesFromAttributes() definition code for javax.swing.text.html.BlockView.setPropertiesFromAttributes()

protected void setPropertiesFromAttributes()
Update any cached values that come from attributes.


getStyleSheet sample code for javax.swing.text.html.BlockView.getStyleSheet() definition code for javax.swing.text.html.BlockView.getStyleSheet()

protected StyleSheet sample code for javax.swing.text.html.StyleSheet definition code for javax.swing.text.html.StyleSheet  getStyleSheet()