java.lang.Object
javax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.html.BlockView
- All Implemented Interfaces:
- javax.swing.SwingConstants
- Direct Known Subclasses:
- ListView
- public class BlockView
- extends javax.swing.text.BoxView
| Fields inherited from class javax.swing.text.BoxView |
|
| 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 |
| 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, dump, 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 |
BlockView
public BlockView(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.
setParent
public void setParent(javax.swing.text.View parent)
- Creates the parent view for this. It is called before
any other methods, if the parent view is working properly.
Implemented to forward to the superclass and call
setPropertiesFromAttributes to set the paragraph
properties.
calculateMajorAxisRequirements
protected javax.swing.SizeRequirements calculateMajorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
- Calculates the requirements along the major axis.
This is implemented to call the superclass and then
adjust it if the CSS width or height attribute is specified
and applicable.
calculateMinorAxisRequirements
protected javax.swing.SizeRequirements calculateMinorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
- Calculates the requirements along the minor axis.
This is implemented to call the superclass and then
adjust it if the CSS width or height attribute is specified
and applicable.
layoutMinorAxis
protected void layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
- Lays out the box along the minor axis (the axis that is
perpendicular to the axis that it represents). The results
of the layout are placed in the given arrays which are
the allocations to the children along the minor axis.
paint
public void paint(java.awt.Graphics g,
java.awt.Shape a)
- Paints using the given graphics configuration and shape.
This delegates to the css box painter to paint the
border and background prior to the interior.
getAttributes
public javax.swing.text.AttributeSet getAttributes()
- Fetches the attributes to use when painting.
getResizeWeight
public int getResizeWeight(int axis)
throws java.lang.IllegalArgumentException
- Gets the resize weight.
getAlignment
public float getAlignment(int axis)
- Gets the alignment.
changedUpdate
public void changedUpdate(javax.swing.event.DocumentEvent ev,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
- Gives notification from the document that attributes were
changed in a location that this view is responsible for.
getPreferredSpan
public float getPreferredSpan(int axis)
throws java.lang.IllegalArgumentException
- Determines the preferred span along the axis.
getMinimumSpan
public float getMinimumSpan(int axis)
throws java.lang.IllegalArgumentException
- Determines the minimum span along the axis.
getMaximumSpan
public float getMaximumSpan(int axis)
throws java.lang.IllegalArgumentException
- Determines the maximum span along the axis.
setPropertiesFromAttributes
protected void setPropertiesFromAttributes()
- Updates any cached values that come from attributes.
getStyleSheet
protected StyleSheet getStyleSheet()
- Gets the default style sheet.