javax.swing.text.html
Class TableView.CellView
java.lang.Object
javax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
javax.swing.text.html.BlockView
javax.swing.text.html.TableView.CellView
- All Implemented Interfaces:
- SwingConstants
- Enclosing class:
- TableView
- class TableView.CellView
- extends BlockView
Default view of an html table cell. This needs to be moved
somewhere else.
Fields inherited from class javax.swing.text.html.BlockView |
|
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.html.BlockView |
calculateMinorAxisRequirements, changedUpdate, getAlignment, getAttributes, getMaximumSpan, getMinimumSpan, getPreferredSpan, getResizeWeight, getStyleSheet, isPercentage, layoutMinorAxis, paint, setParent, 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, 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 |
TableView.CellView
public TableView.CellView(Element elem)
- Constructs a TableCell for the given element.
- Parameters:
elem
- the element that this view is responsible for
layoutMajorAxis
protected void layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
- Perform layout for the major axis of the box (i.e. 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 major axis. This is called by the
superclass to recalculate the positions of the child views
when the layout might have changed.
This is implemented to delegate to the superclass to
tile the children. If the target span is greater than
was needed, the offsets are adjusted to align the children
(i.e. position according to the html valign attribute).
- Overrides:
layoutMajorAxis
in class BoxView
- Parameters:
targetSpan
- the total span given to the view, which
whould be used to layout the childrenaxis
- the axis being layed outoffsets
- 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 methodspans
- 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
calculateMajorAxisRequirements
protected SizeRequirements calculateMajorAxisRequirements(int axis,
SizeRequirements r)
- Calculate the requirements needed along the major axis.
This is called by the superclass whenever the requirements
need to be updated (i.e. a preferenceChanged was messaged
through this view).
This is implemented to delegate to the superclass, but
indicate the maximum size is very large (i.e. the cell
is willing to expend to occupy the full height of the row).
- Overrides:
calculateMajorAxisRequirements
in class BlockView
- Parameters:
axis
- the axis being layed out.r
- the requirements to fill in. If null, a new one
should be allocated.