Java Doc for SubstanceHighlightManager.java in  » Swing-Library » substance-look-feel » org » jvnet » substance » utils » 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 » Swing Library » substance look feel » org.jvnet.substance.utils 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.jvnet.substance.utils.SubstanceHighlightManager

SubstanceHighlightManager
public class SubstanceHighlightManager (Code)
This class is used to decide whether the a highlight theme should be applied on a specific component.

At runtime, the manager is populated from META-INF/substance.highlight.properties resources found in classpath. This allows providing additional application-specific components to be registered to use highlight theme. Each such resource should contain a list of fully qualified class names, one class name per line. The class name may be a "leaf" class (such as JToggleButton ), or can be a parent class / interface (such as ListCellRenderer ). In the later case, the highlight theme will be used on all classes that extend such class / implement such interface.

In addition, the SubstanceHighlightManager.toUseHighlightTheme(Component) API can be used to register additional application-specific components.


author:
   Kirill Grouchnikov


Field Summary
protected  Set<Class<?>>cache
     Contains Class instances.
protected static  SubstanceHighlightManagerinstance
     The singleton instance.
protected  Set<Class<?>>useHighlightThemeOn
     Contains Class instances.


Method Summary
public  voidaddToUseHighlightTheme(Class clazz)
     Adds the specified class to the set of components that should use highlight theme.
public  voidaddToUseHighlightTheme(String className)
     Adds the specified class name to the set of components that should use highlight theme.
public static synchronized  SubstanceHighlightManagergetInstance()
     Returns the singleton instance.
public  voidpopulate()
     Populates the SubstanceHighlightManager.useHighlightThemeOn set.
protected  voidpopulateFrom(URL url)
     Populates the SubstanceHighlightManager.useHighlightThemeOn set from the specific URL resource.
public synchronized  booleantoUseHighlightTheme(Component comp)
     Returns indication whether the specified component should use highlight theme.

Field Detail
cache
protected Set<Class<?>> cache(Code)
Contains Class instances. This serves as a cache to speed up the subsequent processing.
See Also:   SubstanceHighlightManager.toUseHighlightTheme(Component)



instance
protected static SubstanceHighlightManager instance(Code)
The singleton instance.



useHighlightThemeOn
protected Set<Class<?>> useHighlightThemeOn(Code)
Contains Class instances. If a class instance is in this set, all components of this class (directly, via extension or via inheritance) will use highlight theme.





Method Detail
addToUseHighlightTheme
public void addToUseHighlightTheme(Class clazz)(Code)
Adds the specified class to the set of components that should use highlight theme.
Parameters:
  clazz - Component class.



addToUseHighlightTheme
public void addToUseHighlightTheme(String className)(Code)
Adds the specified class name to the set of components that should use highlight theme.
Parameters:
  className - Component class name.



getInstance
public static synchronized SubstanceHighlightManager getInstance()(Code)
Returns the singleton instance. The singleton instance.



populate
public void populate()(Code)
Populates the SubstanceHighlightManager.useHighlightThemeOn set. The classpath is scanned for all resources that match the name META-INF/substance.highlight.properties.
See Also:   SubstanceHighlightManager.populateFrom(URL)



populateFrom
protected void populateFrom(URL url)(Code)
Populates the SubstanceHighlightManager.useHighlightThemeOn set from the specific URL resource. The resource should contain a list of fully qualified class names, one class name per line. The class name may be a "leaf" class (such as JToggleButton ), or can be a parent class / interface (such as ListCellRenderer ). In the later case, the highlight theme will be used on all classes that extend such class / implement such interface.
Parameters:
  url - Resource URL.



toUseHighlightTheme
public synchronized boolean toUseHighlightTheme(Component comp)(Code)
Returns indication whether the specified component should use highlight theme. The component hierarchy is scanned from the component up. At each stage, the current ascendant is checked against all entries in the SubstanceHighlightManager.useHighlightThemeOn set. If the class of the current ascendant matches one of the entries, true is returned. Otherwise, false is returned (no ascendant found matching any of the entries in the SubstanceHighlightManager.useHighlightThemeOn set).

The implementation uses the SubstanceHighlightManager.cache tp speed up the processing. When a component class is determined to use highlight theme, its class is put in this cache. The implementation first consults this cache - if the component class is found, true is returned. Otherwise, the above algorithm is performed.
Parameters:
  comp - Component. true if the specified component should usehighlight theme, false otherwise.




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.