www.element4solution.com

e4s.html.input.extended
Class IMAGEFIELD

java.lang.Object
  extended by e4s.util.E4Object
      extended by e4s.html.E4HtmlObject
          extended by e4s.html.E4HtmlElementGeneral
              extended by e4s.html.input.extended.E4FieldsetLayout
                  extended by e4s.html.input.extended.E4InputField
                      extended by e4s.html.input.extended.TEXTFIELD
                          extended by e4s.html.input.extended.FILESELECTION
                              extended by e4s.html.input.extended.IMAGEFIELD
All Implemented Interfaces:
E4FieldsetLayout_Intf, E4HtmlElement_Intf, E4InputField_Intf

public class IMAGEFIELD
extends FILESELECTION
implements E4InputField_Intf

An input field (for <FORM>) elements representing a single line text input value.

Example_InputForm.java

Since:
JDK 1.4
See Also:
TEXTFIELD, TEXTAREA, DATEFIELD, LONGFIELD, FLOATFIELD, FORM

Nested Class Summary
 
Nested classes/interfaces inherited from class e4s.html.input.extended.FILESELECTION
FILESELECTION.E4ExceptionInstanciate
 
Nested classes/interfaces inherited from class e4s.html.input.extended.E4InputField
E4InputField.A_PICK
 
Field Summary
static CLASS_Name BASE_STYLE_NAME
           
static int DEFAULT_HEIGHT
          Default height of the image - display block.
static int DEFAULT_WIDTH
          Default width of the image - display block.
static int HEIGHT_TEXT_LINE
          Line-Height of the bottom text line.
static STYLE_Name STYLE_INPUT_FIELD
           
 
Fields inherited from class e4s.html.input.extended.FILESELECTION
DEFAULT_INPUT_LENGTH
 
Fields inherited from class e4s.html.input.extended.TEXTFIELD
m_displaylength, m_inputlength, m_uppercase
 
Fields inherited from class e4s.html.input.extended.E4InputField
BGCOLOR_READONLY, HTML_TAG, m_helpid, m_label, m_multiple_tablerows_id, m_name, m_pickup_ref, m_readonly, m_show_label, m_style_active, m_style_inactive, m_validation_object, m_validationmessage, m_value, m_visible, ms_help_image, PICKUP_IMAGE_NAME_PREFIX
 
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
IMAGEFIELD(E4ID parent_id, E4InputFieldName_Intf name, E4Label_Intf label)
           
IMAGEFIELD(E4ID parent_id, E4InputFieldName_Intf name, E4Label_Intf label, java.lang.String relative_path)
           
IMAGEFIELD(E4ID parent_id, E4InputFieldName_Intf name, java.lang.String label)
           
IMAGEFIELD(E4ID parent_id, E4InputFieldName_Intf name, java.lang.String label, java.lang.String relative_path)
           
IMAGEFIELD(E4ID parent_id, E4InputFieldName name)
          Construct a image input field.
IMAGEFIELD(E4ID parent_id, E4InputFieldName name, java.lang.String label)
          Construct a image input field.
IMAGEFIELD(E4InputFieldName_Intf name, E4Label_Intf label)
           
IMAGEFIELD(E4InputFieldName_Intf name, E4Label_Intf label, java.lang.String relative_path)
           
IMAGEFIELD(E4InputFieldName_Intf name, java.lang.String label)
           
IMAGEFIELD(E4InputFieldName_Intf name, java.lang.String label, java.lang.String relative_path)
           
IMAGEFIELD(E4InputFieldName name)
          Construct a image input field.
IMAGEFIELD(E4InputFieldName name, java.lang.String label)
          Construct a image input field.
