Java Doc for UIManager.java in  » Web-Framework » TURBINE » org » apache » turbine » services » pull » util » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Framework » TURBINE » org.apache.turbine.services.pull.util 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.turbine.services.pull.util.UIManager

UIManager
public class UIManager implements ApplicationTool(Code)
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

Questions:

What is the best way to allow an application to be skinned. And how to allow the flexible altering of a particular UI element in certain parts of the template hierarchy. For example on one section of your site you might like a certain bgcolor, on another part of your site you might want another. How can be let the designer specify these properties and still use the single $app.ui.bgcolor in all the templates.

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!
author:
   Jason van Zyl
author:
   James Coltman
author:
   Henning P. Schmiedehausen
author:
   Thomas Vandahl
version:
   $Id: UIManager.java 535070 2007-05-04 03:23:22Z seade $





Method Summary
public  Stringget(String key)
     Retrieve a property from the properties held within the properties file for this skin.
public  StringgetScript(String filename, RunData data)
     Retrieve the URL for a given script that is part of a skin.
public  StringgetScript(String filename)
     Retrieve the URL for a given script that is part of a skin.
public  StringgetSkin()
     Retrieve the skin name.
public  StringgetStylecss(RunData data)
     Retrieve the URL for the style sheet that is part of a skin.
public  StringgetStylecss()
     Retrieve the URL for the style sheet that is part of a skin.
public  Stringimage(String imageId, RunData data)
     Retrieve the URL for an image that is part of a skin.
public  Stringimage(String imageId)
     Retrieve the URL for an image that is part of a skin.
public  voidinit(Object data)
     Initialize the UIManager object.
public  voidrefresh()
     This lets the tool know that it should be refreshed.
public  voidsetSkin()
     Set the skin name to the skin from the TR.props file.
public  voidsetSkin(String skinName)
     Set the skin name to the specified skin.
protected  voidsetSkin(RunData data)
     Set the skin name when the tool is configured to be loaded on a per-request basis.
protected  voidsetSkin(User user)
     Set the skin name when the tool is configured to be loaded on a per-session basis.
public static  voidsetSkin(User user, String skin)
     Set the skin name user's temp hashmap for the current session.



Method Detail
get
public String get(String key)(Code)
Retrieve a property from the properties held within the properties file for this skin.



getScript
public String getScript(String filename, RunData data)(Code)
Retrieve the URL for a given script that is part of a skin. The script is stored in the WEBAPP/resources/ui/skins/ directory



getScript
public String getScript(String filename)(Code)
Retrieve the URL for a given script that is part of a skin. The script is stored in the WEBAPP/resources/ui/skins/ directory



getSkin
public String getSkin()(Code)
Retrieve the skin name.



getStylecss
public String getStylecss(RunData data)(Code)
Retrieve the URL for the style sheet that is part of a skin. The style is stored in the WEBAPP/resources/ui/skins/<SKIN> directory with the filename skin.css Use this if for some reason your server name, server scheme, or server port change on a per request basis. I'm not sure if this would happend in a load balanced situation. I think in most cases the style() method would probably be enough, but I'm not absolutely positive.



getStylecss
public String getStylecss()(Code)
Retrieve the URL for the style sheet that is part of a skin. The style is stored in the WEBAPP/resources/ui/skins/<SKIN> directory with the filename skin.css



image
public String image(String imageId, RunData data)(Code)
Retrieve the URL for an image that is part of a skin. The images are stored in the WEBAPP/resources/ui/skins/<SKIN>/images directory. Use this if for some reason your server name, server scheme, or server port change on a per request basis. I'm not sure if this would happen in a load balanced situation. I think in most cases the image(String image) method would probably be enough, but I'm not absolutely positive.



image
public String image(String imageId)(Code)
Retrieve the URL for an image that is part of a skin. The images are stored in the WEBAPP/resources/ui/skins/<SKIN>/images directory.



init
public void init(Object data)(Code)
Initialize the UIManager object.
Parameters:
  data - This is null, RunData or User depending upon specified tool scope.



refresh
public void refresh()(Code)
This lets the tool know that it should be refreshed. The tool can perform whatever actions are necessary to refresh itself. This is necessary for sane development where you probably want the tools to refresh themselves on every request.



setSkin
public void setSkin()(Code)
Set the skin name to the skin from the TR.props file. If the property is not present use the default skin.



setSkin
public void setSkin(String skinName)(Code)
Set the skin name to the specified skin.
Parameters:
  skinName - the skin name to use.



setSkin
protected void setSkin(RunData data)(Code)
Set the skin name when the tool is configured to be loaded on a per-request basis. By default it calls getSkin to return the skin specified in TR.properties. Developers can write a subclass of UIManager that overrides this method to determine the skin to use based on information held in the request.
Parameters:
  data - a RunData instance



setSkin
protected void setSkin(User user)(Code)
Set the skin name when the tool is configured to be loaded on a per-session basis. It the user's temp hashmap contains a value in the attribute specified by the String constant SKIN_ATTRIBUTE then that is returned. Otherwise it calls getSkin to return the skin specified in TR.properties.
Parameters:
  user - a User instance



setSkin
public static void setSkin(User user, String skin)(Code)
Set the skin name user's temp hashmap for the current session.
Parameters:
  user - a User instance
Parameters:
  skin - the skin name for the session



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.