www.element4solution.com

e4s.html
Class E4Box

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.E4HtmlContentElementPersistant
                          extended by e4s.html.E4Box
All Implemented Interfaces:
E4HtmlElement_Intf

public class E4Box
extends E4HtmlContentElementPersistant
implements E4HtmlElement_Intf

Display a small box with a caption and some content. You will find these small, useful elements in many web pages. They are all similar: there is a small border around, a caption ahead and they include a small portion of content.

Since:
JDK 1.4
See Also:
e4s.html.E4HtmlContentElement#InfoBox, E4Message, E4BoxRoundCorners

Field Summary
static int CAPTION_HEIGHT
           
 
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
E4Box()
          Construct a E4Box object, using no caption.
E4Box(E4Box source)
          Construct a E4Box object, using a predefined source object whereas all settings and layouts will be copied.
E4Box(E4HtmlElement_Intf caption)
          Construct a E4Box object using a caption.
E4Box(E4Label_Intf caption)
          Construct a E4Box object using a caption.
E4Box(java.lang.String caption)
          Construct a E4Box object using a caption that will be translated in E4LabelApp-mode.
 
Method Summary
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 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 text definitions used so far during display of this page for translations
 FORM FORM()
           
 FORM FORM(E4Method mref)
           
 FORM FORM(java.lang.String name)
           
 E4Label_Intf getCaption()
          Get the caption of the E4Box.
 int getCellpadding()
           
 void setAlign(Align align)
          Define the horizontal Align, which is used for the caption as well as for the content area.
 void setAlign(VAlign align)
          Define the vertical Align, which is used for the caption as well as for the content area.
 void setBackground(IMG background)
          Define an image for the background of the content area only.
 void setCaption(E4Label_Intf caption)
          Define the caption for the E4Box.
 void setCaption(java.lang.String caption)
          Define the caption for the E4Box using a caption that will be translated in E4LabelApp-mode.
 void setCellpadding(int padding)
           
 void setClass_Caption(CLASS_Name classname)
          Define a E4CSS class for the caption area (<TD>-Tag).
 void setClass_Table(CLASS_Name classname)
          Define a E4CSS class for <TABLE>-Tag around the E4Box.
 void setClass(CLASS_Name classname)
          Define a E4CSS class for the content area (<TD>-Tag).
 void setColorBackground(E4Color color)
          Define a color for the content area background.
 void setColorBorder(E4Color color)
          Define a color for the border.
 void setColorCaption(E4Color color)
          Define a color for the caption area background.
 void setFont(FONT font)
          Define the FONT, which is used for the caption as well as for the content area.
 void setHeight(float height)
          Set height of the E4Box to the specified relative percentage value.
 void setHeight(int height)
          Set height of the E4Box to the specified absolut value.
 void setHeightMax()
          Set height of the E4Box to the maximum (100%).
 void setHeightMaximum()
          Deprecated.  
 void setVAlign(VAlign align)
          Set the vertical alignment (same as setAlign(e4s.html.VAlign)).
 void setWidth(float width)
          Set width of the E4Box to the specified relative percentage value.
 void setWidth(int width)
          Set width of the E4Box to the specified absolut value.
 void setWidthMax()
          Set width of the E4Box to the maximum (100%).
 void setWidthMaximum()
          Deprecated.  
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          Create the HTML output for this element.
 
Methods inherited from class e4s.html.E4HtmlContentElementPersistant
preventFromRemoving, preventFromRemoving, removeAll, toDebug
 
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, 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, 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, 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, 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, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

CAPTION_HEIGHT

public static int CAPTION_HEIGHT
Constructor Detail

E4Box

public E4Box()
Construct a E4Box object, using no caption.

See Also:
#constructor( String )

E4Box

public E4Box(E4Box source)
Construct a E4Box object, using a predefined source object whereas all settings and layouts will be copied. No content will be copied (except the caption).

Parameters:
source - the source E4Box to copy data from

E4Box

public E4Box(java.lang.String caption)
Construct a E4Box object using a caption that will be translated in E4LabelApp-mode.

Parameters:
caption - the caption for the E4Box
See Also:
#constructor(E4Label_Intf), setCaption(java.lang.String)

E4Box

public E4Box(E4Label_Intf caption)
Construct a E4Box object using a caption.

Parameters:
caption - the caption for the E4Box
See Also:
#constructor(String), setCaption(java.lang.String)

E4Box

public E4Box(E4HtmlElement_Intf caption)
Construct a E4Box object using a caption.

Parameters:
caption - the caption for the E4Box
See Also:
#constructor(String), setCaption(java.lang.String)
Method Detail

setCaption

public void setCaption(java.lang.String caption)
Define the caption for the E4Box using a caption that will be translated in E4LabelApp-mode.

Parameters:
caption - the caption for the E4Box
See Also:
getCaption(), setCaption(E4Label_Intf)

setCaption

public void setCaption(E4Label_Intf caption)
Define the caption for the E4Box.

Parameters:
caption - the caption for the E4Box
See Also:
getCaption(), setCaption(String)

getCaption

public E4Label_Intf getCaption()
Get the caption of the E4Box.

Returns:
the caption for the E4Box
See Also:
setCaption(java.lang.String)

setFont

public void setFont(FONT font)
Define the FONT, which is used for the caption as well as for the content area. But changing the font of the content area is easy, just use the E4HtmlContentElement.FONT() function.

Parameters:
font - the font to be set

setAlign

public void setAlign(Align align)
Define the horizontal Align, which is used for the caption as well as for the content area.

Parameters:
align - the alignment

setAlign

public void setAlign(VAlign align)
Define the vertical Align, which is used for the caption as well as for the content area.

Parameters:
align - the alignment

setVAlign

public void setVAlign(VAlign align)
Set the vertical alignment (same as setAlign(e4s.html.VAlign)).

Parameters:
align - the alignment

setBackground

public void setBackground(IMG background)
Define an image for the background of the content area only.

Parameters:
background - the image to be used in the content area

setColorBackground

public void setColorBackground(E4Color color)
Define a color for the content area background.

Parameters:
color - the color
See Also:
setColorCaption(e4s.html.E4Color), setColorBorder(e4s.html.E4Color)

setColorCaption

public void setColorCaption(E4Color color)
Define a color for the caption area background.

Parameters:
color - the color
See Also:
setColorBorder(e4s.html.E4Color), setColorBackground(e4s.html.E4Color)

setColorBorder

public void setColorBorder(E4Color color)
Define a color for the border.

Parameters:
color - the color
See Also:
setColorCaption(e4s.html.E4Color), setColorBackground(e4s.html.E4Color)

setClass

public void setClass(CLASS_Name classname)
Define a E4CSS class for the content area (<TD>-Tag).

Parameters:
classname - the name of the E4CSS class.
See Also:
setClass_Caption(e4s.html.style.CLASS_Name), setClass_Table(e4s.html.style.CLASS_Name)

setClass_Caption

public void setClass_Caption(CLASS_Name classname)
Define a E4CSS class for the caption area (<TD>-Tag).

Parameters:
classname - the name of the E4CSS class.
See Also:
setClass(e4s.html.style.CLASS_Name), setClass_Table(e4s.html.style.CLASS_Name)

setClass_Table

public void setClass_Table(CLASS_Name classname)
Define a E4CSS class for <TABLE>-Tag around the E4Box.

Parameters:
classname - the name of the E4CSS class.
See Also:
setClass(e4s.html.style.CLASS_Name), setClass_Caption(e4s.html.style.CLASS_Name)

setWidthMax

public void setWidthMax()
Set width of the E4Box to the maximum (100%).

See Also:
setWidth(int)

setWidthMaximum

public void setWidthMaximum()
Deprecated. 

See Also:
setWidthMax()

setWidth

public void setWidth(int width)
Set width of the E4Box to the specified absolut value.

Parameters:
width - with in pixel
See Also:
setWidth(float), setWidthMax()

setWidth

public void setWidth(float width)
Set width of the E4Box to the specified relative percentage value.

Parameters:
width - with in percentage, must be a value between 0.0f and 1.0f
See Also:
setWidth(int), setWidthMax()

setHeightMax

public void setHeightMax()
Set height of the E4Box to the maximum (100%).

See Also:
setHeight(int)

setHeightMaximum

public void setHeightMaximum()
Deprecated. 

See Also:
setHeightMax()

setHeight

public void setHeight(int height)
Set height of the E4Box to the specified absolut value.

Parameters:
height - with in pixel
See Also:
setHeight(float), setHeightMax()

setHeight

public void setHeight(float height)
Set height of the E4Box to the specified relative percentage value.

Parameters:
height - with in percentage, must be a value between 0.0f and 1.0f
See Also:
setHeight(int), setHeightMax()

collectTranslationsForEditing

public void collectTranslationsForEditing(E4TranslationsVec v,
                                          E4ServletImplementation_Intf servlet)
Build a list (Vector) with text definitions used so far during display of this page for translations

Specified by:
collectTranslationsForEditing in interface E4HtmlElement_Intf
Overrides:
collectTranslationsForEditing in class E4HtmlElementGeneral
Parameters:
v - the Vector where the translations will be collected
servlet - the current servlet instance
See Also:
E4ServletImplementation_Intf.sessionCanEditTranslations()

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)

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
See Also:
#toHtml(E4ServletImplementation_Intf, boolean)

FORM

public FORM FORM()

FORM

public FORM FORM(java.lang.String name)

FORM

public FORM FORM(E4Method mref)

setCellpadding

public void setCellpadding(int padding)

getCellpadding

public int getCellpadding()

_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