www.element4solution.com

e4s.html.list
Class E4SortedListItem

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.list.E4SortedListItem
All Implemented Interfaces:
E4SortedList_Intf

public class E4SortedListItem
extends E4Object
implements E4SortedList_Intf

A generic implementation of the E4SortedList_Intf, used for representing data in E4SortedList objects.

See Also:
E4SortedList, E4SortedListElement

Field Summary
static E4LabelSys BOOLEAN_NO
           
static E4LabelSys BOOLEAN_YES
           
 
Fields inherited from class e4s.util.E4Object
CRLF, E4S_CORE_SYSTEM_LANGUAGE, NBSP, NULLSTR, URL_ENCODING_CHARSET
 
Fields inherited from interface e4s.html.list.E4SortedList_Intf
PRIMARY_SORT_BOTTOM, PRIMARY_SORT_MIDDLE, PRIMARY_SORT_TOP
 
Constructor Summary
E4SortedListItem()
           
E4SortedListItem(int defaultsize)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 boolean canSelect()
          In the case, that an action method is defined for the header, check if this element can be selected.
 int compareTo(E4SortedList_Intf element, int column)
          Compare a particular column with another element.
 E4Color getBgColor()
          Get the background color for this row.
 java.lang.String getData4Parameter(int column)
          Get the data to be used as parameter for the specified column.
 int getPrimarySort()
          Get the primary sort value.
 void set(int column, B value)
          Set the value of a column.
 void set(int column, boolean value)
          Set the value of a column.
 void set(int column, java.util.Date value)
          Set the value of a column.
 void set(int column, E4Long value)
          Set the value of a column.
 void set(int column, E4String value)
          Set the value of a column.
 void set(int column, float value)
          Set the value of a column.
 void set(int column, FONT value)
          Set the value of a column.
 void set(int column, I value)
          Set the value of a column.
 void set(int column, IMG value)
          Set the value of a column.
 void set(int column, int value)
          Set the value of a column.
 void set(int column, Language dest_lang, E4Label_Intf value)
          Set the value of a column.
 void set(int column, long value)
          Set the value of a column.
 void set(int column, java.lang.String value)
          Set the value of a column.
 void set(int column, TABLE value)
          Set the value of a column.
 void setBgColor(E4Color color)
          Set the background color for this row.
 void setPrimarySort(int primarysort)
          Set the primary sort value.
 java.lang.String toHtml(int column, E4SortedListColumn coldef, E4ServletImplementation_Intf servlet)
          Get the data for the specified column.
 
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
 

Field Detail

BOOLEAN_YES

public static E4LabelSys BOOLEAN_YES

BOOLEAN_NO

public static E4LabelSys BOOLEAN_NO
Constructor Detail

E4SortedListItem

public E4SortedListItem()

E4SortedListItem

public E4SortedListItem(int defaultsize)
Method Detail

setPrimarySort

public void setPrimarySort(int primarysort)
Set the primary sort value. The primary sort mechanism is used to establish rows that apear explicit on the top of the table always (E4SortedList_Intf.PRIMARY_SORT_TOP) or at the bottom of the table (E4SortedList_Intf.PRIMARY_SORT_BOTTOM. All other rows must have a value of E4SortedList_Intf.PRIMARY_SORT_MIDDLE. Sorting also works within the groupings. It is recommended to use one of the constant definitions, but feel free to use your own values. The default is E4SortedList_Intf.PRIMARY_SORT_MIDDLE, and if you choose your own values you should put this into consideration and assign always a value.

Parameters:
primarysort - the value of the primary sort.
See Also:
getPrimarySort(), E4SortedList_Intf.PRIMARY_SORT_TOP, E4SortedList_Intf.PRIMARY_SORT_MIDDLE, E4SortedList_Intf.PRIMARY_SORT_BOTTOM

set

public void set(int column,
                long value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                E4Long value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                int value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                java.lang.String value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                E4String value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                Language dest_lang,
                E4Label_Intf value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                java.util.Date value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                boolean value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                float value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                IMG value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                B value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                I value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                FONT value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

set

public void set(int column,
                TABLE value)
Set the value of a column.

Parameters:
column - column count starts at 0, and is 1 below the number specified on the Constructor
value - the value to be set

getPrimarySort

public int getPrimarySort()
Get the primary sort value. The primary sort mechanism is used to establish rows that apear explicit on the top of the table always (E4SortedList_Intf.PRIMARY_SORT_TOP) or at the bottom of the table (E4SortedList_Intf.PRIMARY_SORT_BOTTOM. All other rows must have a value of E4SortedList_Intf.PRIMARY_SORT_MIDDLE. Sorting also works within the groupings.

Specified by:
getPrimarySort in interface E4SortedList_Intf
Returns:
the value of the primary sort.
See Also:
setPrimarySort(int), E4SortedList_Intf.PRIMARY_SORT_TOP, E4SortedList_Intf.PRIMARY_SORT_MIDDLE, E4SortedList_Intf.PRIMARY_SORT_BOTTOM

setBgColor

public void setBgColor(E4Color color)
Set the background color for this row.

Parameters:
color - the backgroundcolor or null if default shall be used.
See Also:
getBgColor()

getBgColor

public E4Color getBgColor()
Get the background color for this row.

Specified by:
getBgColor in interface E4SortedList_Intf
Returns:
the backgroundcolor or null if default shall be used.
See Also:
setBgColor(e4s.html.E4Color)

compareTo

public int compareTo(E4SortedList_Intf element,
                     int column)
Compare a particular column with another element. This enables the e4s to support a sorting functionality on those lists.

Specified by:
compareTo in interface E4SortedList_Intf
Parameters:
element - the second element to compare with
column - column count starts at 0, and is 1 below the number specified on the Constructor
Returns:
The result is a negative integer if this Object precedes the argument Object. The result is a positive integer if this Object follows the argument Object. The result is zero if the Objects are equal.

toHtml

public java.lang.String toHtml(int column,
                               E4SortedListColumn coldef,
                               E4ServletImplementation_Intf servlet)
                        throws java.lang.Exception
Get the data for the specified column.

Specified by:
toHtml in interface E4SortedList_Intf
Parameters:
column - the specified column, starting with 0
Returns:
a String representing the content for display (including all tags)
Throws:
java.lang.Exception

canSelect

public boolean canSelect()
Description copied from interface: E4SortedList_Intf
In the case, that an action method is defined for the header, check if this element can be selected.

Specified by:
canSelect in interface E4SortedList_Intf
Returns:
true if this element can be selected.

getData4Parameter

public java.lang.String getData4Parameter(int column)
Description copied from interface: E4SortedList_Intf
Get the data to be used as parameter for the specified column.

Specified by:
getData4Parameter in interface E4SortedList_Intf
Parameters:
column - the specified column, starting with 0
Returns:
a String representing the data (including no tags)

_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