Java Doc for TableFunctionGraph.java in  » Science » jcm1-source » edu » hws » jcm » functions » 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 » Science » jcm1 source » edu.hws.jcm.functions 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   edu.hws.jcm.draw.Drawable
      edu.hws.jcm.functions.TableFunctionGraph

TableFunctionGraph
public class TableFunctionGraph extends Drawable implements MouseListener,MouseMotionListener(Code)
A TableFunctionGraph is a Drawable object that can be added to a CoordinateRect (or DisplayCanvas). It draws the graph of a specified TableFunction. A TableFunction is a function and can also be graphed by an object of the class edu.hws.jcm.draw.Graph1D. However, a TableFunctionGraph offers the option of showing the points from the table that defines the function as small disks (true by default) and the option of making the graph "interactive" so that the user can drag the points (false by default).



Constructor Summary
public  TableFunctionGraph()
     Create a TableFunctionGraph that initially draws no function.
public  TableFunctionGraph(TableFunction function)
     Create a TableFunctionGraph to draw the specified TableFunction.

Method Summary
public  voiddraw(Graphics g, boolean coordsChanged)
     Override the draw() method from class Drawable to draw the function.
public  ColorgetColor()
     Get the non-null color that is used for drawing the graph.
public  TableFunctiongetFunction()
     Get the TableFunction whose graph is drawn by this TableFunctionGraph.
public  booleangetInteractive()
     Get the value of the interactive property, which is true if the user can modify the function by dragging the points from the table.
public  ComputablegetOnDrag()
     Get the Computable that is notified as the user drags a point.
public  ComputablegetOnFinishDrag()
     Get the Computable that is notified when the user finishes dragging a point.
public  booleangetShowPoints()
     Get the showPoints property, which determines whether the points from the table that defines the function are visible as little disks.
public  voidmouseClicked(MouseEvent evt)
     Empty method, required by the MouseListener interface.
public  voidmouseDragged(MouseEvent evt)
     Method required by the MouseListener interface.
public  voidmouseEntered(MouseEvent evt)
     Empty method, required by the MouseMotionListener interface.
public  voidmouseExited(MouseEvent evt)
     Empty method, required by the MouseMotionListener interface.
public  voidmouseMoved(MouseEvent evt)
     Empty method, required by the MouseMotionListener interface.
public  voidmousePressed(MouseEvent evt)
     Method required by the MouseListener interface.
public  voidmouseReleased(MouseEvent evt)
     Method required by the MouseListener interface.
public  voidsetColor(Color c)
     Set the color that is used for drawing the graph.
public  voidsetFunction(TableFunction function)
     Set the function whose graph is drawn by this TableFunctionGraph.
public  voidsetFunctionStyle(int style)
     Provided as a convenience.
public  voidsetInteractive(boolean interactive)
     Set the value of the interactive property, which is true if the user can modify the function by dragging the points from the table.
public  voidsetOnDrag(Computable c)
     Specify a controller whose compute() method will be called repeatedly as the user drags one of the points from the table function.
public  voidsetOnFinishDrag(Computable c)
     Specify a controller whose compute() method will be called once when the user finishes dragging one of the points from the table function.
protected  voidsetOwnerData(DisplayCanvas canvas, CoordinateRect coords)
     Sets the values of member variables canvas and coords.
public  voidsetShowPoints(boolean show)
     Set the showPoints property, which determines whether the points from the table that defines the function are visible as little disks.


Constructor Detail
TableFunctionGraph
public TableFunctionGraph()(Code)
Create a TableFunctionGraph that initially draws no function. A function can be set later with setFunction.



TableFunctionGraph
public TableFunctionGraph(TableFunction function)(Code)
Create a TableFunctionGraph to draw the specified TableFunction.




Method Detail
draw
public void draw(Graphics g, boolean coordsChanged)(Code)
Override the draw() method from class Drawable to draw the function. This is not meant to be called directly.



getColor
public Color getColor()(Code)
Get the non-null color that is used for drawing the graph.



