www.element4solution.com

e4s.html
Class FRAMESET

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.FRAMESET
All Implemented Interfaces:
E4HtmlElement_Intf
Direct Known Subclasses:
E4EditingFrameset, E4MenuFrameset, E4TabbedMenu

public class FRAMESET
extends E4HtmlElement
implements E4HtmlElement_Intf

HTML: Creates a <FRAMESET>-tag. The FRAMESET tag can only be created from a base HTML object. It holds one or more, even nested, FRAME or FRAMESET objects.

Example_Frames.java

Since:
JDK 1.4
See Also:
E4FrameName, FRAME, E4EventHandlerFRAMESET, HTML.FRAMESET(boolean)

Nested Class Summary
 class FRAMESET.E4FrameException
          FRAMESET Exception
 
Field Summary
static boolean _FRAMESET_COLS
          Deprecated. Use COLS instead
static boolean _FRAMESET_ROWS
          Deprecated. Use ROWS instead
static boolean COLS
          Definition, used on creation of a frameset to specify that this frameset uses a vertical splitting.
static boolean ROWS
          Definition, used on creation of a frameset to specify that this frameset uses a horizontal splitting.
static int TIMEOUT_KEEPALIVE_REFRESH
          Timeout for Script refresh via E4Ajax (Keep Alive) 5 Minutes ?
 
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
FRAMESET(E4ID parent_id, boolean rows)
          Construct a frameset.
FRAMESET(E4ID parent_id, boolean rows, float size)
           
FRAMESET(E4ID parent_id, boolean rows, int size)
           
FRAMESET(E4ID parent_id, boolean rows, java.lang.String size)
           
 
Method Summary
static E4JavaScript _createKeepAliveScript(E4ServletImplementation_Intf servlet)
           
static java.lang.String _getSVNVersionString()
          Get version info string from subversion.
 void addKeepAliveScript(E4ServletImplementation_Intf servlet)
          Add a "keep alive" script to this frameset.
 void collectScripts(E4ScriptsVec vec, E4ServletImplementation_Intf servlet)
          Get a vector of used scripts from all subelements.
 E4EventHandlerFRAMESET createEventHandler(int event)
           
 E4EventHandlerFRAMESET createEventHandler(java.lang.String name, int event)
          Create and add an E4EventHandlerFRAMESET.
 java.lang.StringBuffer eventHandlers()
           
 FRAME FRAME(E4FrameName name, float size)
           
 FRAME FRAME(E4FrameName name, float size, int scrolling)
          Add a FRAME to the FRAMESET.
 FRAME FRAME(E4FrameName name, int size)
           
 FRAME FRAME(E4FrameName name, int size, int scrolling)
          Add a FRAME to the FRAMESET.
 FRAME FRAME(E4FrameName name, long size)
           
 FRAME FRAME(E4FrameName name, java.lang.String size)
           
 FRAME FRAME(E4FrameName name, java.lang.String size, int scrolling)
          Add a FRAME to the FRAMESET.
 FRAME FRAME(float size)
           
 FRAME FRAME(float size, int scrolling)
          Add a FRAME to the FRAMESET, using a generic name.
 FRAME FRAME(int size)
           
 FRAME FRAME(int size, int scrolling)
          Add a FRAME to the FRAMESET, using a generic name.
 FRAME FRAME(long size)
           
 FRAME FRAME(java.lang.String size)
           
 FRAME FRAME(java.lang.String size, int scrolling)
          Add a FRAME to the FRAMESET, using a generic name.
 FRAMESET FRAMESET(boolean rows)
          Defines a <FRAMESET> tag.
 FRAMESET FRAMESET(boolean rows, float size)
           
 FRAMESET FRAMESET(boolean rows, int size)
           
 FRAMESET FRAMESET(boolean rows, long size)
           
 FRAMESET FRAMESET(boolean rows, java.lang.String size)
           
 boolean getFrameborder()
           
 java.lang.String getFrameSize()
           
 int getFramespacing()
           
 E4MenuFrameset MenuFrameset(java.lang.String persistantObjId, E4ServletImplementation_Intf servlet)
           
 E4MenuFrameset MenuFrameset(java.lang.String persistantObjId, int layout, E4ServletImplementation_Intf servlet)
           
 E4EventHandlerFRAMESET onLoad()
          Create an E4EventHandlerFRAMESET of type E4EventHandlerFRAMESET._EVENT_ONLOAD by a generic name and add it to the internal list.
 E4EventHandlerFRAMESET onUnLoad()
          Create an E4EventHandlerFRAMESET of type E4EventHandlerFRAMESET._EVENT_ONUNLOAD by a generic name and add it to the internal list.
 void onUnLoad(E4Method mref, E4ServletImplementation_Intf servlet)
          Calls a method when the frameset becomes unloade.
 void setEventHandler(E4EventHandlerFRAMESET handler)
           
 void setFrameborder(boolean frameborder)
           
 void setFramespacing(int framespacing)
           
 void SmoothResize(int top_position, int min_width, int max_width)
          Deprecated.  
 void SmoothResize(int top_position, int min_width, int max_width, java.lang.String id)
          Add a small frame to resize the frameset.
 void SmoothResize2()
          Deprecated.  
 void toHtml(E4StringBufferHtml buf, E4ServletImplementation_Intf servlet)
          General about FRAMES/FRAMESET: A FRAMESET is once derived from class HTML, the next FRAMESET can be derived from FRAMESET.
 
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, 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, 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, collectStylesForEditing, collectTranslationsForEditing, debugToString, findElement, findElement, getElements, getElementsVec, getField, getId, getStringContent, isContentClass, removeAll, removeElementById, removeElements, set_e4sID, setId, setReadOnly, setValue, toHtml_hidden, validate
 

Field Detail

ROWS

public static final boolean ROWS
Definition, used on creation of a frameset to specify that this frameset uses a horizontal splitting.

See Also:
HTML.FRAMESET(boolean), FRAMESET(e4s.util.E4ID, boolean, float), COLS, Constant Field Values

_FRAMESET_ROWS

public static final boolean _FRAMESET_ROWS
Deprecated. Use ROWS instead
See Also:
Constant Field Values

COLS

public static final boolean COLS
Definition, used on creation of a frameset to specify that this frameset uses a vertical splitting.

See Also:
HTML.FRAMESET(boolean), FRAMESET(e4s.util.E4ID, boolean, float), ROWS, Constant Field Values

_FRAMESET_COLS

public static final boolean _FRAMESET_COLS
Deprecated. Use COLS instead
See Also:
Constant Field Values

TIMEOUT_KEEPALIVE_REFRESH

public static final int TIMEOUT_KEEPALIVE_REFRESH
Timeout for Script refresh via E4Ajax (Keep Alive) 5 Minutes ?

See Also:
Constant Field Values
Constructor Detail

FRAMESET

public FRAMESET(E4ID parent_id,
                boolean rows)
Construct a frameset.

Parameters:
rows - one of ROWS or COLS.

FRAMESET

public FRAMESET(E4ID parent_id,
                boolean rows,
                java.lang.String size)

FRAMESET

public FRAMESET(E4ID parent_id,
                boolean rows,
                int size)

FRAMESET

public FRAMESET(E4ID parent_id,
                boolean rows,
                float size)
Method Detail

getFrameSize

public java.lang.String getFrameSize()

FRAME

public FRAME FRAME(E4FrameName name,
                   int size)

FRAME

public FRAME FRAME(E4FrameName name,
                   float size)

FRAME

public FRAME FRAME(E4FrameName name,
                   long size)

FRAME

public FRAME FRAME(E4FrameName name,
                   java.lang.String size)

FRAME

public FRAME FRAME(E4FrameName name,
                   int size,
                   int scrolling)
Add a FRAME to the FRAMESET.

Parameters:
name - the name of the frame.
size - the relative width or height in percentage (0.0f to 1.0f)
scrolling - FRAME.SCROLLING_NONE and others
Returns:
the created and added frame element

FRAME

public FRAME FRAME(E4FrameName name,
                   java.lang.String size,
                   int scrolling)
Add a FRAME to the FRAMESET.

Parameters:
name - the name of the frame.
size - the size, a string including a percentage value, an absolute value or "*"
scrolling - FRAME.SCROLLING_NONE and others
Returns:
the created and added frame element

FRAME

public FRAME FRAME(java.lang.String size,
                   int scrolling)
