Source Code Cross Referenced for ResizableConfig.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.gwtext.client.animation.Easing;
012:        import com.gwtext.client.core.BaseConfig;
013:        import com.gwtext.client.util.JavaScriptObjectHelper;
014:
015:        /**
016:         * Configuration class for {@link com.gwtext.client.widgets.Resizable}.
017:         */
018:        public class ResizableConfig extends BaseConfig {
019:
020:            /**
021:             * Sets the adjustments to "auto".
022:             */
023:            public void setAutoAdjustments() {
024:                JavaScriptObjectHelper.setAttribute(jsObj, "adjustments",
025:                        "auto");
026:            }
027:
028:            /**
029:             * The width, height adjustments to be added to the resize operation's new size. Defaults to 0, 0
030:             *
031:             * @param widthAdjustment  the width adjustment
032:             * @param heightAdjustment the height adjustent
033:             */
034:            public void setAdjustments(int widthAdjustment, int heightAdjustment) {
035:                int[] adjustments = new int[] { widthAdjustment,
036:                        heightAdjustment };
037:                JavaScriptObjectHelper.setAttribute(jsObj, "adjustments",
038:                        adjustments);
039:            }
040:
041:            /**
042:             * True to animate the resize (not compatible with dynamic sizing, defaults to false).
043:             *
044:             * @param animate true to anumate resize
045:             */
046:            public void setAnimate(boolean animate) {
047:                JavaScriptObjectHelper.setAttribute(jsObj, "animate", animate);
048:            }
049:
050:            /**
051:             * True to disable mouse tracking. This is only applied at config time. (defaults to false).
052:             *
053:             * @param disableTrackOver true to disable mouse tracking
054:             */
055:            public void setDisableTrackOver(boolean disableTrackOver) {
056:                JavaScriptObjectHelper.setAttribute(jsObj, "disableTrackOver",
057:                        disableTrackOver);
058:            }
059:
060:            /**
061:             * Convenience to initialize drag drop (defaults to false).
062:             *
063:             * @param draggable true to initialize drag and drop
064:             */
065:            public void setDraggable(boolean draggable) {
066:                JavaScriptObjectHelper.setAttribute(jsObj, "draggable",
067:                        draggable);
068:            }
069:
070:            /**
071:             * Animation duration if animate = true (defaults to .35).
072:             *
073:             * @param duration the animation duration
074:             */
075:            public void setDuration(float duration) {
076:                JavaScriptObjectHelper
077:                        .setAttribute(jsObj, "duration", duration);
078:            }
079:
080:            /**
081:             * True to resize the element while dragging instead of using a proxy (defaults to false).
082:             *
083:             * @param dynamic true to resize element and not proxy during dragging
084:             */
085:            public void setDynamic(boolean dynamic) {
086:                JavaScriptObjectHelper.setAttribute(jsObj, "dynamic", dynamic);
087:            }
088:
089:            /**
090:             * Animation easieng if animate = true. Defaults to {@link Easing#EASE_OUT_STRONG}
091:             *
092:             * @param easing the easing method
093:             */
094:            public void setEasing(Easing easing) {
095:                JavaScriptObjectHelper.setAttribute(jsObj, "easing", easing
096:                        .getMethod());
097:            }
098:
099:            /**
100:             * False to disable resizing (defaults to true).
101:             *
102:             * @param enabled false to disable resizing
103:             */
104:            public void setEnabled(boolean enabled) {
105:                JavaScriptObjectHelper.setAttribute(jsObj, "enabled", enabled);
106:            }
107:
108:            /**
109:             * The resize handles to display (defaults to none)
110:             *
111:             * @param handles the resize handles to display
112:             */
113:            public void setHandles(Resizable.Handle handles) {
114:                JavaScriptObjectHelper.setAttribute(jsObj, "handles", handles
115:                        .getHandle());
116:            }
117:
118:            /**
119:             * The height of the element in pixels (defaults to null).
120:             *
121:             * @param height the element height
122:             */
123:            public void setHeight(int height) {
124:                JavaScriptObjectHelper.setAttribute(jsObj, "height", height);
125:            }
126:
127:            /**
128:             * The increment to snap the height resize in pixels (dynamic must be true, defaults to 0).
129:             *
130:             * @param heightIncrement the height increment
131:             */
132:            public void setHeightIncrement(int heightIncrement) {
133:                JavaScriptObjectHelper.setAttribute(jsObj, "heightIncrement",
134:                        heightIncrement);
135:            }
136:
137:            /**
138:             * The maximum height for the element (defaults to 10000).
139:             *
140:             * @param maxHeight the max height of element
141:             */
142:            public void setMaxHeight(int maxHeight) {
143:                JavaScriptObjectHelper.setAttribute(jsObj, "maxHeight",
144:                        maxHeight);
145:            }
146:
147:            /**
148:             * The maximum width for the element (defaults to 10000).
149:             *
150:             * @param maxWidth the max width
151:             */
152:            public void setMaxWidth(int maxWidth) {
153:                JavaScriptObjectHelper
154:                        .setAttribute(jsObj, "maxWidth", maxWidth);
155:            }
156:
157:            /**
158:             * The minimum height for the element (defaults to 5).
159:             *
160:             * @param minHeight the min height
161:             */
162:            public void setMinHeight(int minHeight) {
163:                JavaScriptObjectHelper.setAttribute(jsObj, "minHeight",
164:                        minHeight);
165:            }
166:
167:            /**
168:             * The minimum width for the element (defaults to 5).
169:             *
170:             * @param minWidth the min width
171:             */
172:            public void setMinWidth(int minWidth) {
173:                JavaScriptObjectHelper
174:                        .setAttribute(jsObj, "minWidth", minWidth);
175:            }
176:
177:            /**
178:             * The minimum allowed page X for the element (only used for west resizing, defaults to 0).
179:             *
180:             * @param minX the min x value
181:             */
182:            public void setMinX(int minX) {
183:                JavaScriptObjectHelper.setAttribute(jsObj, "minX", minX);
184:            }
185:
186:            /**
187:             * The minimum allowed page Y for the element (only used for north resizing, defaults to 0).
188:             *
189:             * @param minY the min Y value
190:             */
191:            public void setMinY(int minY) {
192:                JavaScriptObjectHelper.setAttribute(jsObj, "minY", minY);
193:            }
194:
195:            /**
196:             * True to ensure that the resize handles are always visible, false to display them only when the user mouses over
197:             * the resizable borders. This is only applied at config time. (defaults to false)
198:             *
199:             * @param pinned true to ensure that the resize handles are always visible
200:             */
201:            public void setPinned(boolean pinned) {
202:                JavaScriptObjectHelper.setAttribute(jsObj, "pinned", pinned);
203:            }
204:
205:            /**
206:             * True to preserve the original ratio between height and width during resize (defaults to false).
207:             *
208:             * @param preserveRatio true to preserve ratio
209:             */
210:            public void setPreserveRatio(boolean preserveRatio) {
211:                JavaScriptObjectHelper.setAttribute(jsObj, "preserveRatio",
212:                        preserveRatio);
213:            }
214:
215:            /**
216:             * True to resize the first child, or id/element to resize (defaults to false).
217:             *
218:             * @param resizeChild true to resize the first child
219:             */
220:            public void setResizeChild(boolean resizeChild) {
221:                JavaScriptObjectHelper.setAttribute(jsObj, "resizeChild",
222:                        resizeChild);
223:            }
224:
225:            /**
226:             * True for transparent handles. This is only applied at config time. (defaults to false).
227:             *
228:             * @param transparent true for transparent handles
229:             */
230:            public void setTransparent(boolean transparent) {
231:                JavaScriptObjectHelper.setAttribute(jsObj, "transparent",
232:                        transparent);
233:            }
234:
235:            /**
236:             * The width of the element in pixels (defaults to null).
237:             *
238:             * @param width the width of element
239:             */
240:            public void setWidth(int width) {
241:                JavaScriptObjectHelper.setAttribute(jsObj, "width", width);
242:            }
243:
244:            /**
245:             * The increment to snap the width resize in pixels (dynamic must be true, defaults to 0).
246:             *
247:             * @param widthIncrement the width increment
248:             */
249:            public void setWidthIncrement(boolean widthIncrement) {
250:                JavaScriptObjectHelper.setAttribute(jsObj, "widthIncrement",
251:                        widthIncrement);
252:            }
253:
254:            /**
255:             * True to wrap an element with a div if needed (required for textareas and images, defaults to false).
256:             *
257:             * @param wrap true to wrap element in a div if needed
258:             */
259:            public void setWrap(boolean wrap) {
260:                JavaScriptObjectHelper.setAttribute(jsObj, "wrap", wrap);
261:            }
262:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.