Java Doc for ShadowPopupFactory.java in  » Swing-Library » jgoodies-looks » com » jgoodies » looks » common » 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 » jgoodies looks » com.jgoodies.looks.common 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   javax.swing.PopupFactory
      com.jgoodies.looks.common.ShadowPopupFactory

ShadowPopupFactory
final public class ShadowPopupFactory extends PopupFactory (Code)
The JGoodies Looks implementation of PopupFactory. Adds a drop shadow border to all popups except ComboBox popups. It is installed by the JGoodies Plastic L&F, as well as by the JGoodies Windows L&F during the Look&Feel initialization, see com.jgoodies.looks.plastic.PlasticLookAndFeel.initialize and com.jgoodies.looks.windows.WindowsLookAndFeel.initialize .

This factory shall not be used on platforms that provide native drop shadows, such as the Mac OS X. Therefore the invocation of the ShadowPopupFactory.install() method will have no effect on such platforms.

Note: To be used in a sandbox environment, this PopupFactory requires two AWT permissions: createRobot and readDisplayPixels. The reason for it is, that in the case of the heavy weight popups this PopupFactory uses a Robot to snapshot the screen background to simulate the drop shadow effect.
author:
   Andrej Golovnin
author:
   Karsten Lentzsch
version:
   $Revision: 1.2 $
See Also:   java.awt.AWTPermission
See Also:   java.awt.Robot
See Also:   javax.swing.Popup
See Also:   LookAndFeel.initialize
See Also:   LookAndFeel.uninitialize



Field Summary
final static  StringPROP_HORIZONTAL_BACKGROUND
     In the case of heavy weight popups, snapshots of the screen background will be stored as client properties of the popup contents' parent. These snapshots will be used by the popup border to simulate the drop shadow effect.
final static  StringPROP_VERTICAL_BACKGROUND
    


Method Summary
public  PopupgetPopup(Component owner, Component contents, int x, int y)
     Creates a Popup for the Component owner containing the Component contents.
public static  voidinstall()
     Installs the ShadowPopupFactory as the shared popup factory on non-Mac platforms.
public static  voiduninstall()
     Uninstalls the ShadowPopupFactory and restores the original popup factory as the new shared popup factory.

Field Detail
PROP_HORIZONTAL_BACKGROUND
final static String PROP_HORIZONTAL_BACKGROUND(Code)
In the case of heavy weight popups, snapshots of the screen background will be stored as client properties of the popup contents' parent. These snapshots will be used by the popup border to simulate the drop shadow effect. The two following constants define the names of these client properties.
See Also:   com.jgoodies.looks.common.ShadowPopupBorder



PROP_VERTICAL_BACKGROUND
final static String PROP_VERTICAL_BACKGROUND(Code)





Method Detail
getPopup
public Popup getPopup(Component owner, Component contents, int x, int y) throws IllegalArgumentException(Code)
Creates a Popup for the Component owner containing the Component contents. In addition to the superclass behavior, we try to return a Popup that has a drop shadow, if popup drop shadows are active - as returned by Options#isPopupDropShadowActive.

owner is used to determine which Window the new Popup will parent the Component the Popup creates to. A null owner implies there is no valid parent. x and y specify the preferred initial location to place the Popup at. Based on screen size, or other paramaters, the Popup may not display at x and y.

We invoke the super #getPopup, not the one in the stored factory, because the popup type is set in this instance, not in the stored one.
Parameters:
  owner - Component mouse coordinates are relative to, may be null
Parameters:
  contents - Contents of the Popup
Parameters:
  x - Initial x screen coordinate
Parameters:
  y - Initial y screen coordinate Popup containing Contents
throws:
  IllegalArgumentException - if contents is null
See Also:   Options.isPopupDropShadowActive




install
public static void install()(Code)
Installs the ShadowPopupFactory as the shared popup factory on non-Mac platforms. Also stores the previously set factory, so that it can be restored in #uninstall.

In some Mac Java environments the popup factory throws a NullPointerException when we call #getPopup.

TODO: The Mac case shows that we may have problems replacing non PopupFactory instances. Therefore we should consider replacing only instances of PopupFactory.
See Also:   ShadowPopupFactory.uninstall()




uninstall
public static void uninstall()(Code)
Uninstalls the ShadowPopupFactory and restores the original popup factory as the new shared popup factory.
See Also:   ShadowPopupFactory.install()



Methods inherited from javax.swing.PopupFactory
public Popup getPopup(Component owner, Component contents, int x, int y) throws IllegalArgumentException(Code)(Java Doc)
public static PopupFactory getSharedInstance()(Code)(Java Doc)
public static void setSharedInstance(PopupFactory factory)(Code)(Java Doc)

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.