www.element4solution.com

e4s.application.sysmodule
Class E4DirEntry

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.application.sysmodule.E4DirEntry
All Implemented Interfaces:
E4SortedList_Intf

public class E4DirEntry
extends E4Object
implements E4SortedList_Intf

Element for directory contents (file listings).

Since:
JDK 1.4
See Also:
E4ModuleFileselection, E4DirEntryDefaultImages

Field Summary
static int COLUMN_DATE
          Image last modified
static int COLUMN_DELETE
          Image Delete possibility
static int COLUMN_DUMMY_FILLER
          Filler column
static int COLUMN_FILETYPE
          Directory or Image Type
static int COLUMN_HIDDEN_IS_DIRECTORY
          Hidden column for directory flag
static int COLUMN_IMAGE_SELECTED
          Selection Flag (Image)
static int COLUMN_NAME
          Image Name
static int COLUMN_PREVIEW
          Preview possibility
static int COLUMN_SIZE
          Image Size
 
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
E4DirEntry(E4ServletImplementation_Intf servlet)
           
E4DirEntry(E4ServletImplementation_Intf servlet, java.io.File f)
           
 
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(E4DirEntry element, int column)
          Compares this object with another object in the specified column.
 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 col)
          Get the data to be used as parameter for the specified column.
 boolean getDefault()
           
 java.lang.String getFilename()
           
 IMG getImageDelete()
           
 IMG getImageFiletype()
           
 IMG getImagePreview()
           
 long getLastmodified()
           
 int getPrimarySort()
          Get the primary sort value.
 long getSize()
           
 boolean isDirectory()
           
 void set(java.io.File f)
           
 void setCanSelect(boolean selection)
           
 void setDefault(boolean mode)
           
 void setDelete(boolean mode)
           
 void setPreview(boolean mode)
           
 java.lang.String toHtml(int col, E4SortedListColumn dummy, 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

COLUMN_FILETYPE

public static final int COLUMN_FILETYPE
Directory or Image Type

See Also:
e4s.html.DirEntry_Default, Constant Field Values

COLUMN_PREVIEW

public static final int COLUMN_PREVIEW
Preview possibility

See Also:
Constant Field Values

COLUMN_NAME

public static final int COLUMN_NAME
Image Name

See Also:
Constant Field Values

COLUMN_IMAGE_SELECTED

public static final int COLUMN_IMAGE_SELECTED
Selection Flag (Image)

See Also:
Constant Field Values

COLUMN_SIZE

public static final int COLUMN_SIZE
Image Size

See Also:
Constant Field Values

COLUMN_DATE

public static final int COLUMN_DATE
Image last modified

See Also:
Constant Field Values

COLUMN_DELETE

public static final int COLUMN_DELETE
Image Delete possibility

See Also:
Constant Field Values

COLUMN_DUMMY_FILLER

public static final int COLUMN_DUMMY_FILLER
Filler column

See Also:
Constant Field Values

COLUMN_HIDDEN_IS_DIRECTORY

public static final int COLUMN_HIDDEN_IS_DIRECTORY
Hidden column for directory flag

See Also:
Constant Field Values
Constructor Detail

E4DirEntry

public E4DirEntry(E4ServletImplementation_Intf servlet)

E4DirEntry

public E4DirEntry(E4ServletImplementation_Intf servlet,
                  java.io.File f)
Method Detail

set

public void set(java.io.File f)

compareTo

public int compareTo(E4SortedList_Intf element,
                     int column)
Description copied from interface: E4SortedList_Intf
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.

setPreview

public void setPreview(boolean mode)

setDelete

public void setDelete(boolean mode)

compareTo

public int compareTo(E4DirEntry element,
                     int column)
Compares this object with another object in the specified column.

Parameters:
element - the other object
column - the column to be compared
Returns:
0 if equal a value less than 0 (-) if this is less than element a value greater than 0 (+) if this is greater than element

toHtml

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

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

getFilename

public java.lang.String getFilename()

getLastmodified

public long getLastmodified()

getSize

public long getSize()

getImageFiletype

public IMG getImageFiletype()

getImagePreview

public IMG getImagePreview()

getImageDelete

public IMG getImageDelete()

isDirectory

public boolean isDirectory()

getBgColor

public E4Color getBgColor()
Description copied from interface: E4SortedList_Intf
Get the background color for this row.

Specified by:
getBgColor in interface E4SortedList_Intf
Returns:
the backgroundcolor or null if default shall be used.

getPrimarySort

public int getPrimarySort()
Description copied from interface: E4SortedList_Intf
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:
E4SortedList_Intf.PRIMARY_SORT_TOP, E4SortedList_Intf.PRIMARY_SORT_MIDDLE, E4SortedList_Intf.PRIMARY_SORT_BOTTOM

setDefault

public void setDefault(boolean mode)

getDefault

public boolean getDefault()

setCanSelect

public void setCanSelect(boolean selection)

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 col)
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:
col - 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