www.element4solution.com

e4s.html.list
Class E4SortedList

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.E4HtmlElementPersistant
                      extended by e4s.html.TABLE
                          extended by e4s.html.list.E4SortedList
All Implemented Interfaces:
E4HtmlElement_Intf

public class E4SortedList
extends TABLE

E4SortedList element (a <TABLE> where the sort order of the columns can be changed).

Since:
JDK 1.4
See Also:
E4SortedListColumn, E4SortedListItem, E4SortedList_Intf, E4SortedListElement, E4EditingElement

Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.html.TABLE
TABLE.E4TableElement, TABLE.TBODY, TABLE.TFOOT, TABLE.THEAD
 
Field Summary
static java.lang.String _JS_NAME_CHGSORT
           
 
Fields inherited from class e4s.html.TABLE
DEFAULTSTYLE, HTML_TAG
 
Fields inherited from class e4s.html.E4HtmlElementGeneral
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
E4SortedList(E4ID parent_id, java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
E4SortedList(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void addAdditionalParameters(E4CgiParams params, E4ServletImplementation_Intf servlet)
          When the sort (or similar other functions) are called, pass those parameters to the called method.
 void addElement(E4SortedList_Intf obj)
           
 void collectStylesForEditing(E4StylesHash v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with style definitions used so far during display of this page.
 void collectTranslationsForEditing(E4TranslationsVec v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with translation texts used so far during display of this page.
 E4SortedListColumn defineColumn(Align alignment)
           
 E4SortedListColumn defineColumn(Align alignment, E4Label_Intf label)
           
 E4SortedListColumn defineColumn(Align alignment, E4Label_Intf label, java.lang.String paramname)
           
 E4SortedListColumn defineColumn(Align alignment, java.lang.String label)
           
 E4SortedListColumn defineColumn(Align alignment, java.lang.String label, java.lang.String paramname)
           
 void defineColumn(E4SortedListColumn col)
           
 E4SortedListColumn defineHiddenColumn(java.lang.String paramname)
          Define a non-visible column.
 E4ID E4ID()
          Get the E4ID of the object.
 E4CgiParams getAdditionalParameters()
           
 CLASS_Name getClass_Body()
           
 E4SortedListColumn[] getHeader()
           
 E4SortedListColumn getHeader(int col)
           
 java.lang.Object getHeaderBackground()
          Get the header definition for background.
static E4SortedList getSortedList(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
 void removeColumnDefinitions()
           
 void removeElements()
          Remove all elements.
 void resetAllSortFlags()
           
 void resetColumns()
           
 void setActionSort(E4Method mref, E4ServletImplementation_Intf servlet)
           
 void setClass_Body(CLASS_Name classname)
           
 void setClass_Body(STYLE_Name style)
           
 void setClass_Data(CLASS_Name classname)
           
 void setClass_Header(CLASS_Name classname)
           
 void setClass_SubHeader(CLASS_Name classname)
           
 void setFont(FONT f)
           
 void setHeaderBackground(E4Color color)
           
 void setHeaderBackground(IMG img)
           
 void setSTYLE(CLASS_Name class_name)
           
 void sort(int column)
           
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 void toTable(E4ServletImplementation_Intf servlet)
           
 
Methods inherited from class e4s.html.TABLE
addElement, E4S_DEFAULT_TABLE, getBgColor, getBgImage, getBorder, getBorderColor, getCellBgColor, getFONT, Header, Header, Header, Header, Header, Header, Header, Header, Header, Header, Header, Header, Header, insertRow, removeElements, reorderColumns, setBgColor, setBgImage, setBorder, setBorderColor, setBorderColor, setCellBgColor, setCellpadding, setCellspacing, setCellspacing, setColGroup, setFONT, setHeight, setHeight, setHeightMax, setHeightMaximum, setHeightPercentage, setHeightPixel, setId, setWidth, setWidth, setWidthMax, setWidthMaximum, setWidthPercentage, setWidthPixel, swapColumns, TBODY, TD, TD, TFOOT, THEAD, TR, twoColumns, twoColumns, twoColumns, twoColumns
 
Methods inherited from class e4s.html.E4HtmlElementPersistant
preventFromRemoving, preventFromRemoving, removeAll
 
Methods inherited from class e4s.html.E4HtmlElement
addElement, addElement, copyElements, print
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectScripts, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, createScript, createScript, debugToString, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getSTYLE, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeElementById, removeStyle, setId, setReadOnly, setStyle, setStyle, setSTYLE, setValue, Style, Style, toHtml_hidden, validate
 
Methods inherited from class e4s.html.E4HtmlObject
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, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

_JS_NAME_CHGSORT

public static final java.lang.String _JS_NAME_CHGSORT
See Also:
Constant Field Values
Constructor Detail

E4SortedList

public E4SortedList(java.lang.String persistantObjId,
                    E4ServletImplementation_Intf servlet)

E4SortedList

public E4SortedList(E4ID parent_id,
                    java.lang.String persistantObjId,
                    E4ServletImplementation_Intf servlet)
Method Detail

setHeaderBackground

public void setHeaderBackground(IMG img)

setHeaderBackground

public void setHeaderBackground(E4Color color)

getHeaderBackground

public java.lang.Object getHeaderBackground()
Get the header definition for background.

Returns:
null or either a E4Color object or an IMG object.

getSortedList

public static E4SortedList getSortedList(java.lang.String persistantObjId,
                                         E4ServletImplementation_Intf servlet)

setSTYLE

public void setSTYLE(CLASS_Name class_name)
Overrides:
setSTYLE in class TABLE

setFont

public void setFont(FONT f)

defineColumn

public E4SortedListColumn defineColumn(Align alignment)

defineColumn

public E4SortedListColumn defineColumn(Align alignment,
                                       java.lang.String label)

defineColumn

public E4SortedListColumn defineColumn(Align alignment,
                                       E4Label_Intf label)

defineColumn

public E4SortedListColumn defineColumn(Align alignment,
                                       java.lang.String label,
                                       java.lang.String paramname)

defineColumn

public E4SortedListColumn defineColumn(Align alignment,
                                       E4Label_Intf label,
                                       java.lang.String paramname)

defineHiddenColumn

public E4SortedListColumn defineHiddenColumn(java.lang.String paramname)
Define a non-visible column. This column will not be displayed, instead, it is identified by a parameter name which becomes added to the script calling the method.

Parameters:
paramname - the name of the parameter to be added for this column
See Also:
defineColumn( e4s.html.Align, e4s.translate.E4Label_Intf, String )

resetColumns

public void resetColumns()

defineColumn

public void defineColumn(E4SortedListColumn col)

addElement

public void addElement(E4SortedList_Intf obj)

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 TABLE
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

removeElements

public void removeElements()
Description copied from class: E4HtmlElementGeneral
Remove all elements.

Overrides:
removeElements in class TABLE

removeColumnDefinitions

public void removeColumnDefinitions()

toTable

public void toTable(E4ServletImplementation_Intf servlet)
             throws java.lang.Exception
Throws:
java.lang.Exception

getHeader

public E4SortedListColumn[] getHeader()

getHeader

public E4SortedListColumn getHeader(int col)

resetAllSortFlags

public void resetAllSortFlags()

sort

public void sort(int column)

setActionSort

public void setActionSort(E4Method mref,
                          E4ServletImplementation_Intf servlet)

addAdditionalParameters

public void addAdditionalParameters(E4CgiParams params,
                                    E4ServletImplementation_Intf servlet)
When the sort (or similar other functions) are called, pass those parameters to the called method.

Parameters:
params - parameters to be added, a value of null resets all the additional parameters. Please note, that parameters are not added, they are treatened as a whole block as defined in the param variable. Added means adding this to the Java Script.

getAdditionalParameters

public E4CgiParams getAdditionalParameters()

E4ID

public E4ID E4ID()
Description copied from class: E4HtmlObject
Get the E4ID of the object. The E4ID is a unique identifier for an nested HTML element, it can be either the name of the class or any previous assigned string.

Overrides:
E4ID in class E4HtmlObject
Returns:
the E4ID
See Also:
E4HtmlObject.E4ID(String), E4HtmlObject.set_e4sID(e4s.util.E4ID)

collectTranslationsForEditing

public void collectTranslationsForEditing(E4TranslationsVec v,
                                          E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Build a list (Vector) with translation texts used so far during display of this page. Run throught all subclasses elements and collect their texts as well. Note, that a text will only be added one time. The Vector contains elements of class E4Label.

Specified by:
collectTranslationsForEditing in interface E4HtmlElement_Intf
Overrides:
collectTranslationsForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the current servlet instance
See Also:
E4Label_Intf

setClass_Header

public void setClass_Header(CLASS_Name classname)

setClass_SubHeader

public void setClass_SubHeader(CLASS_Name classname)

setClass_Data

public void setClass_Data(CLASS_Name classname)

getClass_Body

public CLASS_Name getClass_Body()

setClass_Body

public void setClass_Body(CLASS_Name classname)

setClass_Body

public void setClass_Body(STYLE_Name style)

collectStylesForEditing

public void collectStylesForEditing(E4StylesHash v,
                                    E4ServletImplementation_Intf servlet)
Build a list (Vector) with style definitions used so far during display of this page. Run throught all subclasses elements and collect their styles as well. Note, that a style will only be added one time. The Vector contains elements of class E4StyleUsage.

Specified by:
collectStylesForEditing in interface E4HtmlElement_Intf
Overrides:
collectStylesForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the styles will be collected, may not be null
servlet - the servlet context
See Also:
E4ServletImplementation_Intf.sessionCanEditStyles(), #collectStylesForEditing(e4s.html.style.E4StylesHash, STYLE_Name, boolean)

_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