|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.rwt.branding.AbstractBranding
public abstract class AbstractBranding
This abstract class is intended to be implemented by clients that want to have control over various aspects of the web application such as
Note: Instances of this class are expected to be immutable. All getter methods should return the same values whenever they are called.
Brandings can be registered via a <context-param>
s
in the web.xml
. Specify org.eclipse.rwt.brandings
in the param-name element and a comma-separated list of fully qualified
class names that extend this class in the param-value element.
The following is an example snippet that registers two brandings.
... <context-param> <param-name>org.eclipse.rwt.brandings</param-name> <param-value>org.demo.MyBranding1,org.demo.MyBranding2</param-value> </context-param> ...
Constructor Summary | |
---|---|
AbstractBranding()
|
Method Summary | |
---|---|
java.lang.String |
getBody()
Returns HTML code to be placed inside the <body> tag or
null if no custom HTML code should be placed inside the
<body> tag. |
java.lang.String |
getDefaultEntryPoint()
Returns the default entry point. |
java.lang.String[] |
getEntryPoints()
Returns an array of entry points which are allowed to be the started with this branding (or servlet name). |
java.lang.String |
getExitConfirmationText()
Returns the message to display in the exit confirmation. |
java.lang.String |
getFavIcon()
Returns the resource name for the favorites icon or null to
indicate that no favorites icon is available. |
Header[] |
getHeaders()
Returns an array of HTML header tags or null if no additional headers are provided. |
java.lang.String |
getId()
Returns the id of this branding extension. |
java.lang.String |
getServletName()
Returns the name of the servlet on which the application should be available. |
java.lang.String |
getThemeId()
Returns the id of the theme to be used with this branding or null to indicate that the default theme should be used. |
java.lang.String |
getTitle()
Returns the title that will be displayed in the browser window or null to indicate that no title should be displayed. |
void |
registerResources()
This method is called before the branding is applied for the first time. |
boolean |
showExitConfirmation()
Indicates whether an exit confirmation should be shown. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractBranding()
Method Detail |
---|
public java.lang.String getServletName()
http://<host>:<port>/<servletName>
.
The default behavior is to return null
.
null
public java.lang.String getDefaultEntryPoint()
null
or an
empty string indicates that there is no default entry point.
A URL like http://<host>:<port>/<servletName>
would automatically execute the entry point returned here.
The default behavior is to return null
.
null
public java.lang.String[] getEntryPoints()
null
or an empty array
is returned, every entrypoint is allowed to be started.
The default behavior is to return null
.
null
public java.lang.String getThemeId()
null
to indicate that the default theme should be used.
The default behavior is to return null
.
null
public java.lang.String getId()
The default behavior is to return null
.
null
.public java.lang.String getFavIcon()
null
to
indicate that no favorites icon is available.
Note: if a fav icon is provided, the application code
must register the resource at the ResourceManager
.
Preferrably, this should be done in the registerResources
callback method.
The default behavior is to return null
.
null
IResourceManager
,
registerResources()
public java.lang.String getTitle()
null
to indicate that no title should be displayed.
The default behavior is to return null
.
null
public Header[] getHeaders()
The default behavior is to return null
.
Header
instances or null
Header
public java.lang.String getBody()
<body>
tag or
null
if no custom HTML code should be placed inside the
<body> tag.
Be aware that the HTML code returned by this method is taken as-is and may break the surrounding HTML page.
The default behavior is to return null
.
null
public boolean showExitConfirmation()
The exit confirmation is shown whenever the user tries to close the browser window or tab or to navigate to another URL. Usually, browsers pop up a dialog that allows the user to cancel the operation.
Note that this is a hint that some browsers do not support at all and others only
partly (i.e. showing a generic message instead of the one provided by
getExitConfirmationText()
).
true
if an exit confirmation should be showngetExitConfirmationText()
public java.lang.String getExitConfirmationText()
showExitConfirmation()
must return true
to enable
this message.
showExitConfirmation()
public void registerResources() throws java.io.IOException
favIcon
.
The default behavior is to do nothing.
java.io.IOException
- if an I/O error occurs
|
Eclipse Rich Ajax Platform | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) EclipseSource and others 2002, 2012. All rights reserved.