|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.wings.SComponent
org.wings.SContainer
org.wings.SRootContainer
org.wings.SFrame
public class SFrame
The root component of every component hierarchy.
A SessionServlet requires an instance of SFrame to render the page. SFrame consists of some header informaton (meta, link, script) and a stack of components. The bottommost component of the stack is always the contentPane. When dialogs are to be shown, they are stacked on top of it.
| Field Summary | |
|---|---|
protected List |
headers
A list of all header used by this frame. |
protected String |
statusLine
|
protected StyleSheet |
styleSheet
the style sheet used in certain look and feels. |
protected String |
title
The Title of the Frame. |
| Fields inherited from class org.wings.SRootContainer |
|---|
contentPane, windowsPane |
| Fields inherited from class org.wings.SComponent |
|---|
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME |
| Constructor Summary | |
|---|---|
SFrame()
Creates a new SFrame |
|
SFrame(String title)
Creates a new SFrame |
|
| Method Summary | |
|---|---|
void |
addDynamicResource(DynamicResource d)
Adds a dynamic ressoure. |
void |
addHeader(int index,
Object headerElement)
Add an Renderable into the header of the HTML page at the desired index position |
void |
addHeader(Object headerElement)
Add an Renderable into the header of the HTML page |
void |
addInvalidLowLevelEventListener(SInvalidLowLevelEventListener l)
Registers an SInvalidLowLevelEventListener in this frame. |
void |
clearHeaders()
Removes all headers. |
void |
deregisterGlobalInputMapComponent(SComponent comp)
|
void |
fireIntermediateEvents()
fire events which describes a "in progress" state change, like TreeWillExpand, or ListSelectionEvent with getIsAdjusting() true, ... |
void |
fireInvalidLowLevelEventListener(LowLevelEventListener source)
Notify all SInvalidLowLevelEventListener about an outdated request
on the passed component |
Map<String,Object> |
getAutoAdjustLayout()
|
SButton |
getBackButton()
A button activated on detected browser back clicks. |
DynamicResource |
getDynamicResource(Class c)
Severeral Dynamic code Ressources are attached to a SFrame. |
Collection |
getDynamicResources()
|
String |
getEventEpoch()
|
SComponent |
getFocus()
|
Set<SComponent> |
getGlobalInputMapComponents()
|
List |
getHeaders()
|
InputMap |
getInputMap(int condition)
|
String |
getLogLevel()
|
SFrame |
getParentFrame()
Return this. |
RequestURL |
getRequestURL()
Returns the base URL for a request to the WingsServlet. |
String |
getTargetResource()
Every externalized ressource has an id. |
String |
getTitle()
Title of this HTML page. |
Map<String,Object> |
getUpdateCursor()
|
boolean |
handleError(Throwable e)
custom error handling. |
List |
headers()
Deprecated. Use getHeaders() instead |
void |
hide()
Hides this frame. |
protected void |
initializeContentPane()
|
void |
invalidate()
Invalidate this frame by incrementing its event epoch. |
void |
invite(ComponentVisitor visitor)
Invite a ComponentVisitor. |
boolean |
isDebugJs()
|
boolean |
isEpochCheckEnabled()
Asks the low-level event listener if epoch checking should be perfomed on it. |
boolean |
isFormContentPane()
Tell wether the contentPane is an SForm. |
boolean |
isNoCaching()
|
boolean |
isUpdateEnabled()
|
void |
processLowLevelEvent(String name,
String[] values)
Deliver low level/http events (parameters). |
void |
propertyChange(PropertyChangeEvent pe)
|
void |
registerGlobalInputMapComponent(SComponent comp)
|
void |
removeDispatchListener(SInvalidLowLevelEventListener l)
Removes the passed SInvalidLowLevelEventListener from this frame. |
void |
removeDynamicResource(Class dynamicResourceClass)
Removes the instance of the dynamic ressource of the given class. |
boolean |
removeHeader(Object headerElement)
|
void |
setAutoAdjustLayout(Map<String,Object> autoAdjustLayout)
|
void |
setBackButton(SButton defaultBackButton)
This button allows you to programattically react on Back buttons pressed in the browser itselfs. |
void |
setCG(FrameCG cg)
|
void |
setEpochCheckEnabled(boolean epochCheckEnabled)
|
void |
setFocus(SComponent focusOnComponent)
Choose which component rendered inside this frame should gain the edit focus on next rendering This function is called by SComponent.requestFocus() |
void |
setFormContentPane(boolean contentPaneForm)
Determine wether the contentPane shall be an SForm. |
void |
setInputMap(int condition,
InputMap inputMap)
Sets The current input map. |
void |
setNoCaching(boolean noCaching)
Typically you don't want any wings application to operate on old 'views' meaning old pages. |
void |
setRequestURL(RequestURL requestURL)
Set server address. |
void |
setStatusLine(String s)
|
void |
setTargetResource(String targetResource)
Set the target resource |
void |
setTitle(String title)
Sets the title of this HTML page. |
void |
setUpdateCursor(Map<String,Object> updateCursor)
|
void |
setUpdateEnabled(boolean enabled)
|
void |
setVisible(boolean visible)
Shows or hide this frame. |
void |
show()
Shows this frame. |
void |
write(Device s)
Mark this component as subject to reload if the property, that is given in its old and new fashion, changed. |
| Methods inherited from class org.wings.SRootContainer |
|---|
addComponent, getContentPane, getWindowCount, getWindowsPane, initializeWindowsPane, popWindow, pushWindow, remove, removeWindow, setCG, setContentPane, setWindowsPane |
| Methods inherited from class org.wings.SContainer |
|---|
add, add, add, add, addComponent, addComponent, addComponent, addContainerListener, addNotify, clone, fireContainerEvent, getComponent, getComponentCount, getComponentList, getComponents, getConstraintAt, getConstraintList, getLayout, inviteEachComponent, isShowingChildren, processContainerEvent, remove, removeAll, removeContainerListener, removeNotify, setCG, setLayout, setParentFrame, updateCG |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.wings.LowLevelEventListener |
|---|
fireFinalEvents, getLowLevelEventId, getName, isEnabled |
| Field Detail |
|---|
protected String title
protected List headers
protected StyleSheet styleSheet
protected String statusLine
| Constructor Detail |
|---|
public SFrame()
public SFrame(String title)
title - Title of this frame, rendered in browser window title| Method Detail |
|---|
public void addDynamicResource(DynamicResource d)
getDynamicResource(Class)public void removeDynamicResource(Class dynamicResourceClass)
dynamicResourceClass - Class of dynamic ressource to removegetDynamicResource(Class)public DynamicResource getDynamicResource(Class c)
SFrame.
Frame.plaf for details, but in general you wil find attached
to every SFrame a
ReloadResource rendering the HTML-Code of all SComponents inside this frame.
public Collection getDynamicResources()
public SFrame getParentFrame()
this.
getParentFrame in class SComponentSComponent.addParentFrameListener(org.wings.event.SParentFrameListener)public final void invalidate()
public final String getEventEpoch()
public final void setRequestURL(RequestURL requestURL)
public final RequestURL getRequestURL()
getRequestURL in class SComponentpublic void setTargetResource(String targetResource)
public String getTargetResource()
ReloadResource.
ReloadResourcepublic void addHeader(Object headerElement)
Renderable into the header of the HTML page
headerElement - is typically a Link or DynamicResource.Link
public void addHeader(int index,
Object headerElement)
Renderable into the header of the HTML page at the desired index position
headerElement - is typically a Link or DynamicResource.index - index in header list to add this itemLink,
getHeaders()public boolean removeHeader(Object headerElement)
addHeader(Object)public void clearHeaders()
addHeader(Object)public List headers()
getHeaders() instead
addHeader(Object)public List getHeaders()
addHeader(Object)public void setTitle(String title)
title - The window title.public String getTitle()
public void setStatusLine(String s)
public boolean isNoCaching()
true if the generated HTML code of this frame/page should
not be cached by browser, false if no according HTTP/HTML headers
should be renderedsetNoCaching(boolean)
public void write(Device s)
throws IOException
SComponent
write in interface Renderablewrite in class SComponentIOExceptionpublic void setNoCaching(boolean noCaching)
SFrame objects
rendered through ReloadResource are marked as do not cache
inside the HTTP response header and the generated HTML frame code.
If for any purpose (i.e. you a writing a read only application) you want
th user to be able to work on old views then set this to false
and Mark the according SComponents to be not epoch checked
(i.e. SAbstractButton.setEpochCheckEnabled(boolean))
noCaching - The noCaching to set.LowLevelEventListener.isEpochCheckEnabled(),
LowLevelEventDispatcherpublic void show()
Session.getFrames()public void hide()
Session.getFrames()public void setVisible(boolean visible)
setVisible in class SComponentvisible - wether this component will show or notSession.getFrames()public void propertyChange(PropertyChangeEvent pe)
propertyChange in interface PropertyChangeListenerpublic void setCG(FrameCG cg)
public void invite(ComponentVisitor visitor)
throws Exception
SContainer
invite in class SContainervisitor - the visitor to be invited
Exceptionpublic void setFocus(SComponent focusOnComponent)
SComponent.requestFocus()
focusOnComponent - the component which requests the focus.public SComponent getFocus()
setFocus(SComponent)
public void processLowLevelEvent(String name,
String[] values)
LowLevelEventListener
processLowLevelEvent in interface LowLevelEventListenerprocessLowLevelEvent in class SComponentname - the name-value-pair's namevalues - the name-value-pair's valuespublic final void addInvalidLowLevelEventListener(SInvalidLowLevelEventListener l)
SInvalidLowLevelEventListener in this frame.
l - The listener to notify about outdated reqestsInvalidLowLevelEventpublic final void removeDispatchListener(SInvalidLowLevelEventListener l)
SInvalidLowLevelEventListener from this frame.
l - The listener to removeInvalidLowLevelEventpublic final void fireInvalidLowLevelEventListener(LowLevelEventListener source)
SInvalidLowLevelEventListener about an outdated request
on the passed component
source - The SComponent received an outdated eventLowLevelEventDispatcherpublic SButton getBackButton()
setBackButton(SButton)public void setBackButton(SButton defaultBackButton)
addInvalidLowLevelEventListener(SInvalidLowLevelEventListener).
While the listener throws an event on every detected component receiving an invalid
request, this button is only activated if
SForm.setPostMethod(boolean) and use setNoCaching(boolean) for
no caching. This will advise the browser to reload every back page.
defaultBackButton - A button to trigger upon detected invalid epochs.public void fireIntermediateEvents()
LowLevelEventListener
fireIntermediateEvents in interface LowLevelEventListenerpublic boolean isEpochCheckEnabled()
LowLevelEventListenertrue the Dispatcher will ignore request originating from old views
(typically iniated by triggering browser back and clicking somewhere.)
isEpochCheckEnabled in interface LowLevelEventListenertrue if epoch checking should be perfomed, false
if all request for this component should be processed.LowLevelEventListener.isEpochCheckEnabled()public void setEpochCheckEnabled(boolean epochCheckEnabled)
LowLevelEventListener.isEpochCheckEnabled()public boolean handleError(Throwable e)
e - The throwable causing this.
public InputMap getInputMap(int condition)
getInputMap in class SComponentcondition - Either SComponent.WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT or SComponent.WHEN_IN_FOCUSED_FRAME
SComponent.setInputMap(int, javax.swing.InputMap)
public void setInputMap(int condition,
InputMap inputMap)
SComponent
setInputMap in class SComponentcondition - Either SComponent.WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT or SComponent.WHEN_IN_FOCUSED_FRAMEinputMap - The new input mapJComponent.setInputMap(int, javax.swing.InputMap)public void registerGlobalInputMapComponent(SComponent comp)
public void deregisterGlobalInputMapComponent(SComponent comp)
public Set<SComponent> getGlobalInputMapComponents()
public boolean isUpdateEnabled()
public void setUpdateEnabled(boolean enabled)
public Map<String,Object> getUpdateCursor()
public void setUpdateCursor(Map<String,Object> updateCursor)
public Map<String,Object> getAutoAdjustLayout()
public void setAutoAdjustLayout(Map<String,Object> autoAdjustLayout)
protected void initializeContentPane()
initializeContentPane in class SRootContainerpublic boolean isFormContentPane()
true if the contentPane is an SForm, false otherwisepublic void setFormContentPane(boolean contentPaneForm)
contentPaneForm - true if the contentPane shall be an SForm, false otherwisepublic String getLogLevel()
public boolean isDebugJs()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||