getFunction
public TableFunction getFunction()(Code)
Get the TableFunction whose graph is drawn by this TableFunctionGraph. If the value is null, then no graph is drawn.



getInteractive
public boolean getInteractive()(Code)
Get the value of the interactive property, which is true if the user can modify the function by dragging the points from the table.



getOnDrag
public Computable getOnDrag()(Code)
Get the Computable that is notified as the user drags a point.



getOnFinishDrag
public Computable getOnFinishDrag()(Code)
Get the Computable that is notified when the user finishes dragging a point.



getShowPoints
public boolean getShowPoints()(Code)
Get the showPoints property, which determines whether the points from the table that defines the function are visible as little disks.



mouseClicked
public void mouseClicked(MouseEvent evt)(Code)
Empty method, required by the MouseListener interface.



mouseDragged
public void mouseDragged(MouseEvent evt)(Code)
Method required by the MouseListener interface. Defined here to support dragging of points on the function's graph. Not meant to be called directly.



mouseEntered
public void mouseEntered(MouseEvent evt)(Code)
Empty method, required by the MouseMotionListener interface.



mouseExited
public void mouseExited(MouseEvent evt)(Code)
Empty method, required by the MouseMotionListener interface.



mouseMoved
public void mouseMoved(MouseEvent evt)(Code)
Empty method, required by the MouseMotionListener interface.



mousePressed
public void mousePressed(MouseEvent evt)(Code)
Method required by the MouseListener interface. Defined here to support dragging of points on the function's graph. Not meant to be called directly.



mouseReleased
public void mouseReleased(MouseEvent evt)(Code)
Method required by the MouseListener interface. Defined here to support dragging of points on the function's graph. Not meant to be called directly.



setColor
public void setColor(Color c)(Code)
Set the color that is used for drawing the graph. The defalt is magenta. If the specified Color value is null, the call to setColor is ignored.



setFunction
public void setFunction(TableFunction function)(Code)
Set the function whose graph is drawn by this TableFunctionGraph. If the value is null, nothing is drawn



setFunctionStyle
public void setFunctionStyle(int style)(Code)
Provided as a convenience. If the function for this TableFunctionGraph is non-null, its style is set to the specified style, and the graph is redrawn. The parameter should be one of the constants TableFunction.SMOOTH, TableFunction.PIECEWISE_LINEAR, TableFunction.STEP, TableFunction.STEP_LEFT, or TableFunction.STEP_RIGHT.



setInteractive
public void setInteractive(boolean interactive)(Code)
Set the value of the interactive property, which is true if the user can modify the function by dragging the points from the table. The default is false.



setOnDrag
public void setOnDrag(Computable c)(Code)
Specify a controller whose compute() method will be called repeatedly as the user drags one of the points from the table function. This only applies if the "interactive" property is true.



setOnFinishDrag
public void setOnFinishDrag(Computable c)(Code)
Specify a controller whose compute() method will be called once when the user finishes dragging one of the points from the table function. This only applies if the "interactive" property is true.



setOwnerData
protected void setOwnerData(DisplayCanvas canvas, CoordinateRect coords)(Code)
Sets the values of member variables canvas and coords. This is designed to be called only by the CoordinateRect class. This overrides Drawable.setOwnerData();



setShowPoints
public void setShowPoints(boolean show)(Code)
Set the showPoints property, which determines whether the points from the table that defines the function are visible as little disks. The default is true;



Fields inherited from edu.hws.jcm.draw.Drawable
protected DisplayCanvas canvas(Code)(Java Doc)
protected CoordinateRect coords(Code)(Java Doc)

Methods inherited from edu.hws.jcm.draw.Drawable
abstract public void draw(Graphics g, boolean coordsChanged)(Code)(Java Doc)
public boolean getVisible()(Code)(Java Doc)
public void needsRedraw()(Code)(Java Doc)
protected void setOwnerData(DisplayCanvas canvas, CoordinateRect coords)(Code)(Java Doc)
public void setVisible(boolean show)(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.