|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--objectivehtml.oms.OMSObject | +--objectivehtml.htmlwidget.HtmlElement | +--objectivehtml.htmlwidget.HtmlWidget | +--objectivehtml.htmlwidget.HtmlContainerWidget | +--objectivehtml.htmlwidget.HtmlTableCell
This class represents a html table cell (default) or html table header. i.e.
<td ... ><th ... >
This object can either a table cell (default) or table header. To change the object to be a table header call setTableHeader(boolean).
This object can only exist inside a HtmlTable object.
setTableHeader(boolean)
,
HtmlTable
Fields inherited from class objectivehtml.htmlwidget.HtmlContainerWidget |
m_alChildrenWidgets, m_bAutoEscape, m_sText |
Fields inherited from class objectivehtml.htmlwidget.HtmlWidget |
m_bDestroyed, m_bVisible, m_objHtmlForm, m_objParentWidget |
Fields inherited from class objectivehtml.htmlwidget.HtmlElement |
m_hmAttributes, m_sEndTag, m_sQuoteType, m_sStartTag |
Constructor Summary | |
protected |
HtmlTableCell(HtmlTableRow objParent)
Constructs an instance of HtmlTableCell. |
Method Summary | |
void |
appendChild(HtmlWidget objHtmlWidget)
Overrides the access level to make this method public. |
java.lang.String |
getAlign()
Returns the alignment style of this object. |
java.lang.String |
getBgColor()
Returns the background color of this object. |
int |
getColSpan()
Returns column span of this table cell. |
java.lang.String |
getHeight()
Returns the height of this object. |
HtmlTable |
getHtmlTable()
Returns a reference to the table that this table cell is contained in. |
int |
getRowSpan()
Returns row span of this table cell. |
java.lang.String |
getVAlign()
Returns the vertical alignment style of this object. |
java.lang.String |
getWidth()
Returns the width of this object. |
void |
insertChild(HtmlWidget objHtmlWidget,
int nPosition)
Overrides the access level to make this method public. |
boolean |
isNoWrap()
Returns true if no-wrap is on, false otherwise. |
boolean |
isTableHeader()
Returns whether this is a table header object. |
void |
setAlign(java.lang.String sAlign)
Sets the alignment style of this object. |
void |
setAttribute(java.lang.String sAttribute,
java.lang.String sValue)
Sets a html attribute for this object. |
void |
setBgColor(java.lang.String sBgColor)
Sets the background color of this object. |
void |
setBooleanAttribute(java.lang.String sAttribute,
boolean bIsOn)
Sets a html boolean-attribute for this object. |
void |
setColSpan(int nColSpan)
Sets the col span of this table cell. |
void |
setHeight(java.lang.String sHeight)
Sets the height of this object. |
void |
setNoWrap(boolean bNoWrap)
Sets the table cell to either wrap or to not wrap text. |
void |
setRowSpan(int nRowSpan)
Sets the row span of this table cell. |
void |
setTableHeader(boolean bTableHeader)
Sets the object to be either table cell or table header. |
void |
setVAlign(java.lang.String sVAlign)
Sets the vertical alignment style of this object. |
void |
setWidth(java.lang.String sWidth)
Sets the width of this object. |
Methods inherited from class objectivehtml.htmlwidget.HtmlContainerWidget |
addHtmlWidget, destroy, generateUpdateOrder, getChildrenCount, getChildrenWidgets, getChildWidget, getText, indexOfChildWidget, insertHtmlWidget, isAutoEscape, isChildWidget, isValidChildWidget, printHtml, printHtml, removeHtmlWidget, setAttribute, setAutoEscape, setBooleanAttribute, setText, setVisible, swapHtmlWidgets |
Methods inherited from class objectivehtml.htmlwidget.HtmlWidget |
changeParent, changeParent, getClassAttribute, getHtmlForm, getID, getOnClick, getOnDblClick, getOnKeyDown, getOnKeyPress, getOnKeyUp, getOnMouseDown, getOnMouseMove, getOnMouseOut, getOnMouseOver, getOnMouseUp, getParent, getStyle, isDestroyed, isVisible, setClassAttribute, setID, setOnClick, setOnDblClick, setOnKeyDown, setOnKeyPress, setOnKeyUp, setOnMouseDown, setOnMouseMove, setOnMouseOut, setOnMouseOver, setOnMouseUp, setStyle |
Methods inherited from class objectivehtml.htmlwidget.HtmlElement |
genEndTag, genStartTag, genStartTag, getAttribute, getAttributes, getBooleanAttribute, getQuoteType, printHtml, printHtml, printHtml, printHtml, printHtml, printHtml, setQuoteType, toString, toString |
Methods inherited from class objectivehtml.oms.OMSObject |
compareClasses, connect, disconnect, emit, isAlive, setAlive, signal, slot, slot |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
protected HtmlTableCell(HtmlTableRow objParent) throws InvalidParentWidgetException, InvalidChildWidgetException
objParent
- the parent for this widgetInvalidParentWidgetException
- if the specified parent widget is not validInvalidChildWidgetException
- if the parent widget does not accept this widget as a childMethod Detail |
public void setTableHeader(boolean bTableHeader)
bTableHeader
- true if table header, false if table cellisTableHeader()
public boolean isTableHeader()
setTableHeader(boolean)
public HtmlTable getHtmlTable()
public void appendChild(HtmlWidget objHtmlWidget) throws NotEqualsHtmlFormException, InvalidChildWidgetException
appendChild
in class HtmlContainerWidget
objHtmlWidget
- the widget that is to be appendedNotEqualsHtmlFormException
- if the widget is not in the same formInvalidChildWidgetException
- if this widget does not accept objHtmlWidget as a childpublic void insertChild(HtmlWidget objHtmlWidget, int nPosition) throws NotEqualsHtmlFormException, InvalidChildWidgetException
insertChild
in class HtmlContainerWidget
objHtmlWidget
- the widget that is to be appendednPosition
- the position the new child is to inserted (starts from 0)NotEqualsHtmlFormException
- if the widget is not in the same formInvalidChildWidgetException
- if this widget does not accept objHtmlWidget as a childpublic java.lang.String getAlign()
setAlign(String)
public void setAlign(java.lang.String sAlign)
Sets the alignment style of this object. Suitable values are "left", "center", "right", "justify" and "char".
The html attribute it sets is "align".
If null is specified the attribute is cleared.
sAlign
- the alignment style for this widget,
if null is specified then this attribute
will be clearedgetAlign()
public java.lang.String getVAlign()
setVAlign(String)
public void setVAlign(java.lang.String sVAlign)
Sets the vertical alignment style of this object. Suitable values are "top", "middle", "bottom" and "baseline".
The html attribute it sets is "valign".
If null is specified the attribute is cleared.
sVAlign
- the vertical alignment style for this widget,
if null is specified then this attribute
will be clearedgetVAlign()
public java.lang.String getBgColor()
setBgColor(String)
public void setBgColor(java.lang.String sBgColor)
Sets the background color of this object. There 16 preset values "black", "silver", "gray", "white", "maroon", "red", "purple", "fushcia", "green", "lime", "olive", "yellow", "navy", "blue", "teal" and "navy". For all other colors you can specify the color in the format SRGB, i.e. #RRGGBB.
The html attribute it sets is "bgcolor".
If null is specified the attribute is cleared.
sBgColor
- the background color for this widget,
if null is specified then this attribute
will be clearedgetBgColor()
public void setNoWrap(boolean bNoWrap)
Sets the table cell to either wrap or to not wrap text.
The html attribute it sets is "wrap".
If false is specified the attribute is cleared.
bNoWrap
- true if you do not want wrapping, false if you do want wrappingsetBooleanAttribute(String, boolean)
,
isNoWrap()
public boolean isNoWrap()
HtmlElement.getBooleanAttribute(String)
,
setNoWrap(boolean)
public java.lang.String getWidth()
setWidth(String)
public void setWidth(java.lang.String sWidth)
Sets the width of this object. There are 2 formats that can be used. The first is to give a precise pixel value, e.g. "400", meaning the object will attempt to be 400 pixels wide. The second is to give a percentage, this means the object will attempt to occupy that percentage of the available space to it. e.g. "80%", meaning the object will attempt to occupy 80 percent of the width space that is available to it.
The html attribute it sets is "width".
If null is specified the attribute is cleared.
sWidth
- the width size for this widget,
if null is specified then this attribute
will be clearedgetWidth()
public java.lang.String getHeight()
setHeight(String)
public void setHeight(java.lang.String sHeight)
Sets the height of this object. There are 2 formats that can be used. The first is to give a precise pixel value, e.g. "400", meaning the object will attempt to be 400 pixels high. The second is to give a percentage, this means the object will attempt to occupy that percentage of the available space to it. e.g. "80%", meaning the object will attempt to occupy 80 percent of the height space that is available to it.
The html attribute it sets is "height".
If null is specified the attribute is cleared.
sHeight
- the height size for this widget,
if null is specified then this attribute
will be clearedgetHeight()
public int getRowSpan()
HtmlElement.getAttribute(String)
,
setRowSpan(int)
public void setRowSpan(int nRowSpan)
Sets the row span of this table cell. When the row span is greater than 1 this table cell will occupy the space of its neighbouring table cells (to the right of itself). e.g. If the row span is 3, then the table cell will occupy the space of the next 2 table cells on its right. For the table cells that are spanned over they will become hidden.
The html attribute it sets is "rowspan".
If 0 or less is specified the attribute is cleared.
nRowSpan
- the row spangetRowSpan()
,
setColSpan(int)
,
HtmlTable.updateVisibility()
public int getColSpan()
HtmlElement.getAttribute(String)
,
setColSpan(int)
public void setColSpan(int nColSpan)
Sets the col span of this table cell. When the col span is greater than 1 this table cell will occupy the space of its neighbouring table cells (that is below itself). e.g. If the col span is 3, then the table cell will occupy the space of the next 2 table cells underneath itself. For the table cells that are spanned over they will become hidden.
The html attribute it sets is "colspan".
If 0 or less is specified the attribute is cleared.
nColSpan
- the col spangetColSpan()
,
setRowSpan(int)
,
HtmlTable.updateVisibility()
public void setAttribute(java.lang.String sAttribute, java.lang.String sValue) throws InvalidAttributeException
Sets a html attribute for this object. The name of the attribute is case-insensitive.
Calls parent version of the method but stops the "rowspan" or "colspan" attribute being changed! If "rowspan" or "colspan" is specified then an InvalidAttributeException is thrown.
setAttribute
in class HtmlElement
sName
- the name of the attributesValue
- the value of the attribute, if null is specified
then the attribute will be clearedInvalidAttributeException
- if the name is not validsetBooleanAttribute(String, boolean)
public void setBooleanAttribute(java.lang.String sAttribute, boolean bIsOn) throws InvalidAttributeException
Sets a html boolean-attribute for this object. The name of the attribute is case-insensitive.
Calls parent version of the method but stops the "rowspan" or "colspan" attribute being changed! If "rowspan" or "colspan" is specified then an InvalidAttributeException is thrown.
setBooleanAttribute
in class HtmlElement
sName
- the name of the attributebIsOn
- true if attribute should be set, if false
is specified then the attribute is clearedInvalidAttributeException
- if the name is not validsetAttribute(String, String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |