|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.View
javax.swing.text.CompositeView
javax.swing.text.BoxView
com.lightdev.app.shtm.SHTMLTableView.RowView
public class SHTMLTableView.RowView
View of a row in a row-centric table.
Field Summary |
---|
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 | |
---|---|
SHTMLTableView.RowView(javax.swing.text.Element elem)
Constructs a TableView for the given element. |
Method Summary | |
---|---|
protected javax.swing.SizeRequirements |
calculateMajorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
|
protected javax.swing.SizeRequirements |
calculateMinorAxisRequirements(int axis,
javax.swing.SizeRequirements r)
Calculate the height requirements of the table row. |
void |
changedUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
javax.swing.text.AttributeSet |
getAttributes()
Fetches the attributes to use when rendering. |
float |
getMaximumSpan(int axis)
|
float |
getMinimumSpan(int axis)
|
float |
getPreferredSpan(int axis)
|
int |
getResizeWeight(int axis)
Determines the resizability of the view along the given axis. |
protected javax.swing.text.html.StyleSheet |
getStyleSheet()
|
protected javax.swing.text.View |
getViewAtPosition(int pos,
java.awt.Rectangle a)
Fetches the child view that represents the given position in the model. |
protected void |
layoutMajorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
Perform layout for the major axis of the box (i.e. |
protected void |
layoutMinorAxis(int targetSpan,
int axis,
int[] offsets,
int[] spans)
Perform layout for the minor axis of the box (i.e. |
void |
paint(java.awt.Graphics g,
java.awt.Shape allocation)
Renders using the given rendering surface and area on that surface. |
void |
preferenceChanged(javax.swing.text.View child,
boolean width,
boolean height)
This is called by a child to indicate its preferred span has changed. |
void |
replace(int offset,
int length,
javax.swing.text.View[] views)
Change the child views. |
Methods inherited from class javax.swing.text.BoxView |
---|
baselineLayout, baselineRequirements, childAllocation, flipEastAndWestAtEnds, forwardUpdate, getAlignment, getAxis, getChildAllocation, getHeight, getOffset, getSpan, getViewAtPoint, getWidth, isAfter, isAllocationValid, isBefore, isLayoutValid, layout, layoutChanged, modelToView, paintChild, setAxis, setSize, viewToModel |
Methods inherited from class javax.swing.text.CompositeView |
---|
getBottomInset, getInsideAllocation, getLeftInset, getNextEastWestVisualPositionFrom, getNextNorthSouthVisualPositionFrom, getNextVisualPositionFrom, getRightInset, getTopInset, getView, getViewCount, getViewIndex, getViewIndexAtPosition, loadChildren, modelToView, setInsets, setParagraphInsets, setParent |
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 |
Constructor Detail |
---|
public SHTMLTableView.RowView(javax.swing.text.Element elem)
elem
- the element that this view is responsible forMethod Detail |
---|
public javax.swing.text.AttributeSet getAttributes()
getAttributes
in class javax.swing.text.View
protected javax.swing.text.html.StyleSheet getStyleSheet()
public void preferenceChanged(javax.swing.text.View child, boolean width, boolean height)
preferenceChanged
in class javax.swing.text.BoxView
child
- the child viewwidth
- true if the width preference should changeheight
- true if the height preference should changeprotected javax.swing.SizeRequirements calculateMajorAxisRequirements(int axis, javax.swing.SizeRequirements r)
calculateMajorAxisRequirements
in class javax.swing.text.BoxView
public float getMinimumSpan(int axis)
getMinimumSpan
in class javax.swing.text.BoxView
public float getMaximumSpan(int axis)
getMaximumSpan
in class javax.swing.text.BoxView
public float getPreferredSpan(int axis)
getPreferredSpan
in class javax.swing.text.BoxView
public void changedUpdate(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
changedUpdate
in class javax.swing.text.View
public void paint(java.awt.Graphics g, java.awt.Shape allocation)
paint
in class javax.swing.text.BoxView
g
- the rendering surface to useallocation
- the allocated region to render intoView.paint(java.awt.Graphics, java.awt.Shape)
public void replace(int offset, int length, javax.swing.text.View[] views)
replace
in class javax.swing.text.BoxView
protected javax.swing.SizeRequirements calculateMinorAxisRequirements(int axis, javax.swing.SizeRequirements r)
calculateMinorAxisRequirements
in class javax.swing.text.BoxView
protected void layoutMajorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
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.
layoutMajorAxis
in class javax.swing.text.BoxView
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 methodprotected void layoutMinorAxis(int targetSpan, int axis, int[] offsets, int[] spans)
This is implemented to delegate to the superclass, then adjust the span for any cell that spans multiple rows.
layoutMinorAxis
in class javax.swing.text.BoxView
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 methodpublic int getResizeWeight(int axis)
getResizeWeight
in class javax.swing.text.BoxView
axis
- may be either View.X_AXIS or View.Y_AXIS
java.lang.IllegalArgumentException
- for an invalid axisprotected javax.swing.text.View getViewAtPosition(int pos, java.awt.Rectangle a)
getViewAtPosition
in class javax.swing.text.CompositeView
pos
- the search position >= 0a
- the allocation to the table on entry, and the
allocation of the view containing the position on exit
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |