Source Code Cross Referenced for TextLine.java in  » Ajax » dwr » jsx3 » vector » 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.vector 
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.vector;
017:
018:        import org.directwebremoting.ScriptBuffer;
019:        import org.directwebremoting.proxy.ScriptProxy;
020:        import org.directwebremoting.proxy.io.Context;
021:
022:        /**
023:         * Renders text along an arbitrary line.
024:         * @author Joe Walker [joe at getahead dot org]
025:         * @author DRAPGEN - Dwr Reverse Ajax Proxy GENerator
026:         */
027:        public class TextLine extends jsx3.vector.Shape {
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 TextLine(Context context, String extension,
034:                    ScriptProxy scriptProxy) {
035:                super (context, extension, scriptProxy);
036:            }
037:
038:            /**
039:             * The instance initializer.
040:             * @param x1 
041:             * @param y1 
042:             * @param x2 
043:             * @param y2 
044:             * @param text the text to display on the text path
045:             */
046:            public TextLine(int x1, int y1, int x2, int y2, String text) {
047:                super ((Context) null, (String) null, (ScriptProxy) null);
048:                ScriptBuffer script = new ScriptBuffer();
049:                script.appendCall("new TextLine", x1, y1, x2, y2, text);
050:                setInitScript(script);
051:            }
052:
053:            /**
054:             * Returns the text field.
055:             * @param callback text
056:             */
057:            @SuppressWarnings("unchecked")
058:            public void getText(
059:                    org.directwebremoting.proxy.Callback<String> callback) {
060:                ScriptBuffer script = new ScriptBuffer();
061:                String callbackPrefix = "";
062:
063:                if (callback != null) {
064:                    callbackPrefix = "var reply = ";
065:                }
066:
067:                script
068:                        .appendCall(callbackPrefix + getContextPath()
069:                                + "getText");
070:
071:                if (callback != null) {
072:                    String key = org.directwebremoting.extend.CallbackHelper
073:                            .saveCallback(callback, String.class);
074:                    script
075:                            .appendCall("__System.activateCallback", key,
076:                                    "reply");
077:                }
078:
079:                getScriptProxy().addScript(script);
080:            }
081:
082:            /**
083:             * Sets the text field, the text to display on the text path.
084:             * @param text the new value for text
085:             */
086:            public void setText(String text) {
087:                ScriptBuffer script = new ScriptBuffer();
088:                script.appendCall(getContextPath() + "setText", text);
089:                getScriptProxy().addScript(script);
090:            }
091:
092:            /**
093:             * Returns the color field.
094:             * @param callback color
095:             */
096:            @SuppressWarnings("unchecked")
097:            public void getColor(
098:                    org.directwebremoting.proxy.Callback<String> callback) {
099:                ScriptBuffer script = new ScriptBuffer();
100:                String callbackPrefix = "";
101:
102:                if (callback != null) {
103:                    callbackPrefix = "var reply = ";
104:                }
105:
106:                script.appendCall(callbackPrefix + getContextPath()
107:                        + "getColor");
108:
109:                if (callback != null) {
110:                    String key = org.directwebremoting.extend.CallbackHelper
111:                            .saveCallback(callback, String.class);
112:                    script
113:                            .appendCall("__System.activateCallback", key,
114:                                    "reply");
115:                }
116:
117:                getScriptProxy().addScript(script);
118:            }
119:
120:            /**
121:             * Returns the fontFamily field.
122:             * @param callback fontFamily
123:             */
124:            @SuppressWarnings("unchecked")
125:            public void getFontFamily(
126:                    org.directwebremoting.proxy.Callback<String> callback) {
127:                ScriptBuffer script = new ScriptBuffer();
128:                String callbackPrefix = "";
129:
130:                if (callback != null) {
131:                    callbackPrefix = "var reply = ";
132:                }
133:
134:                script.appendCall(callbackPrefix + getContextPath()
135:                        + "getFontFamily");
136:
137:                if (callback != null) {
138:                    String key = org.directwebremoting.extend.CallbackHelper
139:                            .saveCallback(callback, String.class);
140:                    script
141:                            .appendCall("__System.activateCallback", key,
142:                                    "reply");
143:                }
144:
145:                getScriptProxy().addScript(script);
146:            }
147:
148:            /**
149:             * Returns the fontsize field.
150:             * @param callback fontsize
151:             */
152:            @SuppressWarnings("unchecked")
153:            public void getFontSize(
154:                    org.directwebremoting.proxy.Callback<String> callback) {
155:                ScriptBuffer script = new ScriptBuffer();
156:                String callbackPrefix = "";
157:
158:                if (callback != null) {
159:                    callbackPrefix = "var reply = ";
160:                }
161:
162:                script.appendCall(callbackPrefix + getContextPath()
163:                        + "getFontSize");
164:
165:                if (callback != null) {
166:                    String key = org.directwebremoting.extend.CallbackHelper
167:                            .saveCallback(callback, String.class);
168:                    script
169:                            .appendCall("__System.activateCallback", key,
170:                                    "reply");
171:                }
172:
173:                getScriptProxy().addScript(script);
174:            }
175:
176:            /**
177:             * Returns the fontStyle field.
178:             * @param callback fontStyle
179:             */
180:            @SuppressWarnings("unchecked")
181:            public void getFontStyle(
182:                    org.directwebremoting.proxy.Callback<String> callback) {
183:                ScriptBuffer script = new ScriptBuffer();
184:                String callbackPrefix = "";
185:
186:                if (callback != null) {
187:                    callbackPrefix = "var reply = ";
188:                }
189:
190:                script.appendCall(callbackPrefix + getContextPath()
191:                        + "getFontStyle");
192:
193:                if (callback != null) {
194:                    String key = org.directwebremoting.extend.CallbackHelper
195:                            .saveCallback(callback, String.class);
196:                    script
197:                            .appendCall("__System.activateCallback", key,
198:                                    "reply");
199:                }
200:
201:                getScriptProxy().addScript(script);
202:            }
203:
204:            /**
205:             * Returns the fontWeight field.
206:             * @param callback fontWeight
207:             */
208:            @SuppressWarnings("unchecked")
209:            public void getFontWeight(
210:                    org.directwebremoting.proxy.Callback<String> callback) {
211:                ScriptBuffer script = new ScriptBuffer();
212:                String callbackPrefix = "";
213:
214:                if (callback != null) {
215:                    callbackPrefix = "var reply = ";
216:                }
217:
218:                script.appendCall(callbackPrefix + getContextPath()
219:                        + "getFontWeight");
220:
221:                if (callback != null) {
222:                    String key = org.directwebremoting.extend.CallbackHelper
223:                            .saveCallback(callback, String.class);
224:                    script
225:                            .appendCall("__System.activateCallback", key,
226:                                    "reply");
227:                }
228:
229:                getScriptProxy().addScript(script);
230:            }
231:
232:            /**
233:             * Returns the textAlign field.
234:             * @param callback textAlign
235:             */
236:            @SuppressWarnings("unchecked")
237:            public void getTextAlign(
238:                    org.directwebremoting.proxy.Callback<String> callback) {
239:                ScriptBuffer script = new ScriptBuffer();
240:                String callbackPrefix = "";
241:
242:                if (callback != null) {
243:                    callbackPrefix = "var reply = ";
244:                }
245:
246:                script.appendCall(callbackPrefix + getContextPath()
247:                        + "getTextAlign");
248:
249:                if (callback != null) {
250:                    String key = org.directwebremoting.extend.CallbackHelper
251:                            .saveCallback(callback, String.class);
252:                    script
253:                            .appendCall("__System.activateCallback", key,
254:                                    "reply");
255:                }
256:
257:                getScriptProxy().addScript(script);
258:            }
259:
260:            /**
261:             * Returns the textDecoration field.
262:             * @param callback textDecoration
263:             */
264:            @SuppressWarnings("unchecked")
265:            public void getTextDecoration(
266:                    org.directwebremoting.proxy.Callback<String> callback) {
267:                ScriptBuffer script = new ScriptBuffer();
268:                String callbackPrefix = "";
269:
270:                if (callback != null) {
271:                    callbackPrefix = "var reply = ";
272:                }
273:
274:                script.appendCall(callbackPrefix + getContextPath()
275:                        + "getTextDecoration");
276:
277:                if (callback != null) {
278:                    String key = org.directwebremoting.extend.CallbackHelper
279:                            .saveCallback(callback, String.class);
280:                    script
281:                            .appendCall("__System.activateCallback", key,
282:                                    "reply");
283:                }
284:
285:                getScriptProxy().addScript(script);
286:            }
287:
288:            /**
289:             * Sets the color field.
290:             * @param color the new value for color
291:             */
292:            public void setColor(String color) {
293:                ScriptBuffer script = new ScriptBuffer();
294:                script.appendCall(getContextPath() + "setColor", color);
295:                getScriptProxy().addScript(script);
296:            }
297:
298:            /**
299:             * Sets the fontFamily field.
300:             * @param fontFamily the new value for fontFamily
301:             */
302:            public void setFontFamily(String fontFamily) {
303:                ScriptBuffer script = new ScriptBuffer();
304:                script.appendCall(getContextPath() + "setFontFamily",
305:                        fontFamily);
306:                getScriptProxy().addScript(script);
307:            }
308:
309:            /**
310:             * Sets the fontsize field.
311:             * @param fontSize the new value for fontsize
312:             */
313:            public void setFontSize(String fontSize) {
314:                ScriptBuffer script = new ScriptBuffer();
315:                script.appendCall(getContextPath() + "setFontSize", fontSize);
316:                getScriptProxy().addScript(script);
317:            }
318:
319:            /**
320:             * Sets the fontsize field.
321:             * @param fontSize the new value for fontsize
322:             */
323:            public void setFontSize(int fontSize) {
324:                ScriptBuffer script = new ScriptBuffer();
325:                script.appendCall(getContextPath() + "setFontSize", fontSize);
326:                getScriptProxy().addScript(script);
327:            }
328:
329:            /**
330:             * Sets the fontStyle field.
331:             * @param fontStyle the new value for fontStyle
332:             */
333:            public void setFontStyle(String fontStyle) {
334:                ScriptBuffer script = new ScriptBuffer();
335:                script.appendCall(getContextPath() + "setFontStyle", fontStyle);
336:                getScriptProxy().addScript(script);
337:            }
338:
339:            /**
340:             * Sets the fontWeight field.
341:             * @param fontWeight the new value for fontWeight
342:             */
343:            public void setFontWeight(String fontWeight) {
344:                ScriptBuffer script = new ScriptBuffer();
345:                script.appendCall(getContextPath() + "setFontWeight",
346:                        fontWeight);
347:                getScriptProxy().addScript(script);
348:            }
349:
350:            /**
351:             * Sets the textAlign field.
352:             * @param textAlign the new value for textAlign
353:             */
354:            public void setTextAlign(String textAlign) {
355:                ScriptBuffer script = new ScriptBuffer();
356:                script.appendCall(getContextPath() + "setTextAlign", textAlign);
357:                getScriptProxy().addScript(script);
358:            }
359:
360:            /**
361:             * Sets the textDecoration field.
362:             * @param textDecoration the new value for textDecoration
363:             */
364:            public void setTextDecoration(String textDecoration) {
365:                ScriptBuffer script = new ScriptBuffer();
366:                script.appendCall(getContextPath() + "setTextDecoration",
367:                        textDecoration);
368:                getScriptProxy().addScript(script);
369:            }
370:
371:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.