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

Axes
public class Axes extends Drawable (Code)
A set of horizontal and vertical axes that look OK and have reasonable, labeled tick marks. The number and spacing of tick marks changes depending on the scale on the axes. (The heuristics for computing this could use some improvement.)


Field Summary
final public static  intBOTTOM
     A constant that can be used in the setYAxisPosition() method to indicate the placement of the y-axs.
final public static  intCENTER
     A constant that can be used in the setXAxisPosition() and setYAxisPosition() methods to indicate the placement of the axes.
final public static  intLEFT
     A constant that can be used in the setXAxisPosition() method to indicate the placement of the x-axis.
final public static  intRIGHT
     A constant that can be used in the setXAxisPosition() method to indicate the placement of the x-axis.
final public static  intSMART
     A constant that can be used in the setXAxisPosition() and setYAxisPosition() methods to indicate the placement of the axes. The axis is placed at its true x- or y-position, if that lies within the range of values shown on the CoordinateRect. Otherwise, it is placed along an edge of the CoordinateRect.
final public static  intTOP
     A constant that can be used in the setYAxisPosition() method to indicate the placement of the y-axis.

Constructor Summary
public  Axes()
     Creates axes with no names on the axes.
public  Axes(String xLabel, String yLabel)
     Creates axes with given names on the axes.
Parameters:
  xlabel - Label for x axis.

Method Summary
public  voiddraw(Graphics g, boolean coordsChanged)
     Draw the axes.
 doublefudge(double x)
     Translated directly from the Pascal version of xFunctions.
public  ColorgetAxesColor()
     Get the color that is used for drawing the axes, when they are drawn in their true position.
public  ColorgetLabelColor()
     Get the color that is used for drawing the labels on the x- and y-axes.
public  ColorgetLightAxesColor()
     Get the color that is used for drawing an axis, when it is drawn along an edge of the CoordinateRect instead of in its proper x- or y-position.
public  intgetXAxisPosition()
     Get the positioning constant that tells where the x-axis is drawn.
public  StringgetXLabel()
     Get the label that appears on the x-axis.
public  intgetYAxisPosition()
     Get the positioning constant that tells where the y-axis is drawn.
public  StringgetYLabel()
     Get the label that appears on the y-axis.
public  voidsetAxesColor(Color c)
     Set the color that is used for drawing the axes, when they are drawn in their true position.
public  voidsetLabelColor(Color c)
     Set the color that is used for drawing the labels (usually the names of the variables) on the x- and y-axes.
public  voidsetLightAxesColor(Color c)
     Get the color that is used for drawing an axis, when it is drawn along an edge of the CoordinateRect instead of in its proper x- or y-position.
public  voidsetXAxisPosition(int pos)
     Set the positioning constant that tells where the x-axis is drawn.
public  voidsetXLabel(String s)
     Set the label that appears on the x-axis.
public  voidsetYAxisPosition(int pos)
     Set the positioning constant that tells where the y-axis is drawn.
public  voidsetYLabel(String s)
     Set the label that appears on the y-axis.
 voidsetup(FontMetrics fm, double xmin, double xmax, double ymin, double ymax, int left, int top, int width, int height, int gap)
    

Field Detail
BOTTOM
final public static int BOTTOM(Code)
A constant that can be used in the setYAxisPosition() method to indicate the placement of the y-axs. The axis is placed at the bottom of the CoordinateRect.



CENTER
final public static int CENTER(Code)
A constant that can be used in the setXAxisPosition() and setYAxisPosition() methods to indicate the placement of the axes. The axis is placed in the center of the CoordinateRect.



LEFT
final public static int LEFT(Code)
A constant that can be used in the setXAxisPosition() method to indicate the placement of the x-axis. The axis is placed at the left edge of the CoordinateRect.



RIGHT
final public static int RIGHT(Code)
A constant that can be used in the setXAxisPosition() method to indicate the placement of the x-axis. The axis is placed at the right edge of the CoordinateRect.



SMART
final public static int SMART(Code)
A constant that can be used in the setXAxisPosition() and setYAxisPosition() methods to indicate the placement of the axes. The axis is placed at its true x- or y-position, if that lies within the range of values shown on the CoordinateRect. Otherwise, it is placed along an edge of the CoordinateRect. This is the default value for axis placement.



TOP
final public static int TOP(Code)
A constant that can be used in the setYAxisPosition() method to indicate the placement of the y-axis. The axis is placed at the top of the CoordinateRect.




Constructor Detail
Axes
public Axes()(Code)
Creates axes with no names on the axes.



Axes
public Axes(String xLabel, String yLabel)(Code)
Creates axes with given names on the axes.
Parameters:
  xlabel - Label for x axis. If the value is null, no label is drawn.
Parameters:
  ylabel - Label for y axis. If the value is null, no label is drawn.




Method Detail
draw
public void draw(Graphics g, boolean coordsChanged)(Code)
Draw the axes. This is not meant to be called directly.



fudge
double fudge(double x)(Code)
Translated directly from the Pascal version of xFunctions. Move x to a more "rounded" value; used for labeling axes.
Parameters:
  x - the x coordinate used for labeling axes the rounded value of x



getAxesColor
public Color getAxesColor()(Code)
Get the color that is used for drawing the axes, when they are drawn in their true position.



getLabelColor
public Color getLabelColor()(Code)
Get the color that is used for drawing the labels on the x- and y-axes.



getLightAxesColor
public Color getLightAxesColor()(Code)
Get the color that is used for drawing an axis, when it is drawn along an edge of the CoordinateRect instead of in its proper x- or y-position.



getXAxisPosition
public int getXAxisPosition()(Code)
Get the positioning constant that tells where the x-axis is drawn. This can be LEFT, RIGHT, CENTER, or SMART.



getXLabel
public String getXLabel()(Code)
Get the label that appears on the x-axis. If the value is null, no label appears.



getYAxisPosition
public int getYAxisPosition()(Code)
Get the positioning constant that tells where the y-axis is drawn. This can be TOP, BOTTOM, CENTER, or SMART.



getYLabel
public String getYLabel()(Code)
Get the label that appears on the y-axis. If the value is null, no label appears.



setAxesColor
public void setAxesColor(Color c)(Code)
Set the color that is used for drawing the axes, when they are drawn in their true position. The default is blue.



setLabelColor
public void setLabelColor(Color c)(Code)
Set the color that is used for drawing the labels (usually the names of the variables) on the x- and y-axes. The default is black.



setLightAxesColor
public void setLightAxesColor(Color c)(Code)
Get the color that is used for drawing an axis, when it is drawn along an edge of the CoordinateRect instead of in its proper x- or y-position. The default is a light blue.



setXAxisPosition
public void setXAxisPosition(int pos)(Code)
Set the positioning constant that tells where the x-axis is drawn. This can be LEFT, RIGHT, CENTER, or SMART. The default is SMART.



setXLabel
public void setXLabel(String s)(Code)
Set the label that appears on the x-axis. If the value is null, no label appears. This is the default.



setYAxisPosition
public void setYAxisPosition(int pos)(Code)
Set the positioning constant that tells where the y-axis is drawn. This can be TOP, BOTTOM, CENTER, or SMART. The default is SMART.



setYLabel
public void setYLabel(String s)(Code)
Set the label that appears on the y-axis. If the value is null, no label appears. This is the default.



setup
void setup(FontMetrics fm, double xmin, double xmax, double ymin, double ymax, int left, int top, int width, int height, int gap)(Code)



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.