eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'HTML::Table':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: Table (in HTML)


Inheritance:

   Object
   |
   +--HTML::AbstractElement
      |
      +--HTML::AbstractHTMLElement
         |
         +--HTML::Table

Package:
stx:goodies/webServer/htmlTree
Category:
Net-Documents-HTML-ModelTree-Table
Version:
rev: 1.39 date: 2018/04/26 10:29:09
user: cg
file: HTML__Table.st directory: goodies/webServer/htmlTree
module: stx stc-classLibrary: htmlTree
Author:
Martin Walser

Description:


HTML table object


[instance variables:]
    -

[class variables:]
    -


Related information:

    TableBody
    TableHead
    TableFoot
    TableRow
    TableDataCell
    TableHeaderCell
    Caption

Class protocol:

required protocol
o  tagName


Instance protocol:

interface-attributes
o  bgcolor: aColorSpec

o  cellPadding
Return the cellpadding of the table.
The cellpadding is the spacing within the cells.

o  cellPadding: aLength
Set the cellpadding of the table.
The cellpadding is the spacing within the cells.

o  cellSpacing
Return the cellspacing of the table.
The cellspacing is the spacing between the cells.

o  cellSpacing: aLength
Set the cellspacing of the table..
The cellspacing is the spacing between the cells.

o  cellpadding
Return the cellpadding of the table.
The cellpadding is the spacing within the cells.

o  cellpadding: aLength
Set the cellpadding of the table.
The cellpadding is the spacing within the cells.

o  cellspacing
Return the cellspacing of the table.
The cellspacing is the spacing between the cells.

o  cellspacing: aLength
Set the cellspacing of the table..
The cellspacing is the spacing between the cells.

o  height
Return the height of the table.

o  height: aNumberOrPercentString
Set the height of the table.

o  summary
Return a text with purpose and structure of table.

o  summary: aStringOrText
Set a text with purpose and structure of table.

o  vspace: verticalSpace
Set the vertical spacing (space above and below) of the table.

o  width
Return the width of the table.

o  width: aNumberOrPercentString
set the width of the table.

interface-attributes-frame
o  frame
Return the frame of the table.
The frame is the outer borders.

Possible frame types are:
void, above, below, hsides,
lh, rhs, vsides, box, border

o  frame: aFrameType
Set the frame of the table.
The frame is the outer borders.

Possible frame types are:
void, above, below, hsides,
lh, rhs, vsides, box, border

o  frameAbove
Set frame to be at above.
The frame is the outer borders.

o  frameBelow
Set frame to be at below.
The frame is the outer borders.

o  frameBorder
Set the frame to be border.
The frame is the outer borders.

o  frameBox
Set the frame to be as box.
The frame is the outer borders.

o  frameHorizontalSides
Set the frame to be at horizontal sides.
The frame is the outer borders.

o  frameLeftHorizontalSide
Set frame to be at left horizontal sides.
The frame is the outer borders.

o  frameRightHorizontalSide
Set frame to be at right horizontal side.
The frame is the outer borders.

o  frameVerticalSides
Set the frame to be at vertical sides.
The frame is the outer borders.

interface-attributes-rules
o  beRulesAll
Set rules to be rows.
The rules are the inner borders.

o  beRulesColumns
Set rules to be columns.
The rules are the inner borders.

o  beRulesGroups
Set rules to be groups.
The rules are the inner borders.

o  beRulesNone
Set rules to have no rules.
The rules are the inner borders.

o  beRulesRows
Set rules to be rows.
The rules are the inner borders.

o  rules
Return the rules of the table.
The rules are the inner borders.

Possible frame types are:
none, groups, rows, cols, all

o  rules: aRuleType
Set the rules of the table.
The rules are the inner borders.

Possible frame types are:
none, groups, rows, cols, all

interface-elements
o  caption
Return the caption of the table.
The caption is the heading of a table.

o  caption: aCaptionOrString
Set the caption of the table.
The caption is the heading of a table.
You can set a caption element or a simple string.

o  foot
Return the foot of the table.

o  foot: aFoot
Set the table foot.
A foot can be a ready built table foot, a simple string to be wrapped
by a table foot or a collection of heading cells or strings to be the
foot cells of the head.

o  head
Return the head of the table.

o  head: aHead
Set the table head. The head is the heading or headline of the table.
A head can be a ready built table head, a simple string to be wrapped
by a table head or a collection of heading cells or strings to be the
heading cells of the head.

interface-elements-body
o  addBody
Build an empty body and
add it to the children.

o  addBody: aTableBodyOrString
Add a table body to the children of this table.
The passed table body can be a ready built table body,
a simple string to be wrapped in a body, or a collection
of table rows. These table rows can be either ready built
table rows or simple strings too.

o  body
Return a default body,
it is the first body found.
If no body can be found nil.

o  bodyAt: anIndex
Return an existing body at the given index or nil.

interface-elements-cell
o  bodyAt: aBodyIndex rowAt: aRowIndex cellAt: aCellIndex
Find a cell by the given indices.
Return nil if one of the indices doesn't exist.

o  bodyAt: aBodyIndex rowAt: aRowIndex cellAt: aCellIndex put: aBodyOrString
Set a cell at the given indices.
The cell can be a cell element
or a simple string.

o  cellAt: aCellIndexPoint
Find a cell by the given indices.
Return nil if one of the indices doesn't exist.

o  cellAt: anIndexPoint put: aBodyOrString
Set a cell at the given index.
The cell can be a cell element
or a simple string.

o  rowAt: aRowIndex cellAt: aCellIndex
Find a cell by the given indices.
Return nil if one of the indices doesn't exist.

o  rowAt: aRowIndex cellAt: aCellIndex put: aBodyOrString
Set a cell at the given indices.
The cell can be a cell element
or a simple string.

interface-elements-foot
o  footCellAt: aCellIndex
Return the head cell at a cell index.

o  footCellAt: aCellIndex put: aHeadingCellOrString
Set the head cell at a cell index.

interface-elements-head
o  headCellAt: aCellIndex
Return the head cell at a cell index.

o  headCellAt: aCellIndex put: aHeadingCellOrString
Set the head cell at a cell index.

interface-elements-row
o  addRow
Build a new empty table row.

o  addRow: aTableRow
Add a table row to the children of this table.
The passed table row can be a ready built table row,
a simple string to be wrapped in a row, or a collection
of data cells. These data cells can be either ready built
data cells or simple strings too.

o  bodyAt: aBodyIndex rowAt: aRowIndex
Find a row by the given indices.
Return nil if one of the indices doesn't exist.

o  bodyAt: aBodyIndex rowAt: aRowIndex put: aBodyOrString
Set a row at the given indices.

o  rowAt: anIndex
Try to find a row at the given index.
Look first in a body if one exists,
then look at the children for direct rows.

private-accessing
o  getBody
Return a body to add rows.
If no body exists, build one.

o  getBodyAt: aBodyIndex
Return a body at the given index.
If not exists build one.

o  getCaption
Return a caption.
If no caption exists, build one.

o  getFoot
Return a head to add head cells.
If no head exists, build one.

o  getHead
Return a head to add head cells.
If no head exists, build one.

queries
o  canHaveChild: anElement in: aParser
self halt.

o  canHaveText
(comment from inherited method)
return true, if I allow text as child (i.f. PCDATA)

required-visiting
o  acceptHTMLVisitor: aVisitor
visitor pattern: dispatch me to the visitor

o  subelementsDo: aOneArgumentBlock
Execute a one argument block additionally for caption, head and foot

testing
o  isBlockElement

o  isTable


Examples:


Building a table:
    |table|
    table := Table new.
    table border:  1.
    table caption: 'This is the caption of a generated table'.
    table head:    #('Hans' 'Otto' 'Karl' 'Kurt' 'Gerd' 'John' 'Bert').
    table addRow:  #(373 937 363 836 217 832 234).
    table addRow:  #(945 123 534 345 563 343 342).
    table foot:    #(111 222 333 444 555 666 777).
    table htmlString.
Accessing a single cell:
    |table cell|
    table := HTML::Table new.
    table addBody:  #( #(678 212 131 200 344)
                       #(312 567 112 678 120)
                       #(177 314 234 189 789)).

    cell := table cellAt:3@2.
    cell bgColor:Color red.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Wed, 30 Nov 2022 16:42:08 GMT