Source Code Cross Referenced for Column.java in  » Database-Client » prefuse » prefuse » data » column » 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 » Database Client » prefuse » prefuse.data.column 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        package prefuse.data.column;
002:
003:        import java.util.Date;
004:
005:        import prefuse.data.DataTypeException;
006:        import prefuse.data.event.ColumnListener;
007:        import prefuse.data.parser.DataParser;
008:
009:        /**
010:         * Interface for a data column in a table.
011:         * 
012:         * @author <a href="http://jheer.org">jeffrey heer</a>
013:         */
014:        public interface Column {
015:
016:            // ------------------------------------------------------------------------
017:            // Column Metadata
018:
019:            /**
020:             * Returns the number of rows in this data column
021:             * @return the number of rows
022:             */
023:            public int getRowCount();
024:
025:            /**
026:             * Sets the number of rows in this data column
027:             * @param nrows the number of rows
028:             */
029:            public void setMaximumRow(int nrows);
030:
031:            /**
032:             * Indicates if the values in this column are read-only.
033:             * @return true if the values can not be edited, false otherwise
034:             */
035:            public boolean isReadOnly();
036:
037:            /**
038:             * Sets if the values in this column are read-only
039:             * @param readOnly true to ensure the values can not be edited, 
040:             *  false otherwise
041:             */
042:            public void setReadOnly(boolean readOnly);
043:
044:            /**
045:             * Indicates if the value at the given row can be edited.
046:             * @param row the row to check
047:             * @return true is the value can be modified, false otherwise
048:             */
049:            public boolean isCellEditable(int row);
050:
051:            /**
052:             * Returns the most specific superclass for the values in the column
053:             * @return the Class of the column's data values
054:             */
055:            public Class getColumnType();
056:
057:            /**
058:             * Get the data parser used to map String values to and from the values
059:             * stored by this Column.
060:             * @return the DataParser used by this Column
061:             */
062:            public DataParser getParser();
063:
064:            /**
065:             * Set the data parser used to map String values to and from the values
066:             * stored by this Column.
067:             * @param parser the DataParser to use
068:             */
069:            public void setParser(DataParser parser);
070:
071:            // ------------------------------------------------------------------------
072:            // Listener Methods
073:
074:            /**
075:             * Adds a listener to be notified when this column changes
076:             * @param listener the ColumnListener to add
077:             */
078:            public void addColumnListener(ColumnListener listener);
079:
080:            /**
081:             * Removes a listener, causing it to no longer be notified of changes
082:             * @param listener the ColumnListener to remove
083:             */
084:            public void removeColumnListener(ColumnListener listener);
085:
086:            // ------------------------------------------------------------------------
087:            // Data Access Methods
088:
089:            /**
090:             * Returns the default value for rows that have not been set explicitly. 
091:             */
092:            public Object getDefaultValue();
093:
094:            /**
095:             * Reverts the specified row back to the column's default value.
096:             * @param row
097:             */
098:            public void revertToDefault(int row);
099:
100:            /**
101:             * Indicates if the get method can be called without
102:             * an exception being thrown for the given type.
103:             * @param type the Class of the data type to check
104:             * @return true if the type is supported by this column, false otherwise
105:             */
106:            public boolean canGet(Class type);
107:
108:            /**
109:             * Indicates if the set method can be called without
110:             * an exception being thrown for the given type.
111:             * @param type the Class of the data type to check
112:             * @return true if the type is supported by this column, false otherwise
113:             */
114:            public boolean canSet(Class type);
115:
116:            /**
117:             * Get the data value at the specified row
118:             * @param row the row from which to retrieve the value
119:             * @return the data value
120:             */
121:            public Object get(int row);
122:
123:            /**
124:             * Set the data value at the specified row
125:             * @param val the value to set
126:             * @param row the row at which to set the value
127:             */
128:            public void set(Object val, int row) throws DataTypeException;
129:
130:            // ------------------------------------------------------------------------
131:            // Data Type Convenience Methods
132:
133:            // because java's type system can be tedious at times...
134:
135:            // -- int -----------------------------------------------------------------
136:
137:            /**
138:             * Indicates if convenience get method can be called without
139:             * an exception being thrown for the int type.
140:             * @return true if getInt is supported, false otherwise
141:             */
142:            public boolean canGetInt();
143:
144:            /**
145:             * Indicates if convenience set method can be called without
146:             * an exception being thrown for the int type.
147:             * @return true if setInt is supported, false otherwise
148:             */
149:            public boolean canSetInt();
150:
151:            /**
152:             * Get the data value at the specified row as an integer
153:             * @param row the row from which to retrieve the value
154:             * @return the data value as an integer
155:             * @throws DataTypeException if this column does not 
156:             *  support the integer type
157:             */
158:            public int getInt(int row) throws DataTypeException;
159:
160:            /**
161:             * Set the data value at the specified row as an integer
162:             * @param val the value to set
163:             * @param row the row at which to set the value
164:             * @throws DataTypeException if this column does not 
165:             *  support the integer type
166:             */
167:            public void setInt(int val, int row) throws DataTypeException;
168:
169:            // -- long ----------------------------------------------------------------
170:
171:            /**
172:             * Indicates if convenience get method can be called without
173:             * an exception being thrown for the long type.
174:             * @return true if getLong is supported, false otherwise
175:             */
176:            public boolean canGetLong();
177:
178:            /**
179:             * Indicates if convenience set method can be called without
180:             * an exception being thrown for the long type.
181:             * @return true if setLong is supported, false otherwise
182:             */
183:            public boolean canSetLong();
184:
185:            /**
186:             * Get the data value at the specified row as a long
187:             * @param row the row from which to retrieve the value
188:             * @return the data value as a long
189:             * @throws DataTypeException if this column does not 
190:             *  support the long type
191:             */
192:            public long getLong(int row) throws DataTypeException;
193:
194:            /**
195:             * Set the data value at the specified row as a long
196:             * @param val the value to set
197:             * @param row the row at which to set the value
198:             * @throws DataTypeException if this column does not 
199:             *  support the long type
200:             */
201:            public void setLong(long val, int row) throws DataTypeException;
202:
203:            // -- float ---------------------------------------------------------------    
204:
205:            /**
206:             * Indicates if convenience get method can be called without
207:             * an exception being thrown for the float type.
208:             * @return true if getFloat is supported, false otherwise
209:             */
210:            public boolean canGetFloat();
211:
212:            /**
213:             * Indicates if convenience set method can be called without
214:             * an exception being thrown for the float type.
215:             * @return true if setFloat is supported, false otherwise
216:             */
217:            public boolean canSetFloat();
218:
219:            /**
220:             * Get the data value at the specified row as a float
221:             * @param row the row from which to retrieve the value
222:             * @return the data value as a float
223:             * @throws DataTypeException if this column does not 
224:             *  support the float type
225:             */
226:            public float getFloat(int row) throws DataTypeException;
227:
228:            /**
229:             * Set the data value at the specified row as a float
230:             * @param val the value to set
231:             * @param row the row at which to set the value
232:             * @throws DataTypeException if this column does not 
233:             *  support the float type
234:             */
235:            public void setFloat(float val, int row) throws DataTypeException;
236:
237:            // -- double --------------------------------------------------------------
238:
239:            /**
240:             * Indicates if convenience get method can be called without
241:             * an exception being thrown for the double type.
242:             * @return true if getDouble is supported, false otherwise
243:             */
244:            public boolean canGetDouble();
245:
246:            /**
247:             * Indicates if convenience set method can be called without
248:             * an exception being thrown for the double type.
249:             * @return true if setDouble is supported, false otherwise
250:             */
251:            public boolean canSetDouble();
252:
253:            /**
254:             * Get the data value at the specified row as a double
255:             * @param row the row from which to retrieve the value
256:             * @return the data value as a double
257:             * @throws DataTypeException if this column does not 
258:             *  support the double type
259:             */
260:            public double getDouble(int row) throws DataTypeException;
261:
262:            /**
263:             * Set the data value at the specified row as a double
264:             * @param val the value to set
265:             * @param row the row at which to set the value
266:             * @throws DataTypeException if this column does not 
267:             *  support the double type
268:             */
269:            public void setDouble(double val, int row) throws DataTypeException;
270:
271:            // -- boolean -------------------------------------------------------------
272:
273:            /**
274:             * Indicates if convenience get method can be called without
275:             * an exception being thrown for the boolean type.
276:             * @return true if getBoolean is supported, false otherwise
277:             */
278:            public boolean canGetBoolean();
279:
280:            /**
281:             * Indicates if convenience set method can be called without
282:             * an exception being thrown for the boolean type.
283:             * @return true if setBoolean is supported, false otherwise
284:             */
285:            public boolean canSetBoolean();
286:
287:            /**
288:             * Get the data value at the specified row as a boolean
289:             * @param row the row from which to retrieve the value
290:             * @return the data value as a boolean
291:             * @throws DataTypeException if this column does not 
292:             *  support the boolean type
293:             */
294:            public boolean getBoolean(int row) throws DataTypeException;
295:
296:            /**
297:             * Set the data value at the specified row as a boolean
298:             * @param val the value to set
299:             * @param row the row at which to set the value
300:             * @throws DataTypeException if this column does not 
301:             *  support the boolean type
302:             */
303:            public void setBoolean(boolean val, int row)
304:                    throws DataTypeException;
305:
306:            // -- String --------------------------------------------------------------
307:
308:            /**
309:             * Indicates if convenience get method can be called without
310:             * an exception being thrown for the String type.
311:             * @return true if getString is supported, false otherwise
312:             */
313:            public boolean canGetString();
314:
315:            /**
316:             * Indicates if convenience set method can be called without
317:             * an exception being thrown for the String type.
318:             * @return true if setString is supported, false otherwise
319:             */
320:            public boolean canSetString();
321:
322:            /**
323:             * Get the data value at the specified row as a String
324:             * @param row the row from which to retrieve the value
325:             * @return the data value as a String
326:             * @throws DataTypeException if this column does not 
327:             *  support the String type
328:             */
329:            public String getString(int row) throws DataTypeException;
330:
331:            /**
332:             * Set the data value at the specified row as a String
333:             * @param val the value to set
334:             * @param row the row at which to set the value
335:             * @throws DataTypeException if this column does not 
336:             *  support the String type
337:             */
338:            public void setString(String val, int row) throws DataTypeException;
339:
340:            // -- Date ----------------------------------------------------------------
341:
342:            /**
343:             * Indicates if convenience get method can be called without
344:             * an exception being thrown for the Date type.
345:             * @return true if getDate is supported, false otherwise
346:             */
347:            public boolean canGetDate();
348:
349:            /**
350:             * Indicates if convenience set method can be called without
351:             * an exception being thrown for the Date type.
352:             * @return true if setDate is supported, false otherwise
353:             */
354:            public boolean canSetDate();
355:
356:            /**
357:             * Get the data value at the specified row as a Date
358:             * @param row the row from which to retrieve the value
359:             * @return the data value as a Date
360:             * @throws DataTypeException if this column does not 
361:             *  support the Date type
362:             */
363:            public Date getDate(int row) throws DataTypeException;
364:
365:            /**
366:             * Set the data value at the specified row as a Date
367:             * @param val the value to set
368:             * @param row the row at which to set the value
369:             * @throws DataTypeException if this column does not 
370:             *  support the Date type
371:             */
372:            public void setDate(Date val, int row) throws DataTypeException;
373:
374:        } // end of interface Column
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.