Source Code Cross Referenced for TabbedPane.java in  » Ajax » dwr » jsx3 » gui » 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 » dwr » jsx3.gui 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2005 Joe Walker
003:         *
004:         * Licensed under the Apache License, Version 2.0 (the "License");
005:         * you may not use this file except in compliance with the License.
006:         * You may obtain a copy of the License at
007:         *
008:         *     http://www.apache.org/licenses/LICENSE-2.0
009:         *
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS,
012:         * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013:         * See the License for the specific language governing permissions and
014:         * limitations under the License.
015:         */
016:        package jsx3.gui;
017:
018:        import org.directwebremoting.ScriptBuffer;
019:        import org.directwebremoting.proxy.ScriptProxy;
020:        import org.directwebremoting.proxy.io.Context;
021:
022:        /**
023:         * Renders a tabbed pane, which consists of a set of tabs, only one of which is visible at a time.
024:         * @author Joe Walker [joe at getahead dot org]
025:         * @author DRAPGEN - Dwr Reverse Ajax Proxy GENerator
026:         */
027:        public class TabbedPane extends jsx3.gui.Block {
028:            /**
029:             * All reverse ajax proxies need context to work from
030:             * @param scriptProxy The place we are writing scripts to
031:             * @param context The script that got us to where we are now
032:             */
033:            public TabbedPane(Context context, String extension,
034:                    ScriptProxy scriptProxy) {
035:                super (context, extension, scriptProxy);
036:            }
037:
038:            /**
039:             * instance initializer
040:             * @param strName unique name distinguishing this object from all other JSX GUI objects in the JSX application
041:             */
042:            public TabbedPane(String strName) {
043:                super ((Context) null, (String) null, (ScriptProxy) null);
044:                ScriptBuffer script = new ScriptBuffer();
045:                script.appendCall("new TabbedPane", strName);
046:                setInitScript(script);
047:            }
048:
049:            /**
050:             * 50
051:             */
052:            public static final int AUTO_SCROLL_INTERVAL = 50;
053:
054:            /**
055:             * jsx:///images/tab/l.png
056:             */
057:            public static final String LSCROLLER = null;
058:
059:            /**
060:             * jsx:///images/tab/r.png
061:             */
062:            public static final String RSCROLLER = null;
063:
064:            /**
065:             * 20 (default)
066:             */
067:            public static final int DEFAULTTABHEIGHT = 20;
068:
069:            /**
070:             * Returns the zero-based child index of the active child tab.
071:             */
072:            @SuppressWarnings("unchecked")
073:            public void getSelectedIndex(
074:                    org.directwebremoting.proxy.Callback<Integer> callback) {
075:                ScriptBuffer script = new ScriptBuffer();
076:                String callbackPrefix = "";
077:
078:                if (callback != null) {
079:                    callbackPrefix = "var reply = ";
080:                }
081:
082:                script.appendCall(callbackPrefix + getContextPath()
083:                        + "getSelectedIndex");
084:
085:                if (callback != null) {
086:                    String key = org.directwebremoting.extend.CallbackHelper
087:                            .saveCallback(callback, Integer.class);
088:                    script
089:                            .appendCall("__System.activateCallback", key,
090:                                    "reply");
091:                }
092:
093:                getScriptProxy().addScript(script);
094:            }
095:
096:            /**
097:             * Sets the active tab of this tabbed pane. Pass either the zero-based child index of the tab to activate or
098:            the tab itself.
099:             * @param intIndex 
100:             * @param bRepaint if <code>true</code>, immediately updates the view to reflect the new active tab.
101:             * @return this object.
102:             */
103:            public jsx3.gui.TabbedPane setSelectedIndex(jsx3.gui.Tab intIndex,
104:                    boolean bRepaint) {
105:                ScriptBuffer script = new ScriptBuffer();
106:                script.appendCall(getContextPath() + "setSelectedIndex",
107:                        intIndex, bRepaint);
108:                getScriptProxy().addScript(script);
109:                return this ;
110:            }
111:
112:            /**
113:             * Sets the active tab of this tabbed pane. Pass either the zero-based child index of the tab to activate or
114:            the tab itself.
115:             * @param intIndex 
116:             * @param bRepaint if <code>true</code>, immediately updates the view to reflect the new active tab.
117:             * @return this object.
118:             */
119:            public jsx3.gui.TabbedPane setSelectedIndex(int intIndex,
120:                    boolean bRepaint) {
121:                ScriptBuffer script = new ScriptBuffer();
122:                script.appendCall(getContextPath() + "setSelectedIndex",
123:                        intIndex, bRepaint);
124:                getScriptProxy().addScript(script);
125:                return this ;
126:            }
127:
128:            /**
129:             * Returns the CSS height property (in pixels) for child tabs
130:             * @param callback height (in pixels)
131:             */
132:            @SuppressWarnings("unchecked")
133:            public void getTabHeight(
134:                    org.directwebremoting.proxy.Callback<Integer> callback) {
135:                ScriptBuffer script = new ScriptBuffer();
136:                String callbackPrefix = "";
137:
138:                if (callback != null) {
139:                    callbackPrefix = "var reply = ";
140:                }
141:
142:                script.appendCall(callbackPrefix + getContextPath()
143:                        + "getTabHeight");
144:
145:                if (callback != null) {
146:                    String key = org.directwebremoting.extend.CallbackHelper
147:                            .saveCallback(callback, Integer.class);
148:                    script
149:                            .appendCall("__System.activateCallback", key,
150:                                    "reply");
151:                }
152:
153:                getScriptProxy().addScript(script);
154:            }
155:
156:            /**
157:             * Sets the CSS height property for the object (in pixels) for child tabs;
158:                   returns reference to self to facilitate method chaining
159:             * @param intTabHeight height (in pixels)
160:             * @return this object
161:             */
162:            public jsx3.gui.TabbedPane setTabHeight(int intTabHeight) {
163:                ScriptBuffer script = new ScriptBuffer();
164:                script.appendCall(getContextPath() + "setTabHeight",
165:                        intTabHeight);
166:                getScriptProxy().addScript(script);
167:                return this ;
168:            }
169:
170:            /**
171:             * whether or not to show the tabs of the tabbed pane. if false then only the content of each tab is drawn.
172:             */
173:            public void getShowTabs() {
174:                ScriptBuffer script = new ScriptBuffer();
175:                script.appendCall(getContextPath() + "getShowTabs");
176:                getScriptProxy().addScript(script);
177:            }
178:
179:            /**
180:             * whether or not to show the tabs of the tabbed pane. if false then only the content of each tab is drawn.
181:             * @param intShowTabs 
182:             */
183:            public void setShowTabs(int intShowTabs) {
184:                ScriptBuffer script = new ScriptBuffer();
185:                script
186:                        .appendCall(getContextPath() + "setShowTabs",
187:                                intShowTabs);
188:                getScriptProxy().addScript(script);
189:            }
190:
191:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.