This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
javax.swing.text
class TableView.TableRow
- All Implemented Interfaces:
- SwingConstants
- Enclosing class:
- TableView
public class TableView.TableRow
extends BoxView
View of a row in a row-centric table.
Constructor Summary |
Constructs a TableView for the given element.
|
Method Summary |
int |
Determines the resizability of the view along the
given axis.
|
protected View |
Fetches the child view that represents the given position in
the model.
|
protected void |
Perform layout for the major axis of the box (i.e.
|
protected void |
Perform layout for the minor axis of the box (i.e.
|
void |
Change the child views.
|
Methods inherited from class javax.swing.text.BoxView |
baselineLayout, baselineRequirements, calculateMajorAxisRequirements, calculateMinorAxisRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getMaximumSpan, getMinimumSpan, getOffset, getPreferredSpan, getResizeWeight, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, layoutMajorAxis, layoutMinorAxis, modelToView, paint, paintChild, preferenceChanged, replace, setAxis, setSize, viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
childAllocation, flipEastAndWestAtEnds, getBottomInset, getChildAllocation, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewAtPoint, getViewAtPosition, getViewCount, getViewIndex, getViewIndexAtPosition, isAfter, isBefore, loadChildren, modelToView, modelToView, replace, setInsets, setParagraphInsets, setParent, viewToModel |
Methods inherited from class javax.swing.text.View |
append, breakView, changedUpdate, createFragment, forwardUpdate, forwardUpdateToView, getAlignment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getEndOffset, getGraphics, getMaximumSpan, getMinimumSpan, getNextVisualPositionFrom, getParent, getPreferredSpan, getResizeWeight, getStartOffset, getToolTipText, getView, getViewCount, getViewFactory, getViewIndex, getViewIndex, insert, insertUpdate, isVisible, modelToView, modelToView, modelToView, paint, preferenceChanged, remove, removeAll, removeUpdate, replace, setParent, setSize, updateChildren, updateLayout, viewToModel, viewToModel |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TableView.TableRow
public TableView.TableRow(Element elem)
-
Constructs a TableView for the given element.
- Parameters:
elem
- the element that this view is responsible for
getResizeWeight
public int getResizeWeight(int axis)
-
Determines the resizability of the view along the
given axis. A value of 0 or less is not resizable.
- Overrides:
getResizeWeight
in class BoxView
- Parameters:
axis
- may be either View.X_AXIS or View.Y_AXIS
- Returns:
- the resize weight
getViewAtPosition
protected View getViewAtPosition(int pos,
Rectangle a)
-
Fetches the child view that represents the given position in
the model. This is implemented to walk through the children
looking for a range that contains the given position. In this
view the children do not necessarily have a one to one mapping
with the child elements.
- Overrides:
getViewAtPosition
in class CompositeView
- Parameters:
pos
- the search position >= 0
a
- the allocation to the table on entry, and the
allocation of the view containing the position on exit
- Returns:
- the view representing the given position, or
null
if there isn't one
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 re-implemented to give each child the span of the column
width for the table, and to give cells that span multiple columns
the multi-column span.
- Overrides:
layoutMajorAxis
in class BoxView
- Parameters:
targetSpan
- the total span given to the view, which
whould be used to layout the children.
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.
layoutMinorAxis
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. This
is called by the superclass whenever the layout needs to be
updated along the minor axis.
This is implemented to delegate to the superclass, then adjust
the span for any cell that spans multiple rows.
- Overrides:
layoutMinorAxis
in class BoxView
- Parameters:
targetSpan
- the total span given to the view, which
whould be used to layout the children.
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.
replace
public void replace(int offset,
int length,
View[] views)
-
Change the child views. This is implemented to
provide the superclass behavior and invalidate the
grid so that rows and columns will be recalculated.
- Overrides:
replace
in class BoxView
- Parameters:
offset
length
views
This documentation differs from the official API.
Jadeite adds
extra features to the API including:
variable font sizes,
constructions examples,
placeholders for classes and methods, and auto-generated “See Also” links.
Additionally it
is missing some items found in standard Javadoc documentation, including:
generics type information,
“Deprecated” tags and comments,
“See Also” links,
along with other minor differences.
Please send any questions or feedback to
bam@cs.cmu.edu.
This page displays the
Jadeite version of the documention, which is derived from the offical documentation that contains this copyright notice:
The official Sun™ documentation can be found here at
http://java.sun.com/javase/6/docs/api/.