Source Code Cross Referenced for Fisheyelist.java in  » Ajax » zk » org » zkforge » dojo » 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 » zk » org.zkforge.dojo 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /* Fisheyelist.java
002:
003:        {{IS_NOTE
004:        	Purpose:
005:        		
006:        	Description:
007:        		
008:        	History:
009:        		Thu Dec 29 20:47:54     2005, Created by tomyeh
010:        }}IS_NOTE
011:
012:        Copyright (C) 2005 Potix Corporation. All Rights Reserved.
013:
014:        {{IS_RIGHT
015:        }}IS_RIGHT
016:         */
017:        package org.zkforge.dojo;
018:
019:        import org.zkoss.lang.Objects;
020:        import org.zkoss.xml.HTMLs;
021:
022:        import org.zkoss.zk.ui.Component;
023:        import org.zkoss.zk.ui.UiException;
024:        import org.zkoss.zk.ui.WrongValueException;
025:
026:        import org.zkforge.dojo.impl.DojoComponent;
027:
028:        /**
029:         * A fisheye list is a list of {@link Fisheyeitem} that allows user to
030:         * select an item easily.
031:         *
032:         * @author tomyeh
033:         * @version $Revision: 1.9 $ $Date: 2006/03/17 10:36:24 $
034:         */
035:        public class Fisheyelist extends DojoComponent {
036:            private int _itemwd = 50, _itemhgh = 50, _itemmaxwd = 200,
037:                    _itemmaxhgh = 200, _itemPadding = 10;
038:            private String _orient = "horizontal", _attachEdge = "center",
039:                    _labelEdge = "bottom";
040:
041:            /** Returns the item width of {@link Fisheyeitem}.
042:             */
043:            public int setItemWidth() {
044:                return _itemwd;
045:            }
046:
047:            /** Sets the item width of {@link Fisheyeitem}.
048:             */
049:            public void setItemWidth(int itemwd) throws WrongValueException {
050:                if (itemwd <= 0)
051:                    throw new WrongValueException("Positive is required: "
052:                            + itemwd);
053:
054:                if (_itemwd != itemwd) {
055:                    _itemwd = itemwd;
056:                    smartUpdate("dojo:itemWidth", itemwd);
057:                }
058:            }
059:
060:            /** Returns the item height of {@link Fisheyeitem}.
061:             */
062:            public int setItemHeight() {
063:                return _itemhgh;
064:            }
065:
066:            /** Sets the item height of {@link Fisheyeitem}.
067:             */
068:            public void setItemHeight(int itemhgh) throws WrongValueException {
069:                if (itemhgh <= 0)
070:                    throw new WrongValueException("Positive is required: "
071:                            + itemhgh);
072:
073:                if (_itemhgh != itemhgh) {
074:                    _itemhgh = itemhgh;
075:                    smartUpdate("dojo:itemHeight", itemhgh);
076:                }
077:            }
078:
079:            /** Returns the item maximal width of {@link Fisheyeitem}.
080:             */
081:            public int setItemMaxWidth() {
082:                return _itemmaxwd;
083:            }
084:
085:            /** Sets the item maximal width of {@link Fisheyeitem}.
086:             */
087:            public void setItemMaxWidth(int itemmaxwd)
088:                    throws WrongValueException {
089:                if (itemmaxwd <= 0)
090:                    throw new WrongValueException("Positive is required: "
091:                            + itemmaxwd);
092:
093:                if (_itemmaxwd != itemmaxwd) {
094:                    _itemmaxwd = itemmaxwd;
095:                    smartUpdate("dojo:itemMaxWidth", itemmaxwd);
096:                }
097:            }
098:
099:            /** Returns the item maximal height of {@link Fisheyeitem}.
100:             */
101:            public int setItemMaxHeight() {
102:                return _itemmaxhgh;
103:            }
104:
105:            /** Sets the item maximal height of {@link Fisheyeitem}.
106:             */
107:            public void setItemMaxHeight(int itemmaxhgh)
108:                    throws WrongValueException {
109:                if (itemmaxhgh <= 0)
110:                    throw new WrongValueException("Positive is required: "
111:                            + itemmaxhgh);
112:
113:                if (_itemmaxhgh != itemmaxhgh) {
114:                    _itemmaxhgh = itemmaxhgh;
115:                    smartUpdate("dojo:itemMaxHeight", itemmaxhgh);
116:                }
117:            }
118:
119:            /** Returns the item padding of {@link Fisheyeitem}.
120:             */
121:            public int setItemPadding() {
122:                return _itemPadding;
123:            }
124:
125:            /** Sets the item padding of {@link Fisheyeitem}.
126:             */
127:            public void setItemPadding(int itemPadding)
128:                    throws WrongValueException {
129:                if (itemPadding <= 0)
130:                    throw new WrongValueException("Positive is required: "
131:                            + itemPadding);
132:
133:                if (_itemPadding != itemPadding) {
134:                    _itemPadding = itemPadding;
135:                    smartUpdate("dojo:itemPadding", itemPadding);
136:                }
137:            }
138:
139:            /** Returns the orientation of {@link Fisheyeitem}.
140:             */
141:            public String setOrient() {
142:                return _orient;
143:            }
144:
145:            /** Sets the orientation of {@link Fisheyeitem}.
146:             */
147:            public void setOrient(String orient) throws WrongValueException {
148:                if (!"horizontal".equals(orient) && !"vertical".equals(orient))
149:                    throw new WrongValueException(orient);
150:
151:                if (!Objects.equals(_orient, orient)) {
152:                    _orient = orient;
153:                    smartUpdate("dojo:orientation", orient);
154:                }
155:            }
156:
157:            /** Returns the attach edge.
158:             * <p>Default: center
159:             */
160:            public String getAttachEdge() {
161:                return _attachEdge;
162:            }
163:
164:            /** Returns the attach edge.
165:             */
166:            public void setAttachEdge(String attachEdge)
167:                    throws WrongValueException {
168:                if (attachEdge == null || attachEdge.length() == 0)
169:                    throw new WrongValueException(
170:                            "Empty attachEdge not allowed");
171:                if (!_attachEdge.equals(attachEdge)) {
172:                    _attachEdge = attachEdge;
173:                    smartUpdate("dojo:attachEdge", attachEdge);
174:                }
175:            }
176:
177:            /** Returns the label edge.
178:             * <p>Default: bottom
179:             */
180:            public String getLabelEdge() {
181:                return _labelEdge;
182:            }
183:
184:            /** Returns the label edge.
185:             */
186:            public void setLabelEdge(String labelEdge)
187:                    throws WrongValueException {
188:                if (labelEdge == null || labelEdge.length() == 0)
189:                    throw new WrongValueException("Empty labelEdge not allowed");
190:                if (!_labelEdge.equals(labelEdge)) {
191:                    _labelEdge = labelEdge;
192:                    smartUpdate("dojo:labelEdge", labelEdge);
193:                }
194:            }
195:
196:            /** Returns the HTML attributes used by the interior element, which
197:             * is the fisheye list.
198:             * <p>Used only for component development, not for application developers.
199:             */
200:            public String getInnerAttrs() {
201:                final StringBuffer sb = new StringBuffer(256).append(super 
202:                        .getInnerAttrs());
203:                HTMLs.appendAttribute(sb, "dojo:itemWidth", _itemwd);
204:                HTMLs.appendAttribute(sb, "dojo:itemHeight", _itemhgh);
205:                HTMLs.appendAttribute(sb, "dojo:itemMaxWidth", _itemmaxwd);
206:                HTMLs.appendAttribute(sb, "dojo:itemMaxHeight", _itemmaxhgh);
207:                HTMLs.appendAttribute(sb, "dojo:itemPadding", _itemPadding);
208:                HTMLs.appendAttribute(sb, "dojo:attachEdge", _attachEdge);
209:                HTMLs.appendAttribute(sb, "dojo:labelEdge", _labelEdge);
210:                HTMLs.appendAttribute(sb, "dojo:orientation", _orient);
211:                return sb.toString();
212:            }
213:
214:            //-- Component --//
215:            public boolean insertBefore(Component child, Component insertBefore) {
216:                if (!(child instanceof  Fisheyeitem))
217:                    throw new UiException("Unsupported child for fisheyelist: "
218:                            + child);
219:                return super.insertBefore(child, insertBefore);
220:            }
221:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.