Source Code Cross Referenced for ChartLabel.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:         * A chart component to render a text box. Used to render the titles of charts, legends, axes, and series.
024:         Encapsulates all the font settings of the label so that the parent container does not experience 
025:         property bloat.
026:         * @author Joe Walker [joe at getahead dot org]
027:         * @author DRAPGEN - Dwr Reverse Ajax Proxy GENerator
028:         */
029:        public class ChartLabel extends jsx3.chart.ChartComponent {
030:            /**
031:             * All reverse ajax proxies need context to work from
032:             * @param scriptProxy The place we are writing scripts to
033:             * @param context The script that got us to where we are now
034:             */
035:            public ChartLabel(Context context, String extension,
036:                    ScriptProxy scriptProxy) {
037:                super (context, extension, scriptProxy);
038:            }
039:
040:            /**
041:             * The instance initializer.
042:             * @param name the GI name of the instance
043:             * @param text text to display in the label
044:             */
045:            public ChartLabel(String name, String text) {
046:                super ((Context) null, (String) null, (ScriptProxy) null);
047:                ScriptBuffer script = new ScriptBuffer();
048:                script.appendCall("new ChartLabel", name, text);
049:                setInitScript(script);
050:            }
051:
052:            /**
053:             * the default preferred width
054:             */
055:            public static final int DEFAULT_WIDTH = 100;
056:
057:            /**
058:             * non-rotated angle
059:             */
060:            public static final int ROTATION_NORMAL = 0;
061:
062:            /**
063:             * angle for one-quarter clockwise rotation
064:             */
065:            public static final int ROTATION_CW = 90;
066:
067:            /**
068:             * angle for one-quarter counter-clockwise rotation
069:             */
070:            public static final int ROTATION_CCW = 270;
071:
072:            /**
073:             * Returns the preferredWidth field.
074:             * @param callback preferredWidth
075:             */
076:            @SuppressWarnings("unchecked")
077:            public void getPreferredWidth(
078:                    org.directwebremoting.proxy.Callback<Integer> callback) {
079:                ScriptBuffer script = new ScriptBuffer();
080:                String callbackPrefix = "";
081:
082:                if (callback != null) {
083:                    callbackPrefix = "var reply = ";
084:                }
085:
086:                script.appendCall(callbackPrefix + getContextPath()
087:                        + "getPreferredWidth");
088:
089:                if (callback != null) {
090:                    String key = org.directwebremoting.extend.CallbackHelper
091:                            .saveCallback(callback, Integer.class);
092:                    script
093:                            .appendCall("__System.activateCallback", key,
094:                                    "reply");
095:                }
096:
097:                getScriptProxy().addScript(script);
098:            }
099:
100:            /**
101:             * Sets the preferredWidth field.
102:             * @param preferredWidth the new value for preferredWidth
103:             */
104:            public void setPreferredWidth(int preferredWidth) {
105:                ScriptBuffer script = new ScriptBuffer();
106:                script.appendCall(getContextPath() + "setPreferredWidth",
107:                        preferredWidth);
108:                getScriptProxy().addScript(script);
109:            }
110:
111:            /**
112:             * Returns the preferredHeight field.
113:             * @param callback preferredHeight
114:             */
115:            @SuppressWarnings("unchecked")
116:            public void getPreferredHeight(
117:                    org.directwebremoting.proxy.Callback<Integer> callback) {
118:                ScriptBuffer script = new ScriptBuffer();
119:                String callbackPrefix = "";
120:
121:                if (callback != null) {
122:                    callbackPrefix = "var reply = ";
123:                }
124:
125:                script.appendCall(callbackPrefix + getContextPath()
126:                        + "getPreferredHeight");
127:
128:                if (callback != null) {
129:                    String key = org.directwebremoting.extend.CallbackHelper
130:                            .saveCallback(callback, Integer.class);
131:                    script
132:                            .appendCall("__System.activateCallback", key,
133:                                    "reply");
134:                }
135:
136:                getScriptProxy().addScript(script);
137:            }
138:
139:            /**
140:             * Sets the preferredHeight field.
141:             * @param preferredHeight the new value for preferredHeight
142:             */
143:            public void setPreferredHeight(int preferredHeight) {
144:                ScriptBuffer script = new ScriptBuffer();
145:                script.appendCall(getContextPath() + "setPreferredHeight",
146:                        preferredHeight);
147:                getScriptProxy().addScript(script);
148:            }
149:
150:            /**
151:             * Returns the alpha field, the opacity of the background fill.
152:             * @param callback alpha
153:             */
154:            @SuppressWarnings("unchecked")
155:            public void getAlpha(
156:                    org.directwebremoting.proxy.Callback<Float> callback) {
157:                ScriptBuffer script = new ScriptBuffer();
158:                String callbackPrefix = "";
159:
160:                if (callback != null) {
161:                    callbackPrefix = "var reply = ";
162:                }
163:
164:                script.appendCall(callbackPrefix + getContextPath()
165:                        + "getAlpha");
166:
167:                if (callback != null) {
168:                    String key = org.directwebremoting.extend.CallbackHelper
169:                            .saveCallback(callback, Float.class);
170:                    script
171:                            .appendCall("__System.activateCallback", key,
172:                                    "reply");
173:                }
174:
175:                getScriptProxy().addScript(script);
176:            }
177:
178:            /**
179:             * Sets the alpha field.
180:             * @param alpha the new value for alpha
181:             */
182:            public void setAlpha(float alpha) {
183:                ScriptBuffer script = new ScriptBuffer();
184:                script.appendCall(getContextPath() + "setAlpha", alpha);
185:                getScriptProxy().addScript(script);
186:            }
187:
188:            /**
189:             * Returns the borderStroke field, string representation of the VectorStroke used to outline the background.
190:             * @param callback borderStroke
191:             */
192:            @SuppressWarnings("unchecked")
193:            public void getBorderStroke(
194:                    org.directwebremoting.proxy.Callback<String> callback) {
195:                ScriptBuffer script = new ScriptBuffer();
196:                String callbackPrefix = "";
197:
198:                if (callback != null) {
199:                    callbackPrefix = "var reply = ";
200:                }
201:
202:                script.appendCall(callbackPrefix + getContextPath()
203:                        + "getBorderStroke");
204:
205:                if (callback != null) {
206:                    String key = org.directwebremoting.extend.CallbackHelper
207:                            .saveCallback(callback, String.class);
208:                    script
209:                            .appendCall("__System.activateCallback", key,
210:                                    "reply");
211:                }
212:
213:                getScriptProxy().addScript(script);
214:            }
215:
216:            /**
217:             * Sets the borderStroke field.
218:             * @param borderStroke the new value for borderStroke
219:             */
220:            public void setBorderStroke(String borderStroke) {
221:                ScriptBuffer script = new ScriptBuffer();
222:                script.appendCall(getContextPath() + "setBorderStroke",
223:                        borderStroke);
224:                getScriptProxy().addScript(script);
225:            }
226:
227:            /**
228:             * Returns the labelRotation field.
229:             * @param callback labelRotation
230:             */
231:            @SuppressWarnings("unchecked")
232:            public void getLabelRotation(
233:                    org.directwebremoting.proxy.Callback<Integer> callback) {
234:                ScriptBuffer script = new ScriptBuffer();
235:                String callbackPrefix = "";
236:
237:                if (callback != null) {
238:                    callbackPrefix = "var reply = ";
239:                }
240:
241:                script.appendCall(callbackPrefix + getContextPath()
242:                        + "getLabelRotation");
243:
244:                if (callback != null) {
245:                    String key = org.directwebremoting.extend.CallbackHelper
246:                            .saveCallback(callback, Integer.class);
247:                    script
248:                            .appendCall("__System.activateCallback", key,
249:                                    "reply");
250:                }
251:
252:                getScriptProxy().addScript(script);
253:            }
254:
255:            /**
256:             * Sets the labelRotation field.
257:             * @param labelRotation the new value for labelRotation, one of {0, 90, 270}
258:             */
259:            public void setLabelRotation(int labelRotation) {
260:                ScriptBuffer script = new ScriptBuffer();
261:                script.appendCall(getContextPath() + "setLabelRotation",
262:                        labelRotation);
263:                getScriptProxy().addScript(script);
264:            }
265:
266:            /**
267:             * whether this label is display at 90 or -90 degrees
268:             */
269:            @SuppressWarnings("unchecked")
270:            public void isRotated(
271:                    org.directwebremoting.proxy.Callback<Boolean> callback) {
272:                ScriptBuffer script = new ScriptBuffer();
273:                String callbackPrefix = "";
274:
275:                if (callback != null) {
276:                    callbackPrefix = "var reply = ";
277:                }
278:
279:                script.appendCall(callbackPrefix + getContextPath()
280:                        + "isRotated");
281:
282:                if (callback != null) {
283:                    String key = org.directwebremoting.extend.CallbackHelper
284:                            .saveCallback(callback, Boolean.class);
285:                    script
286:                            .appendCall("__System.activateCallback", key,
287:                                    "reply");
288:                }
289:
290:                getScriptProxy().addScript(script);
291:            }
292:
293:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.