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


java.lang.Object
   edu.hws.jcm.draw.Drawable
      edu.hws.jcm.draw.ParametricCurve

ParametricCurve
public class ParametricCurve extends Drawable implements Computable(Code)
A ParametricCurve is defined by two functions, x(t) and y(t) of a variable, t, for t in a specified interval. The curve is simply defined as a sequence of line segments connecting points of the form (x(t),y(t)), except where one of the functions is undefined. Also, in some cases a discontinuity will be detected and no line will be drawn between two of the points.



Constructor Summary
public  ParametricCurve()
     Create a ParametricCurve with nothing to graph.
public  ParametricCurve(Function xFunc, Function yFunc)
     Create a parametric curve with x and y coordinates given by the specified functions of the parameter t.
public  ParametricCurve(Function xFunc, Function yFunc, Value tmin, Value tmax, Value intevals)
     Create a parametric curve with the specified values.
Parameters:
  xFunc - A Function of one variable giving the x-coordinate of points on the curve.

Method Summary
 voidbecomesDefined(Point p1, double t1, Point p2, double t2, int depth)
    
 voidbecomesUndefined(Point p1, double t1, Point p2, double t2, int depth)
    
public synchronized  voidcompute()
     Recompute data for the graph and make sure that the area of the display canvas that shows the graph is redrawn.
 voiddiscontinuity(Point p1, double t1, Point p2, double t2, int depth)
    
public synchronized  voiddraw(Graphics g, boolean coordsChanged)
     Draw the graph (possibly recomputing the data if the CoordinateRect has changed).
public  ColorgetColor()
     Get the color that is used to draw the graph.
public  ValuegetIntervals()
     Get the value object, possibly null, that determines the number of points on the curve.
public  ValuegetTMax()
     Get the Value object, possibly null, that gives the right endpoint of the domain of the parameter.
public  ValuegetTMin()
     Get the Value object, possibly null, that gives the left endpoint of the domain of the parameter.
public  FunctiongetXFunction()
     Get the (possibly null) function that gives the x-coordinate of the curve.
public  FunctiongetYFunction()
     Get the (possibly null) function that gives the y-coordinate of the curve.
public  voidsetColor(Color c)
     Set the color to be used for drawing the graph.
public synchronized  voidsetFunctions(Function x, Function y)
     Sets the functions that gives the coordinates of the curve to be graphed.
public  voidsetIntervals(Value intervalCount)
     Specify the number of subintervals into which the domain of the parametric curve is divided. The interval (tmin,tmax) is divided into subintervals.
public  voidsetLimits(Value tmin, Value tmax)
     Set the Value objects that specify the domain of the paratmeter.
public  voidsetTMax(Value tmax)
     Set the Value object that gives the right endpoint of the domain of the parameter.
public  voidsetTMin(Value tmin)
     Set the Value object that gives the left endpoint of the domain of the parameter.
public synchronized  voidsetXFunction(Function x)
     Set the function that gives the x-coordinate of the curve to be graphed.
public synchronized  voidsetYFunction(Function y)
     Set the function that gives the y-coordinate of the curve to be graphed.


Constructor Detail
ParametricCurve
public ParametricCurve()(Code)
Create a ParametricCurve with nothing to graph. The functions and other values can be set later.



ParametricCurve
public ParametricCurve(Function xFunc, Function yFunc)(Code)
Create a parametric curve with x and y coordinates given by the specified functions of the parameter t. Defaults values are used for tmin, tmax, and the number of intervals. If either function is null, nothing is drawn.



ParametricCurve
public ParametricCurve(Function xFunc, Function yFunc, Value tmin, Value tmax, Value intevals)(Code)
Create a parametric curve with the specified values.
Parameters:
  xFunc - A Function of one variable giving the x-coordinate of points on the curve. If thisis null, then nothing will be drawn.
Parameters:
  yFunc - A Function of one variable giving the y-coordinate of points on the curve. If thisis null, then nothing will be drawn.
Parameters:
  tmin - A Value object giving one endpoint of the domain of the parameter. If this is null,the default value -5 is used.
Parameters:
  tmax - A Value object giving the second endpoint of the domain of the parameter. If this is null,the default value 5 is used. Note that it is not required that tmax be greater than tmin.
Parameters:
  intervals - A Value object giving the number of intervals into which the domain is subdivided.If this is null, the default value 200 is used. The number of points on the curve will bethe number of intervals plus one (unless a function is undefined at some value of the parameteror if a discontinuity is detected). The number of intervals is clamped to the range 1 to 10000.Values outside this range would certainly be unreasonable.




Method Detail
becomesDefined
void becomesDefined(Point p1, double t1, Point p2, double t2, int depth)(Code)



becomesUndefined
void becomesUndefined(Point p1, double t1, Point p2, double t2, int depth)(Code)



compute
public synchronized void compute()(Code)
Recompute data for the graph and make sure that the area of the display canvas that shows the graph is redrawn. This method is ordinarily called by a Controller.



discontinuity
void discontinuity(Point p1, double t1, Point p2, double t2, int depth)(Code)



draw
public synchronized void draw(Graphics g, boolean coordsChanged)(Code)
Draw the graph (possibly recomputing the data if the CoordinateRect has changed). This is not usually called directly.



getColor
public Color getColor()(Code)
Get the color that is used to draw the graph.



getIntervals
public Value getIntervals()(Code)
Get the value object, possibly null, that determines the number of points on the curve.



getTMax
public Value getTMax()(Code)
Get the Value object, possibly null, that gives the right endpoint of the domain of the parameter.



getTMin
public Value getTMin()(Code)
Get the Value object, possibly null, that gives the left endpoint of the domain of the parameter.



getXFunction
public Function getXFunction()(Code)
Get the (possibly null) function that gives the x-coordinate of the curve.



getYFunction
public Function getYFunction()(Code)
Get the (possibly null) function that gives the y-coordinate of the curve.



setColor
public void setColor(Color c)(Code)
Set the color to be used for drawing the graph.



setFunctions
public synchronized void setFunctions(Function x, Function y)(Code)
Sets the functions that gives the coordinates of the curve to be graphed. If either function is null, then nothing is drawn. If non-null, each function must be a function of one variable.



setIntervals
public void setIntervals(Value intervalCount)(Code)
Specify the number of subintervals into which the domain of the parametric curve is divided. The interval (tmin,tmax) is divided into subintervals. X and y coordinates of the parametric curve are computed at each endpoint of these subintervals, and then the points are connected by lines. If the parameter of this function is null, or if no interval count is ever specified, then a default value of 200 is used.



setLimits
public void setLimits(Value tmin, Value tmax)(Code)
Set the Value objects that specify the domain of the paratmeter.



setTMax
public void setTMax(Value tmax)(Code)
Set the Value object that gives the right endpoint of the domain of the parameter. If this is null, then a default value of 5 is used for the right endpoint. (Note: actually, it's not required that tmin be less than tmax, so this might really be the "left" endpoint.)



setTMin
public void setTMin(Value tmin)(Code)
Set the Value object that gives the left endpoint of the domain of the parameter. If this is null, then a default value of -5 is used for the left endpoint. (Note: actually, it's not required that tmin be less than tmax, so this might really be the "right" endpoint.)



setXFunction
public synchronized void setXFunction(Function x)(Code)
Set the function that gives the x-coordinate of the curve to be graphed. If this is null, then nothing is drawn. If non-null, it must be a function of one variable.



setYFunction
public synchronized void setYFunction(Function y)(Code)
Set the function that gives the y-coordinate of the curve to be graphed. If this is null, then nothing is drawn. If non-null, it must be a function of one variable.



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.