Source Code Cross Referenced for Shadow.java in  » Ajax » gwtext-2.01 » com » gwtext » client » widgets » 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 » Ajax » gwtext 2.01 » com.gwtext.client.widgets 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * GWT-Ext Widget Library
003:         * Copyright(c) 2007-2008, GWT-Ext.
004:         * licensing@gwt-ext.com
005:         * 
006:         * http://www.gwt-ext.com/license
007:         */
008:
009:        package com.gwtext.client.widgets;
010:
011:        import com.google.gwt.core.client.JavaScriptObject;
012:        import com.google.gwt.user.client.Element;
013:        import com.gwtext.client.util.JavaScriptObjectHelper;
014:
015:        /**
016:         * Simple class that can provide a shadow effect for any element. Note that the element MUST be absolutely positioned,
017:         * and the shadow does not provide any shimming. This should be used only in simple cases -- for more advanced functionality
018:         * that can also provide the same shadow effect, see the {@link Layer} class.
019:         *
020:         */
021:        public class Shadow extends BaseExtWidget {
022:
023:            /**
024:             * Shadow on sides (default)
025:             */
026:            public static Type SIDES = new Type("sides");
027:
028:            /**
029:             * For 4-way shadow
030:             */
031:            public static Type FRAME = new Type("frame");
032:
033:            /**
034:             * Shadow on bottom right.
035:             */
036:            public static Type DROP = new Type("drop");
037:
038:            /**
039:             * Create a new Shadow.
040:             *
041:             * @param mode  The shadow display mode. Supports the following options: sides: Shadow displays on both sides and bottom only,
042:             * frame: Shadow displays equally on all four sides, drop: Traditional bottom-right drop shadow (default)
043:             * @param offset the number of pixels to offset the shadow from the element (defaults to 4)
044:             */
045:            public Shadow(String mode, String offset) {
046:                JavaScriptObject config = JavaScriptObjectHelper.createObject();
047:                JavaScriptObjectHelper.setAttribute(config, "mode", mode);
048:                JavaScriptObjectHelper.setAttribute(config, "offset", offset);
049:                jsObj = create(config);
050:            }
051:
052:            private native JavaScriptObject create(JavaScriptObject config) /*-{
053:                   return new $wnd.Ext.Shadow(config);
054:               }-*/;
055:
056:            /**
057:             * Hides this shadow.
058:             */
059:            public native void hide() /*-{
060:                   var shadow = this.@com.gwtext.client.widgets.BaseExtWidget::jsObj;
061:                   shadow.hide();
062:               }-*/;
063:
064:            /**
065:             * Returns true if the shadow is visible, else false.
066:             *
067:             * @return true if shadow visible
068:             */
069:            public native boolean isVisible() /*-{
070:                   var shadow = this.@com.gwtext.client.widgets.BaseExtWidget::jsObj;
071:                   return shadow.isVisible();
072:               }-*/;
073:
074:            /**
075:             * Direct alignment when values are already available. {@link #show} must be called at least once before calling
076:             * this method to ensure it is initialized.
077:             * 
078:             * @param left The target element left position 
079:             * @param top The target element top position
080:             * @param width The target element width
081:             * @param height The target element height
082:             */
083:            public native void realign(int left, int top, int width, int height) /*-{
084:                   var shadow = this.@com.gwtext.client.widgets.BaseExtWidget::jsObj;
085:                   shadow.realign(left, top, width, height);
086:               }-*/;
087:
088:            /**
089:             * Adjust the z-index of this shadow.
090:             *
091:             * @param zindex The new z-index
092:             */
093:            public native void setZIndex(int zindex) /*-{
094:                   var shadow = this.@com.gwtext.client.widgets.BaseExtWidget::jsObj;
095:                   shadow.setZIndex(zindex);
096:               }-*/;
097:
098:            /**
099:             * Displays the shadow under the target element.
100:             *
101:             * @param id the element ID
102:             */
103:            public native void show(String id) /*-{
104:                   var shadow = this.@com.gwtext.client.widgets.BaseExtWidget::jsObj;
105:                   shadow.show(id);
106:               }-*/;
107:
108:            /**
109:             * Displays the shadow under the target element.
110:             *
111:             * @param element the element
112:             */
113:            public native void show(Element element) /*-{
114:                   var shadow = this.@com.gwtext.client.widgets.BaseExtWidget::jsObj;
115:                   shadow.show(element);
116:               }-*/;
117:
118:            public static class Type {
119:                private String type;
120:
121:                public Type(String type) {
122:                    this .type = type;
123:                }
124:
125:                public String getType() {
126:                    return type;
127:                }
128:            }
129:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.