Java Doc for Cell.java in  » Development » jga-Generic-Algorithms » net » sf » jga » swing » spreadsheet » 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 » Development » jga Generic Algorithms » net.sf.jga.swing.spreadsheet 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   java.util.Observable
      net.sf.jga.swing.spreadsheet.Cell

Cell
public class Cell extends Observable implements Observer(Code)
A single cell in spreadsheet. Encapsulates information about the generator that provides the value of the cell, the cell's formatting information, and the editor and/or renderer used to display/update the cell's contents.

Copyright © 2004-2005 David A. Hall
author:
   David A. Hall


Inner Class :static class Editor extends DefaultCellEditor
Inner Class :static class Renderer extends GenericTableCellRenderer

Field Summary
final public static  StringCIRCULAR_REF_ERR
    
final public static  StringCLASS_CAST_ERR
    
final public static  StringEVALUATION_ERR
    
final public static  StringNULL_POINTER_ERR
    
final public static  StringPARSER_ERR
    
final public static  StringREFERENCE_ERR
    
final public static  StringUNDEFINED_ERR
    

Constructor Summary
 Cell(Spreadsheet parent, Point addr, String formula, boolean editable)
     Builds a possibly editable cell at the given address, using the formula to build a generator to retrieve the value.
 Cell(Spreadsheet parent, Class<T> type, Point addr, Generator<T> value)
     Builds a read-only cell at the given address, using the generator to retrieve the value.
 Cell(Spreadsheet parent, int row, int col)
    

Method Summary
public  voidclear()
     Clears the contents of the cell, setting to the default type and value.
final public  Iterator<Cell>dependsOn()
    
public  PointgetAddress()
     Returns the address of the cell.
public  TableCellEditorgetEditor()
    
public  StringgetErrorMsg()
     Returns the textual description of the last error associated with cell. The string will be used by the UI.
 StringgetFormula()
     Returns the formula that describes the cell's contents.
public  StringgetName()
    
 SpreadsheetgetParent()
    
public  GeneratorgetReference()
     Returns a reference to the cell's formula.
public  TableCellRenderergetRenderer()
    
public  ClassgetType()
     Returns the type of values held by the cell.
public  ObjectgetValue()
     Returns the value of the cell.
public  booleanisEditable()
     Returns true if the cell is editable, false if it is read-only.
public  booleanisUndefined()
    
public  booleanisValid()
    
public  voidnotifyObservers()
     Triggers cells (and other observers) that this cell's contents have been changed.
public  booleanreferences(Cell c)
     Returns true if this cell references the given cell, either directly or indirectly.
public  voidsetEditable(boolean b)
     Sets the cell as editable (or not).
public  voidsetEditor(TableCellEditor editor)
    
public  voidsetFormat(UnaryFunctor<T, String> formatter)
     Sets the format of the cell, if formatting is supported by the cell's renderer.
final public  voidsetFormula(String formula)
     Sets the contents of the cell to the given formula.
final public  voidsetFormula(Generator formula)
     Sets the contents of the cell to the given formula, notifying all observers of the change.
 voidsetName(String name)
    
public  voidsetRenderer(TableCellRenderer renderer)
    
final public  voidsetValue(Object value)
     Sets the contents of the cell to the given value.
public  StringtoString()
    
 voidunlink()
     Clears the contents of the cell, and sets its state to an invalid state to force all dependant cells to reparse.
public  voidupdate(Observable observable, Object object)
    

Field Detail
CIRCULAR_REF_ERR
final public static String CIRCULAR_REF_ERR(Code)



CLASS_CAST_ERR
final public static String CLASS_CAST_ERR(Code)



EVALUATION_ERR
final public static String EVALUATION_ERR(Code)



NULL_POINTER_ERR
final public static String NULL_POINTER_ERR(Code)



PARSER_ERR
final public static String PARSER_ERR(Code)



REFERENCE_ERR
final public static String REFERENCE_ERR(Code)