IMAGEFIELD(IMAGEFIELD field)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void collectScripts(E4ScriptsVec vec, E4ServletImplementation_Intf servlet)
          Get a vector of used scripts from all subelements.
 void collectStylesForEditing(E4StylesHash v, E4ServletImplementation_Intf servlet)
          Internal use only - collect all style elements of this and sun elements.
 E4InputField_Intf duplicate()
          Get the status of enabling the selection of directories.
 E4Color getBorderColor()
          Get the color for the border.
 boolean getExtraSmall()
           
 int getHeight()
          Get the width of the rectangle to be displayed.
 boolean getUseImageResizer()
          Check, if the image shall be scaled before display, using E4ImageResizer.
 java.lang.String getValue()
          Get the value of this input field.
 int getWidth()
          Get the width of the rectangle to be displayed.
 void setBorderColor(E4Color color)
          Define the color for the border.
 void setEnablePopup(boolean mode, E4ServletImplementation_Intf servlet)
          When the mouse gets over the image, display a larger version of the current image in a popup window.
 void setEnablePopup(boolean mode, int scale, E4ServletImplementation_Intf servlet)
          When the mouse gets over the image, display a larger version of the current image in a popup window.
 void setExtraSmall(boolean mode)
          This enables a smaller version in hight of the imagefield.
 void setHeight(int height)
          Define the height of the rectangle to be displayed.
 void setUseImageResizer(boolean resize)
          Define, if the image shall be scaled before display, using E4ImageResizer.
 void setValue(E4StringImage value)
           
 void setWidth(int width)
          Define the width of the rectangle to be displayed.
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 
Methods inherited from class e4s.html.input.extended.FILESELECTION
definePickupList, definePickupList, getCanDeleteFiles, getCanUploadFiles, getE4SRootPath, getExtensionsAllowed, getFileExtensions, getInitPath, getMaxUploadSize, setCanDeleteFiles, setCanDeleteFiles, setCanUploadFiles, setE4SRootPath, setExtensionsAllowed, setFileExtensions, setFileExtensions, setInitPath, setLimitPath, setMaxUploadSize
 
Methods inherited from class e4s.html.input.extended.TEXTFIELD
addAjaxChanger, getLengthDisplay, getLengthMaxInput, getValue_native, setToUppercase
 
Methods inherited from class e4s.html.input.extended.E4InputField
addElement, AppendValidationE4Message, changeColumnName, collectTranslationsForEditing, debugToString, definePickupList, definePickupList, definePickupList, definePickupList, definePickupList, definePickupList, definePickupList, display_simpleReport, E4ID, equalsIgnoreCase, eventHandlers, getCanChangeLayout, getColumnName, getErrorMessage, getEventHandlers, getHelpId, getHtmlParamName, getLabel, getMultipleTablerowsId, getPersistant, getPersistantLayout, getPickupList, getReadOnly, getSTYLE, getSTYLE, getValidator, hideLabel, HtmlEncode, isHiddenField, isMandatory, isVisible, onChange, onChange, onChange, onClick, removePickupList, resetValidation, setCanChangeLayout, setErrorMessage, setErrorMessage, setEventHandler, setHelpId, setHelpImage, setLabel, setMultipleTablerowsId, setReadOnly, setReadOnly, setReadOnly, setSTYLE, setSTYLE, setValidation, setValidator, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setVisible, toHIDDENFIELD, toHtml_drawSimpleReport, toHtml_drawSimpleReport, toHtml_drawSimpleReport, toHtml_hidden, toHtml, toString, updatePersistantLayout, validate, validate, validate
 
Methods inherited from class e4s.html.input.extended.E4FieldsetLayout
isNextRow, layoutToNextRow
 
Methods inherited from class e4s.html.E4HtmlElementGeneral
addScript, addScript, addScript, addStyleForEditing, addTranslationForEditing, buildStyleAttribute, buildStyleClassReference, collectStylesForEditing, collectStylesForEditing, collectTranslationsForEditing, createScript, createScript, findElement, findElement, findElement, findElement, getElements, getElementsVec, getField, getId, getLastElement, getStringContent, getStyle, getStyle, hasScripts, hasSTYLE, isContentClass, isE4InputField_Intf, openTag, removeAll, removeElementById, removeElements, removeElements, removeStyle, setId, setStyle, setStyle, setSTYLE, Style, Style
 
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, 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, 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.input.extended.E4InputField_Intf
changeColumnName, definePickupList, definePickupList, display_simpleReport, equalsIgnoreCase, eventHandlers, getCanChangeLayout, getColumnName, getErrorMessage, getHtmlParamName, getLabel, getMultipleTablerowsId, getPickupList, getReadOnly, getValue_native, hideLabel, isHiddenField, isMandatory, isVisible, resetValidation, setCanChangeLayout, setErrorMessage, setErrorMessage, setEventHandler, setHelpId, setLabel, setMultipleTablerowsId, setReadOnly, setReadOnly, setValidator, setValue, setValue, setValue, setValue, setValue, setVisible, toHIDDENFIELD, toHtml_drawSimpleReport, toHtml_drawSimpleReport, validate, validate
 