Add a FRAME to the FRAMESET, using a generic name.

Parameters:
size - the size, a string including a percentage value, an absolute value or "*"
scrolling - FRAME.SCROLLING_NONE and others
Returns:
the created and added frame element

FRAME

public FRAME FRAME(java.lang.String size)

FRAME

public FRAME FRAME(E4FrameName name,
                   float size,
                   int scrolling)
Add a FRAME to the FRAMESET.

Parameters:
name - the name of the frame
size - the relative width or height in percentage (0.0f to 1.0f)
scrolling - FRAME.SCROLLING_NONE and others
Returns:
the created and added frame element

FRAME

public FRAME FRAME(float size,
                   int scrolling)
Add a FRAME to the FRAMESET, using a generic name.

Parameters:
size - the relative width or height in percentage (0.0f to 1.0f)
scrolling - FRAME.SCROLLING_NONE and others
Returns:
the created and added frame element

FRAME

public FRAME FRAME(int size,
                   int scrolling)
Add a FRAME to the FRAMESET, using a generic name.

Parameters:
size - the absolute width or height in pixel
scrolling - FRAME.SCROLLING_NONE and others
Returns:
the created and added frame element

FRAME

public FRAME FRAME(float size)

FRAME

public FRAME FRAME(long size)

FRAME

public FRAME FRAME(int size)

FRAMESET

public FRAMESET FRAMESET(boolean rows,
                         java.lang.String size)

FRAMESET

public FRAMESET FRAMESET(boolean rows,
                         int size)

FRAMESET

public FRAMESET FRAMESET(boolean rows,
                         long size)

FRAMESET

public FRAMESET FRAMESET(boolean rows,
                         float size)

FRAMESET

public FRAMESET FRAMESET(boolean rows)
Defines a <FRAMESET> tag. When this function is used, it cannot be combined with any other html element, as this would cause the page not to be displayed within the browser.

Returns:
the FRAMESET object which can be used to build up again FRAMESET or FRAME objects.

MenuFrameset

public E4MenuFrameset MenuFrameset(java.lang.String persistantObjId,
                                   int layout,
                                   E4ServletImplementation_Intf servlet)

MenuFrameset

public E4MenuFrameset MenuFrameset(java.lang.String persistantObjId,
                                   E4ServletImplementation_Intf servlet)

toHtml

public void toHtml(E4StringBufferHtml buf,
                   E4ServletImplementation_Intf servlet)
            throws java.lang.Exception
General about FRAMES/FRAMESET: A FRAMESET is once derived from class HTML, the next FRAMESET can be derived from FRAMESET. A FRAMESET consists of FRAME (which is a subclass of HTML) or again a FRAMESET. When a FRAME is used, when it is converted into Html using the toHtml(e4s.util.E4StringBufferHtml, e4s.servlet.E4ServletImplementation_Intf) function, for each <FRAME>-tag a URL pattern is created, using the E4ServletImplementation_Intf.PARAM_PRESERVED with an generic unique ID (based on the time and m_random). Instead of printing out the content of the frame itself, a link is generated in the <FRAME SRC="..">-tag. The content of the frame is stored using the function E4ServletImplementation_Intf.writePreserved(String,E4HtmlElement_Intf). In the servlet main routine (typically the doPost() or doGet() method this code should be used to handle this URL requests: if (! servlet.writePreservedOut()) { // continue with execution }

Specified by:
toHtml in interface E4HtmlElement_Intf
Overrides:
toHtml in class E4HtmlElementGeneral
Parameters:
servlet - use the getServlet() to get the current servlet context
Throws:
java.lang.Exception

createEventHandler

public E4EventHandlerFRAMESET createEventHandler(java.lang.String name,
                                                 int event)
Create and add an E4EventHandlerFRAMESET.

Parameters:
name - name of the E4JavaScript function used for the E4EventHandlerFRAMESET
event - a event for the handler
Returns:
the new created handler
See Also:
createEventHandler( int ), setEventHandler(e4s.html.E4EventHandlerFRAMESET)

createEventHandler

public E4EventHandlerFRAMESET createEventHandler(int event)

setEventHandler

public void setEventHandler(E4EventHandlerFRAMESET handler)

eventHandlers

public java.lang.StringBuffer eventHandlers()

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

setFramespacing

public void setFramespacing(int framespacing)

getFramespacing

public int getFramespacing()

setFrameborder

public void setFrameborder(boolean frameborder)

getFrameborder

public boolean getFrameborder()

SmoothResize2

public void SmoothResize2()
                   throws FRAMESET.E4FrameException
Deprecated. 

Add a small frame to resize the frameset.

Throws:
FRAMESET.E4FrameException - when the previous element was not a FRAME or FRAMESET element with a specified width in pixel
See Also:
E4ModuleFrameSpacer, #SmoothResize(int,int,int,int)

SmoothResize

public void SmoothResize(int top_position,
                         int min_width,
                         int max_width)
                  throws FRAMESET.E4FrameException
Deprecated. 

Add a small frame to resize the frameset.

Parameters:
top_position - if not -1 then the top position (or left position) where the resize-icons are drawn
min_width - the if not -1 then the minimum width (or height)
max_width - the if not -1 then the minimum width (or height)
Throws:
FRAMESET.E4FrameException - when the previous element was not a FRAME or FRAMESET element with a specified width in pixel
See Also:
E4ModuleFrameSpacer, #SmoothResize(int)

SmoothResize

public void SmoothResize(int top_position,
                         int min_width,
                         int max_width,
                         java.lang.String id)
                  throws FRAMESET.E4FrameException
Add a small frame to resize the frameset.

Parameters:
top_position - if not -1 then the top position (or left position) where the resize-icons are drawn
min_width - the if not -1 then the minimum width (or height)
max_width - the if not -1 then the minimum width (or height)
id - id of the frameset for persisting the width/height
Throws:
FRAMESET.E4FrameException - when the previous element was not a FRAME or FRAMESET element with a specified width in pixel
See Also:
E4ModuleFrameSpacer, #SmoothResize(int)

addKeepAliveScript

public void addKeepAliveScript(E4ServletImplementation_Intf servlet)
Add a "keep alive" script to this frameset. The intention of this script is to call every 5 minutes a function on the server (which does nothing) by some E4Ajax like java scripting mechanism. This avoids a timeout while the user has the frameset still open. This function shall only be used on the main entry frameset of your application.

Parameters:
servlet - a valid servlet context
See Also:
E4ModuleFrameSpacer.keepAlive, E4ServletImplementation_Servlet.setMaxInactiveInterval(int), e4s.html.BODY#addKeepAliveScript(servlet.E4ServletImplementation_Servlet)

_createKeepAliveScript

public static E4JavaScript _createKeepAliveScript(E4ServletImplementation_Intf servlet)

onLoad

public E4EventHandlerFRAMESET onLoad()
Create an E4EventHandlerFRAMESET of type E4EventHandlerFRAMESET._EVENT_ONLOAD by a generic name and add it to the internal list. After creation, a call to setEventHandler(e4s.html.E4EventHandlerFRAMESET) is performed.

Returns:
the new created event handler
See Also:
setEventHandler(e4s.html.E4EventHandlerFRAMESET), E4EventHandlerFRAMESET._EVENT_ONLOAD, createEventHandler(String,int), onUnLoad()

onUnLoad

public E4EventHandlerFRAMESET onUnLoad()
Create an E4EventHandlerFRAMESET of type E4EventHandlerFRAMESET._EVENT_ONUNLOAD by a generic name and add it to the internal list.

Returns:
the new created event handler
See Also:
setEventHandler(e4s.html.E4EventHandlerFRAMESET), E4EventHandlerFRAMESET._EVENT_ONUNLOAD, createEventHandler(String,int), onLoad(), onUnLoad(e4s.html.E4Method,e4s.servlet.E4ServletImplementation_Intf)

onUnLoad

public void onUnLoad(E4Method mref,
                     E4ServletImplementation_Intf servlet)
Calls a method when the frameset becomes unloade. Create an E4EventHandlerFRAMESET of type E4EventHandlerFRAMESET._EVENT_ONUNLOAD by a generic name, add it to the internal list and call the specified method when the frameset becomes unloaded.

See Also:
onUnLoad(), BODY.onUnLoad(e4s.html.E4Method,e4s.servlet.E4ServletImplementation_Intf)

_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