UNDEFINED_ERR
final public static String UNDEFINED_ERR(Code)




Constructor Detail
Cell
Cell(Spreadsheet parent, Point addr, String formula, boolean editable)(Code)
Builds a possibly editable cell at the given address, using the formula to build a generator to retrieve the value.



Cell
Cell(Spreadsheet parent, Class<T> type, Point addr, Generator<T> value)(Code)
Builds a read-only cell at the given address, using the generator to retrieve the value.



Cell
Cell(Spreadsheet parent, int row, int col)(Code)




Method Detail
clear
public void clear()(Code)
Clears the contents of the cell, setting to the default type and value.



dependsOn
final public Iterator<Cell> dependsOn()(Code)
returns an iterator over all cells on which this cell directly depends



getAddress
public Point getAddress()(Code)
Returns the address of the cell.



getEditor
public TableCellEditor getEditor()(Code)
Returns the component used to edit the cell



getErrorMsg
public String getErrorMsg()(Code)
Returns the textual description of the last error associated with cell. The string will be used by the UI. If the cell's value can be retrieved without error, then this field will be null.



getFormula
String getFormula()(Code)
Returns the formula that describes the cell's contents.



getName
public String getName()(Code)



getParent
Spreadsheet getParent()(Code)



getReference
public Generator getReference()(Code)
Returns a reference to the cell's formula.



getRenderer
public TableCellRenderer getRenderer()(Code)
Returns the renderer used to paint the cell



getType
public Class getType()(Code)
Returns the type of values held by the cell.



getValue
public Object getValue()(Code)
Returns the value of the cell. If an exception is caught while evaluating the cell, then this will return null and the getErrorMsg() method will return a description of the problem.



isEditable
public boolean isEditable()(Code)
Returns true if the cell is editable, false if it is read-only.



isUndefined
public boolean isUndefined()(Code)
Returns true if the cell's value is undefined



isValid
public boolean isValid()(Code)
Returns true if the cell's value can be retrieved without error



notifyObservers
public void notifyObservers()(Code)
Triggers cells (and other observers) that this cell's contents have been changed.



references
public boolean references(Cell c)(Code)
Returns true if this cell references the given cell, either directly or indirectly. Also returns true if this cell is the given cell.



setEditable
public void setEditable(boolean b)(Code)
Sets the cell as editable (or not).



setEditor
public void setEditor(TableCellEditor editor)(Code)
Sets the component used to edit the cell



setFormat
public void setFormat(UnaryFunctor<T, String> formatter)(Code)
Sets the format of the cell, if formatting is supported by the cell's renderer. If formatting is not supported, invoking this method will have no effect.



setFormula
final public void setFormula(String formula) throws CircularReferenceException(Code)
Sets the contents of the cell to the given formula.



setFormula
final public void setFormula(Generator formula)(Code)
Sets the contents of the cell to the given formula, notifying all observers of the change.



setName
void setName(String name)(Code)



setRenderer
public void setRenderer(TableCellRenderer renderer)(Code)
Sets the component used to paint the cell



setValue
final public void setValue(Object value)(Code)
Sets the contents of the cell to the given value.



toString
public String toString()(Code)



unlink
void unlink()(Code)
Clears the contents of the cell, and sets its state to an invalid state to force all dependant cells to reparse.



update
public void update(Observable observable, Object object)(Code)



Methods inherited from java.util.Observable
public synchronized void addObserver(Observer o)(Code)(Java Doc)
protected synchronized void clearChanged()(Code)(Java Doc)
public synchronized int countObservers()(Code)(Java Doc)
public synchronized void deleteObserver(Observer o)(Code)(Java Doc)
public synchronized void deleteObservers()(Code)(Java Doc)
public synchronized boolean hasChanged()(Code)(Java Doc)
public void notifyObservers()(Code)(Java Doc)
public void notifyObservers(Object arg)(Code)(Java Doc)
protected synchronized void setChanged()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.