Source Code Cross Referenced for CategoryAxis.java in  » Ajax » dwr » jsx3 » chart » 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.chart 
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.chart;
017:
018:        import org.directwebremoting.ScriptBuffer;
019:        import org.directwebremoting.proxy.ScriptProxy;
020:        import org.directwebremoting.proxy.io.Context;
021:
022:        /**
023:         * Axis type that displays a set of discrete values (categories). Usually a category corresponds to a 
024:         record in the chart's data provider.
025:         * @author Joe Walker [joe at getahead dot org]
026:         * @author DRAPGEN - Dwr Reverse Ajax Proxy GENerator
027:         */
028:        public class CategoryAxis extends jsx3.chart.Axis {
029:            /**
030:             * All reverse ajax proxies need context to work from
031:             * @param scriptProxy The place we are writing scripts to
032:             * @param context The script that got us to where we are now
033:             */
034:            public CategoryAxis(Context context, String extension,
035:                    ScriptProxy scriptProxy) {
036:                super (context, extension, scriptProxy);
037:            }
038:
039:            /**
040:             * The instance initializer.
041:             * @param name the GI name of the instance
042:             * @param horizontal whether this axis is horizontal (x), otherwise it's vertical (y)
043:             * @param primary whether this axis is primary, otherwise it's secondary
044:             */
045:            public CategoryAxis(String name, boolean horizontal, boolean primary) {
046:                super ((Context) null, (String) null, (ScriptProxy) null);
047:                ScriptBuffer script = new ScriptBuffer();
048:                script
049:                        .appendCall("new CategoryAxis", name, horizontal,
050:                                primary);
051:                setInitScript(script);
052:            }
053:
054:            /**
055:             * 
056:             */
057:            public static final String TICKS_ALIGNED = "aligned";
058:
059:            /**
060:             * 
061:             */
062:            public static final String TICKS_BETWEEN = "between";
063:
064:            /**
065:             * Returns the tickAlignment field, if 'between' then the midpoint of the category is between two major ticks, otherwise if 'aligned' then the midpoint of the category is aligned with a major tick.
066:             * @param callback tickAlignment, one of {'aligned','between'}
067:             */
068:            @SuppressWarnings("unchecked")
069:            public void getTickAlignment(
070:                    org.directwebremoting.proxy.Callback<String> callback) {
071:                ScriptBuffer script = new ScriptBuffer();
072:                String callbackPrefix = "";
073:
074:                if (callback != null) {
075:                    callbackPrefix = "var reply = ";
076:                }
077:
078:                script.appendCall(callbackPrefix + getContextPath()
079:                        + "getTickAlignment");
080:
081:                if (callback != null) {
082:                    String key = org.directwebremoting.extend.CallbackHelper
083:                            .saveCallback(callback, String.class);
084:                    script
085:                            .appendCall("__System.activateCallback", key,
086:                                    "reply");
087:                }
088:
089:                getScriptProxy().addScript(script);
090:            }
091:
092:            /**
093:             * Sets the tickAlignment field.
094:             * @param tickAlignment the new value for tickAlignment, one of {'aligned','between'}
095:             */
096:            public void setTickAlignment(String tickAlignment) {
097:                ScriptBuffer script = new ScriptBuffer();
098:                script.appendCall(getContextPath() + "setTickAlignment",
099:                        tickAlignment);
100:                getScriptProxy().addScript(script);
101:            }
102:
103:            /**
104:             * Returns the categoryField field, the attribute of records from the data provider that contains the category name (this value can still be transformed by Axis's 'labelFunction' field).
105:             * @param callback categoryField
106:             */
107:            @SuppressWarnings("unchecked")
108:            public void getCategoryField(
109:                    org.directwebremoting.proxy.Callback<String> callback) {
110:                ScriptBuffer script = new ScriptBuffer();
111:                String callbackPrefix = "";
112:
113:                if (callback != null) {
114:                    callbackPrefix = "var reply = ";
115:                }
116:
117:                script.appendCall(callbackPrefix + getContextPath()
118:                        + "getCategoryField");
119:
120:                if (callback != null) {
121:                    String key = org.directwebremoting.extend.CallbackHelper
122:                            .saveCallback(callback, String.class);
123:                    script
124:                            .appendCall("__System.activateCallback", key,
125:                                    "reply");
126:                }
127:
128:                getScriptProxy().addScript(script);
129:            }
130:
131:            /**
132:             * Sets the categoryField field.
133:             * @param categoryField the new value for categoryField
134:             */
135:            public void setCategoryField(String categoryField) {
136:                ScriptBuffer script = new ScriptBuffer();
137:                script.appendCall(getContextPath() + "setCategoryField",
138:                        categoryField);
139:                getScriptProxy().addScript(script);
140:            }
141:
142:            /**
143:             * Returns the paddingLow field, the number of category widths to pad the beginning of the axis with.
144:             * @param callback paddingLow
145:             */
146:            @SuppressWarnings("unchecked")
147:            public void getPaddingLow(
148:                    org.directwebremoting.proxy.Callback<Float> callback) {
149:                ScriptBuffer script = new ScriptBuffer();
150:                String callbackPrefix = "";
151:
152:                if (callback != null) {
153:                    callbackPrefix = "var reply = ";
154:                }
155:
156:                script.appendCall(callbackPrefix + getContextPath()
157:                        + "getPaddingLow");
158:
159:                if (callback != null) {
160:                    String key = org.directwebremoting.extend.CallbackHelper
161:                            .saveCallback(callback, Float.class);
162:                    script
163:                            .appendCall("__System.activateCallback", key,
164:                                    "reply");
165:                }
166:
167:                getScriptProxy().addScript(script);
168:            }
169:
170:            /**
171:             * Sets the paddingLow field.
172:             * @param paddingLow the new value for paddingLow
173:             */
174:            public void setPaddingLow(float paddingLow) {
175:                ScriptBuffer script = new ScriptBuffer();
176:                script.appendCall(getContextPath() + "setPaddingLow",
177:                        paddingLow);
178:                getScriptProxy().addScript(script);
179:            }
180:
181:            /**
182:             * Returns the paddingHigh field, the number of category widths to pad the end of the axis with.
183:             * @param callback paddingHigh
184:             */
185:            @SuppressWarnings("unchecked")
186:            public void getPaddingHigh(
187:                    org.directwebremoting.proxy.Callback<Float> callback) {
188:                ScriptBuffer script = new ScriptBuffer();
189:                String callbackPrefix = "";
190:
191:                if (callback != null) {
192:                    callbackPrefix = "var reply = ";
193:                }
194:
195:                script.appendCall(callbackPrefix + getContextPath()
196:                        + "getPaddingHigh");
197:
198:                if (callback != null) {
199:                    String key = org.directwebremoting.extend.CallbackHelper
200:                            .saveCallback(callback, Float.class);
201:                    script
202:                            .appendCall("__System.activateCallback", key,
203:                                    "reply");
204:                }
205:
206:                getScriptProxy().addScript(script);
207:            }
208:
209:            /**
210:             * Sets the paddingHigh field.
211:             * @param paddingHigh the new value for paddingHigh
212:             */
213:            public void setPaddingHigh(float paddingHigh) {
214:                ScriptBuffer script = new ScriptBuffer();
215:                script.appendCall(getContextPath() + "setPaddingHigh",
216:                        paddingHigh);
217:                getScriptProxy().addScript(script);
218:            }
219:
220:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.