|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.views.layouts.Layout
com.inet.html.views.layouts.TableLayout
public class TableLayout
This class defines the table layout. Reference: http://www.w3.org/TR/1998/REC-CSS2/tables.html http://www.w3.org/TR/REC-html40/struct/tables.html
Nested Class Summary | |
---|---|
class |
TableLayout.CellPositionInfo
Extended TableLayout.CellPositionInfo to place table cells. |
Nested classes/interfaces inherited from class com.inet.html.views.layouts.Layout |
---|
Layout.PositionInfo, Layout.ViewPosition |
Field Summary |
---|
Fields inherited from class com.inet.html.views.layouts.Layout |
---|
MARKER_OFFSET |
Constructor Summary | |
---|---|
TableLayout(BoxView view)
Creates a new table layout for the specified view |
Method Summary | |
---|---|
java.awt.Rectangle |
getSpan()
Returns the area affected by the current layout or any of it's siblings, relative the it's own left upper corner. |
ViewPositionInfo |
getViewForPosition(java.awt.Point position,
java.awt.Rectangle a)
Finds the view and it's location for a specific point of the screen |
boolean |
isBorderCollapse()
Returns whether border-collapse is enabled |
java.awt.Rectangle |
layout(boolean hard)
This method will do the final layouting |
void |
layoutVerticalAlign(int align,
int baselineOffset)
This method performs the vertical alignment of the whole content within the box. |
void |
layoutWidth()
Set the width of the layouted component. |
java.awt.Shape |
modelToView(int pos,
java.awt.Shape a,
javax.swing.text.Position.Bias b)
Tries to find the rectangle representing a given model-position. |
void |
predictWidth(int width)
Can be used to force a view to a specified width. |
void |
preLayout()
Prepares the layout of this table and arranges the cell matrix. |
int |
viewToModel(float x,
float y,
java.awt.Shape a,
javax.swing.text.Position.Bias[] biasReturn)
Searches the view-tree for a specified point and returns the model-offset for this position. |
Methods inherited from class com.inet.html.views.layouts.Layout |
---|
getChildAllocation, getChildPosition, getChildren, getCurrentHeight, getCurrentLeft, getCurrentSpan, getCurrentTop, getCurrentWidth, getMinimumHeight, getMinimumSpan, getMinimumWidth, getPreferredHeight, getPreferredSpan, getPreferredWidth, getView, getViewCount, isPreLayouted, offsetRelative, replace, setCurrentHeight, setCurrentWidth, setPreLayouted, toString, union, union |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TableLayout(BoxView view)
view
- view to layoutMethod Detail |
---|
public java.awt.Rectangle layout(boolean hard)
layout
in class Layout
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 preLayout()
preLayout
in class Layout
public void layoutWidth()
layoutWidth
in class Layout
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 Layout
pos
- the model position to be founda
- the reference area for the search process, is supposed to be the surrounding rectangle of the current viewb
- the search direction, empty interface implementation, has no effect
null
javax.swing.text.BadLocationException
- will be thrown if pos
is outside the model's rangepublic int viewToModel(float x, float y, java.awt.Shape a, javax.swing.text.Position.Bias[] biasReturn)
viewToModel
in class Layout
x
- root-relative X offset in pixely
- root-relative Y offset in pixela
- the bounds of the current viewbiasReturn
- the search direction, empty interface implementation, has no effect
public void predictWidth(int width)
predictWidth
in class Layout
width
- Width to setpublic boolean isBorderCollapse()
public void layoutVerticalAlign(int align, int baselineOffset)
layoutVerticalAlign
in class Layout
align
- The AlignValue constantbaselineOffset
- The difference between the contents top and the first baseline in pixelpublic ViewPositionInfo getViewForPosition(java.awt.Point position, java.awt.Rectangle a)
getViewForPosition
in class Layout
position
- the location to searcha
- the bounds of THIS view
public java.awt.Rectangle getSpan()
getSpan
in class Layout
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |