|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.turbine.services.pull.util.UIManager
UIManager.java
Manages all UI elements for a Turbine Application. Any
UI element can be accessed in any template using the
$ui handle (assuming you use the default PullService
configuration). So, for example, you could access
the background colour for your pages by using
$ui.bgcolor
It would also be very cool to use some form of inheritence for UI elements. Say a $ui.bgcolor is used in a template where the bgcolor is not set for that part of hierarch, it would be cool if it could find the setting for the bgcolor in the parent directory. So you could override a UI element where you wanted and the system would fall back to the parent when necessary.
How to specify skins, how to deal with images, how could this be handled with a web app.
This is an application pull tool for the template system. You should not use it in a normal application!
Constructor Summary | |
UIManager()
|
Method Summary | |
java.lang.String |
get(java.lang.String key)
Retrieve a property from the properties held within the properties file for this skin. |
java.lang.String |
getScript(java.lang.String filename)
Retrieve the URL for a given script that is part of a skin. |
java.lang.String |
getScript(java.lang.String filename,
RunData data)
Retrieve the URL for a given script that is part of a skin. |
java.lang.String |
getSkin()
Retrieve the skin name. |
java.lang.String |
getStylecss()
Retrieve the URL for the style sheet that is part of a skin. |
java.lang.String |
getStylecss(RunData data)
Retrieve the URL for the style sheet that is part of a skin. |
java.lang.String |
image(java.lang.String imageId)
Retrieve the URL for an image that is part of a skin. |
java.lang.String |
image(java.lang.String imageId,
RunData data)
Retrieve the URL for an image that is part of a skin. |
void |
init(java.lang.Object data)
Initialize the UIManager object. |
void |
refresh()
This lets the tool know that it should be refreshed. |
void |
setSkin()
Set the skin name to the skin from the TR.props file. |
protected void |
setSkin(RunData data)
Set the skin name when the tool is configured to be loaded on a per-request basis. |
void |
setSkin(java.lang.String skinName)
Set the skin name to the specified skin. |
protected void |
setSkin(User user)
Set the skin name when the tool is configured to be loaded on a per-session basis. |
static void |
setSkin(User user,
java.lang.String skin)
Set the skin name user's temp hashmap for the current session. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public UIManager()
Method Detail |
public void init(java.lang.Object data)
init
in interface ApplicationTool
data
- This is null, RunData or User depending upon specified tool scope.public void refresh()
refresh
in interface ApplicationTool
public java.lang.String get(java.lang.String key)
public java.lang.String getSkin()
public java.lang.String image(java.lang.String imageId, RunData data)
public java.lang.String image(java.lang.String imageId)
public java.lang.String getStylecss(RunData data)
public java.lang.String getStylecss()
public java.lang.String getScript(java.lang.String filename, RunData data)
public java.lang.String getScript(java.lang.String filename)
public void setSkin()
public void setSkin(java.lang.String skinName)
skinName
- the skin name to use.protected void setSkin(RunData data)
data
- a RunData instanceprotected void setSkin(User user)
user
- a User instancepublic static void setSkin(User user, java.lang.String skin)
user
- a User instanceskin
- the skin name for the session
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |