All Packages  Class Hierarchy  This Package  Previous  Next  Index

Interface crw.data2.AxisCoor

public interface AxisCoor
Interface that needs be implemented by any class that needs to provide a dynamically changing screen position information to the Axis objects. This interface is used as a reference type in the Axis2 class. A possible implementation is:
	
	class XCoor implements AxisCoor {
			private int[] location;
			public XCoor() {
				location = new int[3];
			}
			public void change() {
				for (int i=0; i


Method Index

 o getCoordinate(int)
Returns the screen position information for drawing Axis.

Methods

 o getCoordinate
 public abstract int getCoordinate(int indexID)
Returns the screen position information for drawing Axis. The class may need to provide position for several different axes; thus the int argument i is used to separately provide different axes locations. If the axis is an x-axis, then location info may be axis's y-coordinate, beginning x, or the ending x coordinate. If int[] location is used to hold the location information of several axes, then a possible implementation is
	public int getCoordinate(int i) {
		if (i < location.length)
			return location[i];
		else 
			return 10;
	}
 

Parameters:
indexID - index of the chosen axis. Application programs must make sure that this method returns proper axis coordinates for the Axis.

All Packages  Class Hierarchy  This Package  Previous  Next  Index