Java Doc for Drawable.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

All known Subclasses:   edu.hws.jcm.draw.Axes,  edu.hws.jcm.draw.DrawString,  edu.hws.jcm.draw.DrawGeometric,  edu.hws.jcm.draw.Grid,  edu.hws.jcm.draw.ScatterPlot,  edu.hws.jcm.draw.DraggablePoint,  edu.hws.jcm.draw.RiemannSumRects,  edu.hws.jcm.draw.Graph1D,  edu.hws.jcm.draw.Panner,  edu.hws.jcm.draw.ParametricCurve,  edu.hws.jcm.draw.VectorField,  edu.hws.jcm.draw.DrawBorder,  edu.hws.jcm.draw.MouseTracker,  edu.hws.jcm.functions.TableFunctionGraph,
Drawable
abstract public class Drawable implements java.io.Serializable(Code)
A Drawable object can be added to a CoordinateRect, which is itself in a DisplayCanvas. Its purpose is, generally, to draw something in the rectangular area represented by the CoordinateRect. The drawing can use information in the CoordinateRect, which includes both the real number coordinates and the pixel coordinates of the rectangular area.


Field Summary
protected  DisplayCanvascanvas
     The canvas on which this Drawable is drawn.
protected  CoordinateRectcoords
     The CoordinateRect for the rectagular area where this Drawable is drawn.


Method Summary
abstract public  voiddraw(Graphics g, boolean coordsChanged)
     Draw this drawable in the graphics context g.
public  booleangetVisible()
     Return true if this Drawable is visible, false if it is hidden.
public  voidneedsRedraw()
     This routine should be called if the appearance of the Drawable changes so that the rectangular area that it occupies has to be redrawn. The routine is generally meant to be called by the Drawable itself. It will notify the DisplayCanvas, canvas, that the CoordinateRect, coords, needs to be redrawn, where canvas and coords are the member variables in this class.
protected  voidsetOwnerData(DisplayCanvas canvas, CoordinateRect coords)
     Sets the values of member variables canvas and coords.
public  voidsetVisible(boolean show)
     Set the visibility of this Drawable.

Field Detail
canvas
protected DisplayCanvas canvas(Code)
The canvas on which this Drawable is drawn. This is set automatically when the Drawable is added to a CoordinateRect and it should not be changed. (It will be changed automatically if the Drawable is removed from the CoordinateRect.)



coords
protected CoordinateRect coords(Code)
The CoordinateRect for the rectagular area where this Drawable is drawn. This is set automatically when the Drawable is added to a CoordingteRect and should not be changed. (It will be changed automatically if the Drawable is removed from the CoordinateRect.)





Method Detail
draw
abstract public void draw(Graphics g, boolean coordsChanged)(Code)
Draw this drawable in the graphics context g. This is meant to be called only by the CoordinateRect, coords, that manages this Drawable. The coords contains information about the rectangular area in which this Drawable is displayed, both in terms of pixels and in terms of real (x,y)-coordinates. The value of coordsChanged is true if any of the values coords.getXmin(), coords.getXmax(), coords.getYmin(), coords.getYmax(), coords.getLeft(), coords.getRight(), coords.getTop(), coords.getBottom(), or coords.getGap() has changed. Drawables that depend only on this information can check the value of coordsChanged to see whether they need to update any previously computed member variables that depend on these values. This method is meant to be called only by the system.
Parameters:
  g - The graphics context in which the Drawble is to be drawn. (The drawing can change the color in g, but should not permanently change font, painting mode, etc.Thus, every drawable is responsible for setting the color it wants to use.)
Parameters:
  coordsChanged - Indicates whether the CoordinateRect has changed.



getVisible
public boolean getVisible()(Code)
Return true if this Drawable is visible, false if it is hidden. A hidden Drawable is ignored by the CoordinateRect that manages it.



needsRedraw
public void needsRedraw()(Code)
This routine should be called if the appearance of the Drawable changes so that the rectangular area that it occupies has to be redrawn. The routine is generally meant to be called by the Drawable itself. It will notify the DisplayCanvas, canvas, that the CoordinateRect, coords, needs to be redrawn, where canvas and coords are the member variables in this class. If canvas is null, nothing happens, since presumably the Drawable is not displayed anywhere in that case.



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.



setVisible
public void setVisible(boolean show)(Code)
Set the visibility of this Drawable. If show is false, then the Drawable is hidden. If it is true, the Drawable is shown.



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.