Methods inherited from interface e4s.html.E4FieldsetLayout_Intf
isNextRow, layoutToNextRow
 
Methods inherited from interface e4s.html.E4HtmlElement_Intf
addScript, addScript, addScript, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, toHtml_hidden, validate
 

Field Detail

DEFAULT_WIDTH

public static final int DEFAULT_WIDTH
Default width of the image - display block.

See Also:
getWidth(), Constant Field Values

DEFAULT_HEIGHT

public static final int DEFAULT_HEIGHT
Default height of the image - display block.

See Also:
getHeight(), Constant Field Values

HEIGHT_TEXT_LINE

public static final int HEIGHT_TEXT_LINE
Line-Height of the bottom text line.

See Also:
Constant Field Values

BASE_STYLE_NAME

public static final CLASS_Name BASE_STYLE_NAME

STYLE_INPUT_FIELD

public static final STYLE_Name STYLE_INPUT_FIELD
Constructor Detail

IMAGEFIELD

public IMAGEFIELD(E4ID parent_id,
                  E4InputFieldName name)
Construct a image input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.

IMAGEFIELD

public IMAGEFIELD(E4ID parent_id,
                  E4InputFieldName name,
                  java.lang.String label)
Construct a image input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input

IMAGEFIELD

public IMAGEFIELD(E4ID parent_id,
                  E4InputFieldName_Intf name,
                  java.lang.String label,
                  java.lang.String relative_path)

IMAGEFIELD

public IMAGEFIELD(E4ID parent_id,
                  E4InputFieldName_Intf name,
                  java.lang.String label)

IMAGEFIELD

public IMAGEFIELD(E4ID parent_id,
                  E4InputFieldName_Intf name,
                  E4Label_Intf label,
                  java.lang.String relative_path)

IMAGEFIELD

public IMAGEFIELD(E4ID parent_id,
                  E4InputFieldName_Intf name,
                  E4Label_Intf label)

IMAGEFIELD

public IMAGEFIELD(E4InputFieldName name)
Construct a image input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.

IMAGEFIELD

public IMAGEFIELD(E4InputFieldName name,
                  java.lang.String label)
Construct a image input field.

Parameters:
name - HTML (CGI) name of the input field. The input field is treatened by this name, and a value can be retrieved throught the E4CgiParams class using this name.
label - E4Label to be displayed on the screen during input

IMAGEFIELD

public IMAGEFIELD(E4InputFieldName_Intf name,
                  java.lang.String label,
                  java.lang.String relative_path)

IMAGEFIELD

public IMAGEFIELD(E4InputFieldName_Intf name,
                  java.lang.String label)

IMAGEFIELD

public IMAGEFIELD(E4InputFieldName_Intf name,
                  E4Label_Intf label,
                  java.lang.String relative_path)

IMAGEFIELD

public IMAGEFIELD(E4InputFieldName_Intf name,
                  E4Label_Intf label)

IMAGEFIELD

public IMAGEFIELD(IMAGEFIELD field)
Method Detail

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
Specified by:
toHtml in interface E4InputField_Intf
Overrides:
toHtml in class FILESELECTION
servlet - the servlet environment currently running in
Throws:
java.lang.Exception

getValue

public java.lang.String getValue()
Get the value of this input field.

Overrides:
getValue in class TEXTFIELD
Returns:
the value
See Also:
E4InputField.setValue(java.lang.String), setValue(e4s.util.E4StringImage)

setValue

public void setValue(E4StringImage value)

getExtraSmall

public boolean getExtraSmall()

setExtraSmall

public void setExtraSmall(boolean mode)
This enables a smaller version in hight of the imagefield. Useful when the field is beeing used in tabled.

Parameters:
mode - true means small version, false (= default) for the standard version

setEnablePopup

public void setEnablePopup(boolean mode,
                           E4ServletImplementation_Intf servlet)
When the mouse gets over the image, display a larger version of the current image in a popup window. By default, this is turned off.

Parameters:
mode - true turns on this feature, false turns off this feature
scale - a scale faktor (typically a value larger than 1 but smaller as 10, recommended is a value of 5)
servlet - the current servlet
See Also:
setEnablePopup(boolean, e4s.servlet.E4ServletImplementation_Intf), E4ModuleImageResize, E4ImageResizer

setEnablePopup

public void setEnablePopup(boolean mode,
                           int scale,
                           E4ServletImplementation_Intf servlet)
When the mouse gets over the image, display a larger version of the current image in a popup window. By default, this is turned off.

Parameters:
mode - true turns on this feature, false turns off this feature
scale - a scale faktor (typically a value larger than 1 but smaller as 10, recommended is a value of 5)
servlet - the current servlet
See Also:
setEnablePopup(boolean, e4s.servlet.E4ServletImplementation_Intf), E4ModuleImageResize, E4ImageResizer

setWidth

public void setWidth(int width)
Define the width of the rectangle to be displayed. Part of the rectangle is the image, the filename and the pickup-symbol.

Parameters:
width - the width of the surrounding rectangle in pixels

getWidth

public int getWidth()
Get the width of the rectangle to be displayed. The default value is DEFAULT_WIDTH.

Returns:
the width of the surrounding rectangle in pixels
See Also:
getHeight(), setWidth(int)

setHeight

public void setHeight(int height)
Define the height of the rectangle to be displayed. Part of the rectangle is the image, the filename and the pickup-symbol.

Parameters:
height - the hight of the surrounding rectangle in pixels

getHeight

public int getHeight()
Get the width of the rectangle to be displayed. The default value is DEFAULT_HEIGHT.

Returns:
the height of the surrounding rectangle in pixels
See Also:
getWidth(), setHeight(int)

setBorderColor

public void setBorderColor(E4Color color)
Define the color for the border.

Parameters:
color - the color of the border

getBorderColor

public E4Color getBorderColor()
Get the color for the border. The default value is E4Color.GRAY.

Returns:
the color of the border
See Also:
setBorderColor(e4s.html.E4Color)

collectStylesForEditing

public void collectStylesForEditing(E4StylesHash v,
                                    E4ServletImplementation_Intf servlet)
Description copied from class: E4InputField
Internal use only - collect all style elements of this and sun elements.

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

collectScripts

public void collectScripts(E4ScriptsVec vec,
                           E4ServletImplementation_Intf servlet)
Description copied from class: E4HtmlElementGeneral
Get a vector of used scripts from all subelements.

Specified by:
collectScripts in interface E4HtmlElement_Intf
Overrides:
collectScripts in class E4HtmlElementGeneral
Parameters:
vec - collect the names of all scripts
servlet - the servlet context
See Also:
E4JavaScript

duplicate

public E4InputField_Intf duplicate()
Description copied from class: FILESELECTION
Get the status of enabling the selection of directories.

Specified by:
duplicate in interface E4InputField_Intf
Overrides:
duplicate in class FILESELECTION
Returns:
the mode for choosing directories (faöse = disables = default)
See Also:
#setCanChooseDirectory(boolean), ./ public boolean getCanChooseDirectory() { return m_Can_ChooseDirectory; }

setUseImageResizer

public void setUseImageResizer(boolean resize)
Define, if the image shall be scaled before display, using E4ImageResizer.

Parameters:
resize - true (default) resizes the image to the specified width/height.
See Also:
getUseImageResizer()

getUseImageResizer

public boolean getUseImageResizer()
Check, if the image shall be scaled before display, using E4ImageResizer.

Returns:
true if the image will be resized to the specified width/height.
See Also:
setUseImageResizer(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