public class HTMLPage extends AbstractDocument
Constructor and Description |
---|
HTMLPage()
Creates an empty page with the given buffer size and associates it with the client agent
|
HTMLPage(HTMLPage page)
Creates a page that has the same indents as the given page and is associated with the same client agent
|
Modifier and Type | Method and Description |
---|---|
void |
afterRender()
Callback function called after a document is rendered
|
void |
appendHeaderScript(java.lang.String script)
Use to append JavaScript to the HTML page header together with other AjaxSwing's JavaScripts.
|
void |
appendOnLoadScriptBody(java.lang.String onLoadFunctionBody)
Appends JavaScript statements to the body of onLoad function.
|
void |
appendWindowFooter()
Appends footer to the current component's body
|
void |
beforeRender()
Callback function called before a document is rendered
|
java.lang.String |
cleanupImageUrl(java.lang.String url)
Helper function used by getImageUrl to clean up the image URL in case it originated from a jar or from a file
|
void |
clearWindowFooter() |
static java.lang.String |
generateName(java.lang.Object obj)
Delegates the generation of component name to WindowUpdater
|
java.lang.StringBuilder |
getBody()
Returns the buffer representing the page body (HTML between <body> and </body> tags)
|
java.lang.String |
getComponentName(java.awt.Component comp) |
static java.lang.String |
getComponentName(java.awt.MenuBar comp)
If a component has a name, it is returned.
|
java.lang.String |
getCssClass() |
java.lang.String |
getDocsStampURL(java.lang.String name) |
java.lang.StringBuilder |
getHeader()
Returns the buffer representing the page header (HTML between <header> and </header> tags)
|
java.lang.StringBuilder |
getHeaderScript()
Returns the buffer representing the page header (HTML between <header> and </header> tags)
|
java.lang.String |
getImageUrl(javax.swing.Icon icon,
java.awt.Component component)
Helper function that can be used to obtain a URL that should be used on a page for a given Icon.
|
java.lang.String |
getImageUrl(java.awt.Image image)
Helper function that can be used to obtain a URL that should be used on a page for a given Image.
|
int |
getNextComponentNameIndex(java.lang.Object obj) |
java.lang.String |
getOnLoadScriptBody() |
HTMLPageRenderer |
getPageRenderer()
Returns the page renderer associated with the page.
|
int |
getSnapshotImageIndex()
Returns an index for generating the snapshot name
|
java.lang.String |
getSubmitURL()
Returns the URL
|
java.lang.String |
getTempFileURL(java.lang.String fileName)
Appends a full URL to a file located in AjaxSwing temp directory
|
java.lang.String |
getThemeDocsStampURL(java.lang.String name) |
java.awt.Component |
getV4RootComponent() |
java.lang.StringBuilder |
getWindowFooter()
Returns the buffer representing the end of the page body.
|
void |
incSnapshotIndex()
Increments an index for generating the snapshot name by one
|
void |
reset(boolean complete)
Clears the page and its buffers.
|
void |
setRenderContext(RenderContext context)
Sets rendering context
|
void |
setUseOnLoad(boolean useOnLoad)
Sets weather or not the page should have onLoad function specified for the tag
|
void |
setV4RootComponent(java.awt.Component v4RootComponent) |
java.lang.String |
toString()
Renders page as string using the specified template
|
getClientAgent, getDocsURL, getDocumentRenderer, getProps, getRedirectURL, getRenderContext, getThemeDocsURL, getThemeName, getTitle, isPartialUpdateAllowed, setClientAgent, setComponentDirty, setDocumentRenderer, setPartialUpdateAllowed, setRedirectURL, setTitle
public HTMLPage()
public HTMLPage(HTMLPage page)
public HTMLPageRenderer getPageRenderer()
public void setRenderContext(RenderContext context)
public java.lang.StringBuilder getBody()
public java.lang.StringBuilder getWindowFooter()
public void clearWindowFooter()
public java.lang.StringBuilder getHeader()
public java.lang.StringBuilder getHeaderScript()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getCssClass()
public java.lang.String getSubmitURL()
public static java.lang.String generateName(java.lang.Object obj)
obj
- UI elementpublic void reset(boolean complete)
reset
in class AbstractDocument
public static java.lang.String getComponentName(java.awt.MenuBar comp)
public java.lang.String getComponentName(java.awt.Component comp)
public java.lang.String getImageUrl(javax.swing.Icon icon, java.awt.Component component)
public java.lang.String getImageUrl(java.awt.Image image)
public java.lang.String cleanupImageUrl(java.lang.String url)
public java.lang.String getTempFileURL(java.lang.String fileName)
fileName
- public void appendOnLoadScriptBody(java.lang.String onLoadFunctionBody)
onLoadFunctionBody
- statements to appear inside the body of function onLoad()public java.lang.String getOnLoadScriptBody()
public void setUseOnLoad(boolean useOnLoad)
public void beforeRender()
Document
beforeRender
in interface Document
beforeRender
in class AbstractDocument
public void afterRender()
Document
afterRender
in interface Document
afterRender
in class AbstractDocument
public void appendWindowFooter()
public java.lang.String getThemeDocsStampURL(java.lang.String name)
public java.lang.String getDocsStampURL(java.lang.String name)
public void appendHeaderScript(java.lang.String script)
public int getSnapshotImageIndex()
public void incSnapshotIndex()
public int getNextComponentNameIndex(java.lang.Object obj)
getNextComponentNameIndex
in class AbstractDocument
public void setV4RootComponent(java.awt.Component v4RootComponent)
public java.awt.Component getV4RootComponent()
Copyright © 2000-2012 CreamTec LLC. All Rights Reserved.