www.element4solution.com

e4s.html
Class BUTTON

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.E4HtmlContentElement
                      extended by e4s.html.BUTTON
All Implemented Interfaces:
E4FieldsetLayout_Intf, E4HtmlElement_Intf

public class BUTTON
extends E4HtmlContentElement
implements E4HtmlElement_Intf, E4FieldsetLayout_Intf

BUTTON html element.

Example_Button.java

Since:
JDK 1.4
See Also:
FORM_Reset, FORM_Submit

Field Summary
static STYLE_Name DEFAULTSTYLE
           
static java.lang.String HTML_TAG
           
static char TYPE_RESET
           
static char TYPE_SUBMIT
           
 
Fields inherited from class e4s.html.E4HtmlContentElement
BOOL_STR_FALSE, BOOL_STR_TRUE
 
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
BUTTON()
           
BUTTON(char type)
           
BUTTON(E4EventHandlerBUTTON evt)
           
BUTTON(E4Label_Intf label, E4EventHandlerBUTTON evt)
           
BUTTON(E4Label_Intf label, FORM form, char type)
           
BUTTON(E4Method_Intf mref, boolean newwindow, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4CgiParams params, boolean newwindow, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4CgiParams params, E4FrameName frame, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4CgiParams params, E4Label_Intf label, boolean newwindow, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4CgiParams params, E4Label_Intf label, E4FrameName frame, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4CgiParams params, E4Label_Intf label, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4CgiParams params, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4FrameName frame, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4Label_Intf label, E4ServletImplementation_Intf servlet)
           
BUTTON(E4Method_Intf mref, E4ServletImplementation_Intf servlet)
           
BUTTON(E4String label, E4EventHandlerBUTTON evt)
           
BUTTON(java.lang.String label, E4EventHandlerBUTTON evt)
           
BUTTON(java.lang.String label, FORM form, char type)
           
 
Method Summary
static java.lang.String _getSVNVersionString()
           
 void collectScripts(E4ScriptsVec v, E4ServletImplementation_Intf servlet)
          Get a vector of used scripts from all subelements.
 void collectTranslationsForEditing(E4TranslationsVec v, E4ServletImplementation_Intf servlet)
          Build a list (Vector) with translation texts used so far during display of this page.
 java.lang.StringBuffer eventHandlers()
           
 void finalize()
           
 char getAccesskey()
           
 boolean getEnableMultipleClicks()
          Get the mode, if the button will be disabled once clicked to avoid a second click.
 E4InputFieldName_Intf getName()
           
 boolean isNextRow()
          Returns the status, if the element (or typical an input field) within a E4Fieldset is defined to be layouted in the next row or not.
 void layoutToNextRow(boolean mode)
          Defines, if the element (or typical an input field) within a E4Fieldset shall be layouted in the next row or not.
 E4EventHandlerBUTTON onClick()
          Create an event handler for the onclick() event, attach it to the button using setEventHandler(e4s.html.E4EventHandlerBUTTON).
 void setAccesskey(char accesskey)
          Set the ACCESSKEY attribute for the BUTTON tag.
 void setEnableMultipleClicks(boolean enable)
          Set the mode, if the button shall be disabled once clicked to avoid a second click.
 void setEventHandler(E4EventHandlerBUTTON handler)
          Set an event handler.
 void setName(E4InputFieldName_Intf name)
           
 void setSTYLE(CLASS_Name class_name)
           
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 java.lang.String toString()
           
 
Methods inherited from class e4s.html.E4HtmlContentElement
A_Email, A_Email, A_Multiple, A_Popup, A_Popup, A_Popup, A_Popup, A_Popup, A_Popup, A_Popup, A_Reference, A_Reference, A_Reference, A_Reference, A_Reference, A_ReturnValue, A_ReturnValue, A_ReturnValue, A_ReturnValue, A, A, A, A, A, A, A, AjaxElement, AjaxElement, AjaxElement, B, B, BIG, Box, Box, Box, BoxRoundCorners, BoxRoundCorners, BoxRoundCorners, BR, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, BUTTON, CENTER, DEL, DIV, DIV, DIV, DIV, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FONT, FullSizeE4Message, H1, H2, H3, H4, Hint, HR, I, I, IMG, IMG, IMG, IMG, IMG, IMG, IMG, IMG, INS, Message, Message, Message, Message, Message, NBSP, NOBR, P_NBSP, P, PRE, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, rem, rem, rem, rem, rem, rem, SMALL, SPAN, STRIKE, strike, SystemError, SystemError, SystemError, SystemError, TABLE, TABLE, trace, trace, trace, trace, trace, trace, translate_Sys, translate, U, UL
 
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, collectStylesForEditing, 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, 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, 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, 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

HTML_TAG

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

DEFAULTSTYLE

public static final STYLE_Name DEFAULTSTYLE

TYPE_SUBMIT

public static final char TYPE_SUBMIT
See Also:
Constant Field Values

TYPE_RESET

public static final char TYPE_RESET
See Also:
Constant Field Values
Constructor Detail

BUTTON

public BUTTON(E4Label_Intf label,
              E4EventHandlerBUTTON evt)

BUTTON

public BUTTON(java.lang.String label,
              FORM form,
              char type)

BUTTON

public BUTTON(E4Label_Intf label,
              FORM form,
              char type)

BUTTON

public BUTTON(char type)

BUTTON

public BUTTON(java.lang.String label,
              E4EventHandlerBUTTON evt)

BUTTON

public BUTTON(E4String label,
              E4EventHandlerBUTTON evt)

BUTTON

public BUTTON(E4EventHandlerBUTTON evt)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4Label_Intf label,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4CgiParams params,
              E4Label_Intf label,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4CgiParams params,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4FrameName frame,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4CgiParams params,
              E4FrameName frame,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4CgiParams params,
              E4Label_Intf label,
              E4FrameName frame,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              boolean newwindow,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4CgiParams params,
              E4Label_Intf label,
              boolean newwindow,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON(E4Method_Intf mref,
              E4CgiParams params,
              boolean newwindow,
              E4ServletImplementation_Intf servlet)

BUTTON

public BUTTON()
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
Overrides:
toHtml in class E4HtmlElementGeneral
Parameters:
servlet - is the servlet context which can be retrieved using the E4ModuleImplementation.getServlet().
Throws:
java.lang.Exception

setSTYLE

public void setSTYLE(CLASS_Name class_name)

eventHandlers

public java.lang.StringBuffer eventHandlers()

finalize

public void finalize()
Overrides:
finalize in class E4Object

setEventHandler

public void setEventHandler(E4EventHandlerBUTTON handler)
Set an event handler.

Parameters:
handler - the event-handle

onClick

public E4EventHandlerBUTTON onClick()
Create an event handler for the onclick() event, attach it to the button using setEventHandler(e4s.html.E4EventHandlerBUTTON).

Returns:
the created and attached event handle

toString

public java.lang.String toString()
Overrides:
toString in class E4Object

setName

public void setName(E4InputFieldName_Intf name)

getName

public E4InputFieldName_Intf getName()

setAccesskey

public void setAccesskey(char accesskey)
Set the ACCESSKEY attribute for the BUTTON tag. If you use e.g. 's' as accesskey, the button can be accessed using Ctrl-g.

Parameters:
accesskey - the accesskey for that button.
See Also:
getAccesskey()

getAccesskey

public char getAccesskey()

setEnableMultipleClicks

public void setEnableMultipleClicks(boolean enable)
Set the mode, if the button shall be disabled once clicked to avoid a second click.

Parameters:
enable - true: the button can be clicked often, false: the button becomes disabled after the first usage (default value)
See Also:
getEnableMultipleClicks()

getEnableMultipleClicks

public boolean getEnableMultipleClicks()
Get the mode, if the button will be disabled once clicked to avoid a second click.

Returns:
true: the button can be clicked often, false: the button becomes disabled after the first usage (default value)
See Also:
setEnableMultipleClicks(boolean)

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

layoutToNextRow

public void layoutToNextRow(boolean mode)
Defines, if the element (or typical an input field) within a E4Fieldset shall be layouted in the next row or not. If not, then the field is layouted right beside the last field. This makes form elements kept together in one row.

Specified by:
layoutToNextRow in interface E4FieldsetLayout_Intf
Parameters:
mode - true=layout into the next row, false=layout right beside the previous field in the same row.

isNextRow

public boolean isNextRow()
Returns the status, if the element (or typical an input field) within a E4Fieldset is defined to be layouted in the next row or not. If not, then the field is layouted right beside the last field. This makes form elements kept together in one row.

Specified by:
isNextRow in interface E4FieldsetLayout_Intf
Returns:
true=layout into the next row, false=layout right beside the previous field in the same row.

collectScripts

public void collectScripts(E4ScriptsVec v,
                           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:
v - collect the names of all scripts
servlet - the servlet context
See Also:
E4JavaScript

_getSVNVersionString

public static java.lang.String _getSVNVersionString()

www.element4solution.com