|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.text.View
com.inet.html.views.BoxView
com.inet.html.views.TableView
public class TableView
This view is represents a table container. It is responsible to build a consistent table structure.
Doing so it may move views which are not correct as defined by the HTML standard.
NOTE: This class only structures, it does no layout operations! This is part of the TableLayout
Nested Class Summary | |
---|---|
class |
TableView.TableCellInfo
Contains informations about a table cell. |
class |
TableView.TableColumnGroupInfo
Contains informations about a table column group. |
class |
TableView.TableColumnInfo
Contains informations about a table column. |
class |
TableView.TableContainer
The table content except the caption. |
class |
TableView.TableRowGroup
Contains informations about a group of rows. |
class |
TableView.TableRowInfo
Contains informations about a table row. |
Field Summary |
---|
Fields inherited from class com.inet.html.views.BoxView |
---|
BASELINE, STATUS_REQ_LAYOUT, STATUS_REQ_PRELAYOUT, STATUS_UPTODATE |
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 | |
---|---|
TableView(javax.swing.text.Element elem)
Reads all table data an initiates subviews |
|
TableView(javax.swing.text.Element elem,
ViewPainter viewPainter)
Reads all table data an initiates subviews |
Method Summary | |
---|---|
void |
appendElement(javax.swing.text.Element elem)
Adds an element to this table. |
void |
changedUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
int |
getHTMLBorderValue()
Returns the html border property or -1 if none is set |
Layout |
getLayout()
Returns the used Layout Object |
float |
getMinimumSpan(int axis)
|
float |
getPreferredSpan(int axis)
|
java.awt.Rectangle |
getSpan()
Returns the span of this view. |
TableView.TableContainer |
getTableContainer()
Returns the table container, which contains a structured and correct model of the table |
javax.swing.text.View |
getView(int n)
|
int |
getViewCount()
|
void |
insertUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
static boolean |
isTableContainerElement(javax.swing.text.Element elem)
Indicates whether elem is da table element which can hold other table elements |
java.awt.Shape |
modelToView(int pos,
java.awt.Shape a,
javax.swing.text.Position.Bias b)
|
void |
paint(java.awt.Graphics g,
java.awt.Shape allocation)
|
java.awt.Rectangle |
performLayout(boolean hard)
This is the final layout method. |
void |
performLayoutVAlign(int baseline)
If this box has a overall vertical align, like in table cells for instance, this method calculates teh offset to align the content. |
void |
performLayoutWidth()
Layout what is required to determin the width of this view. |
void |
performPreLayout()
Causes this view to layout all fixed values and to calculate it's minimum and preferred width. |
void |
predictWidth(int width)
Can be used to force a view to a specified width. |
void |
removeUpdate(javax.swing.event.DocumentEvent e,
java.awt.Shape a,
javax.swing.text.ViewFactory f)
|
void |
setParent(javax.swing.text.View parent)
Sets the parent and constructs the table from the element tree |
java.lang.String |
toString()
|
int |
viewToModel(float x,
float y,
java.awt.Shape a,
javax.swing.text.Position.Bias[] biasReturn)
|
Methods inherited from class javax.swing.text.View |
---|
append, breakView, createFragment, getAttributes, getBreakWeight, getChildAllocation, getContainer, getDocument, getElement, getGraphics, getMaximumSpan, getNextVisualPositionFrom, getParent, getToolTipText, getViewFactory, getViewIndex, insert, isVisible, modelToView, modelToView, preferenceChanged, remove, removeAll, replace, viewToModel |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableView(javax.swing.text.Element elem)
elem
- Table root elementpublic TableView(javax.swing.text.Element elem, ViewPainter viewPainter)
elem
- Table root elementviewPainter
- painter to use for painting the viewMethod Detail |
---|
public void setParent(javax.swing.text.View parent)
setParent
in class BoxView
parent
- The parent view of this tablepublic void appendElement(javax.swing.text.Element elem)
elem
- the element to add subclassespublic static boolean isTableContainerElement(javax.swing.text.Element elem)
elem
- the inspected element
public java.awt.Rectangle performLayout(boolean hard)
performLayout
in class BoxView
hard
- If set to true, the status of the children will be ignored and all views will be layouted. This
should be done on view-size changes. If set to false the status of the children will be respected and
up-to-date views will not be layouted again.
public void performLayoutWidth()
performLayoutWidth
in class BoxView
public float getPreferredSpan(int axis)
getPreferredSpan
in class javax.swing.text.View
public float getMinimumSpan(int axis)
getMinimumSpan
in class javax.swing.text.View
public java.awt.Shape modelToView(int pos, java.awt.Shape a, javax.swing.text.Position.Bias b) throws javax.swing.text.BadLocationException
modelToView
in class javax.swing.text.View
javax.swing.text.BadLocationException
public int viewToModel(float x, float y, java.awt.Shape a, javax.swing.text.Position.Bias[] biasReturn)
viewToModel
in class javax.swing.text.View
public void paint(java.awt.Graphics g, java.awt.Shape allocation)
paint
in class BoxView
public TableView.TableContainer getTableContainer()
public void performPreLayout()
performPreLayout
in interface ILayouted
performPreLayout
in class BoxView
public Layout getLayout()
getLayout
in interface ILayouted
public void predictWidth(int width)
predictWidth
in interface ILayouted
width
- Width to setpublic java.lang.String toString()
toString
in class java.lang.Object
public void performLayoutVAlign(int baseline)
performLayoutVAlign
in class BoxView
baseline
- external prediction of the first baseline for BASELINE alignmentpublic void insertUpdate(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
insertUpdate
in class javax.swing.text.View
public void removeUpdate(javax.swing.event.DocumentEvent e, java.awt.Shape a, javax.swing.text.ViewFactory f)
removeUpdate
in class javax.swing.text.View
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 int getHTMLBorderValue()
public int getViewCount()
getViewCount
in class javax.swing.text.View
public javax.swing.text.View getView(int n)
getView
in class javax.swing.text.View
public java.awt.Rectangle getSpan()
getSpan
in class BoxView
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |