public class HTMLTable extends HTMLContainer
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
bgImage |
protected java.awt.Color |
borderColor |
protected boolean |
calculateWidth |
protected int |
cellPadding |
protected int |
cellSpacing |
protected java.util.ArrayList<ColumnData> |
columns |
protected boolean |
fixedHeaders |
protected int |
headerAsFirstRow |
protected int |
headerBorder |
protected int |
headerCellPadding |
protected int |
headerCellSpacing |
protected java.lang.String |
height |
protected boolean |
highlightOddRow
Deprecated.
|
protected int |
maxColumn |
protected java.awt.Color |
oddRowColor |
protected int |
pixels |
protected java.lang.String |
rules |
protected java.lang.String |
scrollHeight |
protected java.lang.String |
scrollWidth |
protected int |
selectedRow |
protected java.lang.String |
tableAlignment |
protected java.lang.String |
width |
alignment, alt, bgColor, cancelBubble, events, gMutableTheme, hasInitFocus, id, intStyleSheet, items, name, parent, styleId, styleProperty, tabIndex, toolTip, VALID_NAME_REGEX, VALID_STYLE_REGEX
Constructor and Description |
---|
HTMLTable()
a table.
|
HTMLTable(int version) |
Modifier and Type | Method and Description |
---|---|
void |
addCellEvent(HTMLEvent event,
int row,
int col)
Adds an event to a cell.
|
void |
addComponent(HTMLComponent htmlRow)
Adds a component to this container
|
void |
addEvent(HTMLEvent event)
Adds an event to the table.
|
protected void |
compile(ClientBrowser browser)
This is the spot to put all your generation
of the HTML components.
|
protected void |
copyAttributes(HTMLTable table) |
ColumnData |
findColumnData(int col) |
int |
getBorder() |
HTMLComponent |
getCell(int row,
int col) |
java.awt.Color |
getCellBackGroundColor(int row,
int col) |
int |
getCellPadding() |
int |
getCellSpacing() |
java.lang.Object |
getCellTag(int row,
int col) |
HTMLComponent |
getHeader() |
int |
getHeaderRows() |
java.lang.String |
getId()
get the ID of this component
|
int |
getMaxColumn() |
HTMLRow |
getRow(int row) |
int |
getRows() |
protected java.lang.String |
getScrollHeight() |
protected java.lang.String |
getScrollWidth() |
int |
getVersion() |
java.lang.String |
getWidth() |
protected void |
iGenerate(ClientBrowser browser,
java.lang.StringBuilder buffer)
generate the raw HTML for this component.
|
protected void |
iGenerateAttributes(ClientBrowser browser,
java.lang.StringBuilder buffer) |
void |
insertCellInRow(HTMLComponent cell,
int row,
int col) |
void |
insertCellInRow(java.lang.String text,
int row,
int col) |
void |
makeRowIDs() |
void |
setBackGroundColor(java.awt.Color color) |
void |
setBackGroundImage(java.lang.String image) |
void |
setBorder(int pixels) |
void |
setBorderColor(java.awt.Color color) |
void |
setCalculateWidth(boolean fg) |
void |
setCaption(HTMLText caption) |
void |
setCaption(java.lang.String caption) |
void |
setCell(HTMLComponent cell,
int row,
int col) |
void |
setCell(java.lang.String text,
int row,
int col) |
void |
setCellAlignment(java.lang.String alignment,
int row,
int col) |
void |
setCellBackGroundColor(java.awt.Color bgcolor,
int row,
int col) |
void |
setCellBackGroundImage(java.lang.String url,
int row,
int col) |
void |
setCellColSpan(int span,
int row,
int col) |
void |
setCellHeight(java.lang.String height,
int row,
int col) |
void |
setCellID(java.lang.String ID,
int row,
int col)
Sets the ID of a cell
|
void |
setCellNoWrap(boolean noWrap,
int row,
int col) |
void |
setCellPadding(int pixels) |
void |
setCellRowSpan(int span,
int row,
int col) |
void |
setCellSpacing(int pixels) |
void |
setCellStyle(HTMLStyleSheet ss,
int row,
int col) |
void |
setCellStyleProperty(java.lang.String type,
java.lang.String value,
int row,
int col) |
void |
setCellTag(java.lang.Object o,
int row,
int col) |
void |
setCellToolTip(java.lang.String tip,
int row,
int col) |
void |
setCellVerticalAlignment(java.lang.String alignment,
int row,
int col) |
void |
setCellWidth(java.lang.String width,
int row,
int col) |
void |
setColumnAlignment(int col,
java.lang.String alignment) |
void |
setColumnHidden(int col,
boolean flag) |
void |
setColumnToolTip(int col,
java.lang.String toolTip) |
void |
setColumnVerticalAlignment(int col,
java.lang.String verticalAlignment)
TOP,BOTTOM or MIDDLE
|
void |
setColumnWidth(int col,
java.lang.String width) |
void |
setFixedHeaders(boolean fg) |
void |
setHeader(HTMLText header) |
void |
setHeader(java.lang.String text) |
void |
setHeaderAsFirstRow(boolean flag) |
void |
setHeaderAsFirstRow(int rows) |
void |
setHeaderBorder(int pixels) |
void |
setHeaderCellPadding(int pixels) |
void |
setHeaderCellSpacing(int pixels) |
void |
setHeight(java.lang.String h) |
void |
setHighlightOddRow(boolean on)
Deprecated.
|
void |
setId(java.lang.String id)
set the ID of this component.
|
void |
setOddRowColor(java.awt.Color c)
Set odd row color
|
void |
setRowBackGroundColor(java.awt.Color bgcolor,
int row) |
void |
setRowHeight(java.lang.String height,
int row) |
void |
setRowStyleProperty(java.lang.String type,
java.lang.String value,
int row) |
void |
setRules(java.lang.String rules) |
void |
setScrollHeight(java.lang.String h) |
void |
setScrollWidth(java.lang.String w) |
void |
setSelectedRow(int row) |
void |
setStyleProperty(java.lang.String type,
java.lang.String value)
Set the internal style of this component.
if this method is used for a component, this component will be appended a class attribute. If this method is used, iGenerateAttributes() method must be used to generate the CSS. |
void |
setTableAlignment(java.lang.String alignment) |
void |
setToolTip(java.lang.String toolTip) |
void |
setWidth(java.lang.String w) |
addComponent, addText, clear, findId, getComponent, getComponentCount, hasComponent, removeComponent, removeComponent
addJavaScript, addJavaScript, addOnLoadScript, appendClassName, checkIsContainer, copyAttributes, doBuildToolTip, fetchStyleProperty, getClassName, getMutableTheme, getParent, getParentPage, getStyleSheet, getTheme, hasTheme, iAddComponent, iAddComponent, iAddedToPage, iAddEvent, iClear, iFindId, iGenerateAttributesID, iGenerateComponent, iGenerateComponent, iGenerateEvents, iGetComponent, iGetComponentCount, iHasEvent, iRemoveComponent, isCompiled, iSetId, iSetName, iSetStyleId, makeColorID, makeListOfEvents, monitorPage, postCompile, resetParent, setAlignment, setAttribute, setClassName, setHasInitFocus, setParent, setTabIndex, touch
protected int pixels
protected int selectedRow
protected int maxColumn
protected int cellSpacing
protected int headerAsFirstRow
protected int cellPadding
protected int headerCellSpacing
protected int headerCellPadding
protected int headerBorder
protected boolean calculateWidth
protected boolean highlightOddRow
protected boolean fixedHeaders
protected java.util.ArrayList<ColumnData> columns
protected java.lang.String width
protected java.lang.String height
protected java.lang.String tableAlignment
protected java.lang.String rules
protected java.lang.String scrollWidth
protected java.lang.String scrollHeight
protected java.lang.String bgImage
protected java.awt.Color borderColor
protected java.awt.Color oddRowColor
public HTMLTable()
public HTMLTable(int version)
version
- the versionpublic int getVersion()
@CheckReturnValue @Nullable public java.lang.String getId()
getId
in class HTMLComponent
public void setId(java.lang.String id)
id
- The id of the componentpublic void setToolTip(java.lang.String toolTip)
toolTip
- public void setSelectedRow(int row)
row
- the row to usepublic void setRules(java.lang.String rules)
rules
- public void setBorder(int pixels)
pixels
- public int getBorder()
public void setBackGroundColor(java.awt.Color color)
color
- public void setBackGroundImage(java.lang.String image)
image
- public void setBorderColor(java.awt.Color color)
color
- public void setHighlightOddRow(boolean on)
on
- public void setHeaderAsFirstRow(boolean flag)
flag
- public void setHeaderAsFirstRow(int rows)
rows
- public int getHeaderRows()
public void setTableAlignment(java.lang.String alignment)
alignment
- public void setCellSpacing(int pixels)
pixels
- public int getCellSpacing()
public void setCellPadding(int pixels)
pixels
- public int getCellPadding()
public void setHeaderCellSpacing(int pixels)
pixels
- public void setHeaderBorder(int pixels)
pixels
- public void setHeaderCellPadding(int pixels)
pixels
- public void setWidth(java.lang.String w)
w
- public java.lang.String getWidth()
public void setHeight(java.lang.String h)
h
- public void setScrollWidth(java.lang.String w)
w
- public void setScrollHeight(java.lang.String h)
h
- public void setFixedHeaders(boolean fg)
fg
- public void setCalculateWidth(boolean fg)
fg
- public void setCaption(HTMLText caption)
caption
- public void setCaption(java.lang.String caption)
caption
- public void setHeader(java.lang.String text)
text
- public void setHeader(HTMLText header)
header
- public HTMLComponent getHeader()
@Nullable public HTMLComponent getCell(int row, int col)
row
- the row to usecol
- the columnpublic int getRows()
public HTMLRow getRow(int row)
row
- the row to usepublic void setRowStyleProperty(java.lang.String type, java.lang.String value, int row)
type
- the typevalue
- the valuerow
- the row to usepublic void setCellStyleProperty(java.lang.String type, java.lang.String value, int row, int col)
type
- the typevalue
- the valuerow
- the row to usecol
- the columnpublic void setStyleProperty(java.lang.String type, java.lang.String value)
HTMLComponent
setStyleProperty
in class HTMLComponent
type
- the typevalue
- the valuepublic void setCellBackGroundColor(java.awt.Color bgcolor, int row, int col)
bgcolor
- row
- the row to usecol
- the columnpublic void setRowBackGroundColor(java.awt.Color bgcolor, int row)
bgcolor
- row
- the row to usepublic void setOddRowColor(java.awt.Color c)
c
- colorpublic void setCellBackGroundImage(java.lang.String url, int row, int col)
url
- row
- the row to usecol
- the columnpublic void setCellID(java.lang.String ID, int row, int col)
ID
- row
- the row to usecol
- the columnpublic void addCellEvent(HTMLEvent event, int row, int col)
event
- the eventrow
- the row to usecol
- the columnpublic void addEvent(HTMLEvent event)
event
- the eventpublic void setCellAlignment(java.lang.String alignment, int row, int col)
alignment
- row
- the row to usecol
- the columnpublic void setCellStyle(HTMLStyleSheet ss, int row, int col)
ss
- row
- the row to usecol
- the columnpublic void setCellNoWrap(boolean noWrap, int row, int col)
noWrap
- row
- the row to usecol
- the columnpublic void setCellColSpan(int span, int row, int col)
span
- row
- the row to usecol
- the columnpublic void setCellWidth(java.lang.String width, int row, int col)
width
- row
- the row to usecol
- the columnpublic void setCellHeight(java.lang.String height, int row, int col)
height
- row
- the row to usecol
- the columnpublic void setCellVerticalAlignment(java.lang.String alignment, int row, int col)
alignment
- row
- the row to usecol
- the columnpublic void setRowHeight(java.lang.String height, int row)
height
- row
- the row to usepublic void setCellRowSpan(int span, int row, int col)
span
- row
- the row to usecol
- the columnpublic void setCellToolTip(java.lang.String tip, int row, int col)
tip
- row
- the row to usecol
- the columnpublic void setCell(java.lang.String text, int row, int col)
text
- row
- the row to usecol
- the columnpublic void setCellTag(java.lang.Object o, int row, int col)
o
- row
- the row to usecol
- the columnpublic java.lang.Object getCellTag(int row, int col)
row
- the row to usecol
- the columnpublic void insertCellInRow(java.lang.String text, int row, int col)
text
- row
- the row to usecol
- the columnpublic void insertCellInRow(HTMLComponent cell, int row, int col)
cell
- row
- the row to usecol
- the columnpublic int getMaxColumn()
public void setCell(HTMLComponent cell, int row, int col)
cell
- row
- the row to usecol
- the columnpublic void addComponent(HTMLComponent htmlRow)
HTMLContainer
addComponent
in class HTMLContainer
htmlRow
- public void setColumnHidden(int col, boolean flag)
col
- the columnflag
- public void setColumnWidth(int col, java.lang.String width)
col
- the columnwidth
- public void setColumnToolTip(int col, java.lang.String toolTip)
col
- the columntoolTip
- public void setColumnAlignment(int col, java.lang.String alignment)
col
- the columnalignment
- public void setColumnVerticalAlignment(int col, java.lang.String verticalAlignment)
col
- the columnverticalAlignment
- public ColumnData findColumnData(int col)
col
- the columnpublic void makeRowIDs()
protected void iGenerate(ClientBrowser browser, java.lang.StringBuilder buffer)
iGenerate
in class HTMLComponent
browser
- The target browserbuffer
- The generate HTMLprotected void iGenerateAttributes(ClientBrowser browser, java.lang.StringBuilder buffer)
iGenerateAttributes
in class HTMLComponent
browser
- buffer
- protected void compile(ClientBrowser browser)
compile
in class HTMLComponent
browser
- protected void copyAttributes(HTMLTable table)
table
- protected java.lang.String getScrollWidth()
protected java.lang.String getScrollHeight()
public java.awt.Color getCellBackGroundColor(int row, int col)
row
- the row to usecol
- the columnstSoftware Copyright © 2001-2014 stSoftware All Rights Reserved.