www.element4solution.com

e4s.html
Class TR

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.html.E4HtmlElementGeneral
              extended by e4s.html.E4HtmlElement
                  extended by e4s.html.TR
All Implemented Interfaces:
E4HtmlElement_Intf

public class TR
extends E4HtmlElement
implements E4HtmlElement_Intf

a <TR>-tag representation. The TR element is intended to hold and display data for a single <TR> row. Each table consists of rows (<TR;gt;) and each row consists of cells (<TD;gt;).

Example_Table.java

Since:
JDK 1.4
See Also:
TD, TABLE.TR()

Field Summary
static STYLE_Name DEFAULTSTYLE
           
static java.lang.String HTML_TAG
           
 
Fields inherited from class e4s.html.E4HtmlElementGeneral
m_elements, m_needed_scripts
 
Fields inherited from class e4s.html.E4HtmlObject
m_parent_e4sID
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Constructor Summary
TR()
           
TR(E4ID parent_id)
           
TR(E4ID parent_id, STYLE_Name parent_style)
           
TR(STYLE_Name parent_style)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void addElement(TD td)
           
 E4Color getBgColor()
          Get the color for the whole row by setting the <TD BGCOLOR=".."
 int getColCount()
          Count the <TD> elements within this >TR<.
 FONT getFONT()
           
 E4Color getHighlightColor()
          Get the color for highlighting a tablerow on mouse-over effects.
 void reorderColumns(int[] idx)
           
 void setBgColor(E4Color color)
          Sets the color for the whole row by setting the <TD BGCOLOR=".."
 void setEventHandler(E4EventHandlerTR handler)
          Set an event handler.
 void setFONT(FONT font)
          Set the font for all TD elements that are added later to this TR using TD().
 void setHighlightColor(E4Color color)
          Set the color for highlighting a tablerow on mouse-over effects.
 void setId(java.lang.String id)
          Define an ID for the TR tag.
 void setSTYLE(CLASS_Name class_name)
           
 void Spacer(int len)
          Create a 'spacer' <TF> tag.
 void swapColumns(int a, int b)
          Changes two elements (propably this will be TD elements.
 TD TD()
          Create a TD element, associated with this TR element.
 TD TD(Align align)
           
 TD TD(Align align, VAlign valign)
           
 TD[] TD(int columns)
          Create an array of TD elements.
 TD[] TD(int columns, Align align, VAlign valign)
          Create a number of TD elements.
 TD TD(VAlign valign)
           
 TD TD(VAlign valign, Align align)
           
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 
Methods inherited from class e4s.html.E4HtmlElement
addElement, addElement, addElement, copyElements, print
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectScripts, collectStylesForEditing, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, collectTranslationsForEditing, createScript, createScript, debugToString, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getSTYLE, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeAll, removeElementById, removeElements, removeElements, removeStyle, setId, setReadOnly, setStyle, setStyle, setSTYLE, setValue, Style, Style, toHtml_hidden, validate
 
Methods inherited from class e4s.html.E4HtmlObject
E4ID, E4ID, set_e4sID
 
Methods inherited from class e4s.util.E4Object
Calendar, CName, CName, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelApp, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelNone, E4LabelSys, E4LabelSys, e4sCopyright, e4sVersion, encode, encode, encode, encodeHtml, encodeHtml, encodeHtml, encodeURL, encodeURL, encodeURL, finalize, getLINE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTRACE, getTraceMemory, HtmlEncode, HtmlEncode, HtmlEncode, isdecimal, isdigit, isnotok, isnotok, isnumeric, isok, isok, isok, isok, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingFunction, lastCallingStack, mkdirs, null2nbsp, null2nbsp, null2nbsp, ok, ok, ok, ok, outPrintln, setLogFile4Trace, setTraceMemory, STACKTRACE, toDebug, toDouble, toFloat, toFloat, toString, TRACE_CALLS, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, TRACE, wait
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, collectScripts, collectStylesForEditing, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

HTML_TAG

public static final java.lang.String HTML_TAG
See Also:
Constant Field Values

DEFAULTSTYLE

public static final STYLE_Name DEFAULTSTYLE
Constructor Detail

TR

public TR(E4ID parent_id,
          STYLE_Name parent_style)

TR

public TR(STYLE_Name parent_style)

TR

public TR()

TR

public TR(E4ID parent_id)
Method Detail

setSTYLE

public void setSTYLE(CLASS_Name class_name)

TD

public TD TD()
Create a TD element, associated with this TR element.

Returns:
the new created TD element

TD

public TD[] TD(int columns,
               Align align,
               VAlign valign)
Create a number of TD elements.

Parameters:
columns - the size of the TD array (= number of columns), number must be > 0
align - horizontal alignment
valign - vertical alignment
Returns:
an array of TD elements, all elements of the current TR

TD

public TD[] TD(int columns)
Create an array of TD elements.

Parameters:
columns - the size of the TD array (= number of columns), number must be > 0
Returns:
an array of TD elements, all elements of the current TR

TD

public TD TD(Align align)

TD

public TD TD(VAlign valign)

TD

public TD TD(VAlign valign,
             Align align)

TD

public TD TD(Align align,
             VAlign valign)

setBgColor

public void setBgColor(E4Color color)
Sets the color for the whole row by setting the <TD BGCOLOR=".."> attribute. This function needs to be called before (!) any TD is added by TD().

Parameters:
color - the color to be set or null to remove any previous specified color.
See Also:
TD.setBgColor(e4s.html.E4Color)

getBgColor

public E4Color getBgColor()
Get the color for the whole row by setting the <TD BGCOLOR=".."> attribute. This function needs to be called before (!) any TD is added by TD().

Parameters:
color - the color to be set or null to remove any previous specified color.
See Also:
setBgColor(e4s.html.E4Color), TD.getBgColor()

setHighlightColor

public void setHighlightColor(E4Color color)
Set the color for highlighting a tablerow on mouse-over effects.

Parameters:
color - the color for the highlight effect, or null to turn off highlighting
See Also:
setBgColor( e4s.html.E4Color ), getHighlightColor()

getHighlightColor

public E4Color getHighlightColor()
Get the color for highlighting a tablerow on mouse-over effects.

Returns:
the color for the highlight effect, or null to turn off highlighting
See Also:
getBgColor(), setHighlightColor( e4s.html.E4Color )

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
Description copied from interface: E4HtmlElement_Intf
Create the HTML output for this element. Also run throught all child elements, and call their E4HtmlElement_Intf.toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function to generate output of those objects which becomes appended. Normally, there is no need to call this function anyway, and this also might result in side effects of too-early relasing of objects in some cases. This function is called by E4ServletImplementation_Intf.write(e4s.html.E4HtmlElement) on the top level HTML element (common this is a HTML or BODY element) and branches down to all child elements.

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class E4HtmlElementGeneral
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

getColCount

public int getColCount()
Count the <TD> elements within this >TR<.

Returns:
the number of columns. 0 if none.

setFONT

public void setFONT(FONT font)
Set the font for all TD elements that are added later to this TR using TD(). Note that this function must be called before any TD are added.

Parameters:
font - the font or null to remove any previous specified font definition
See Also:
getFONT(), TD.setFONT(e4s.html.FONT)

getFONT

public FONT getFONT()

Spacer

public void Spacer(int len)
Create a 'spacer' <TF> tag.

Parameters:
len - width of the spacer in pixel, a value of -1 indicates 100%

addElement

public void addElement(TD td)

setId

public void setId(java.lang.String id)
Define an ID for the TR tag.


swapColumns

public void swapColumns(int a,
                        int b)
Changes two elements (propably this will be TD elements.

Parameters:
a - index of the fist element
b - index of the second element
See Also:
TABLE.swapColumns(int,int)

reorderColumns

public void reorderColumns(int[] idx)

setEventHandler

public void setEventHandler(E4EventHandlerTR handler)
Set an event handler. This results into a <A OnClick=".." > tag, using E4JavaScript to execute some action defined in the handler due to a specified event in the handler (e.g. On-Click, On-Mouse-Over, ..). Note that there can be more than one event handler defined.

Parameters:
handler - the event-handle

_getSVNVersionString

public static java.lang.String _getSVNVersionString()
Get version info string from subversion.

Returns:
the version info string.
See Also:
E4Util.getRevisionCodeFromSVN(Class)

www.element4solution.com