class Axes { // private float x0,y0,wd,ht; // sreen location float xdmin=0, xdmax=1, ydmin=0, ydmax=1, zdmin=0, zdmax=1; // data ranges String topLabel, bottomLabel, leftLabel, rightLabel; boolean largeTopLabel = false; String[] topTickLabels, bottomTickLabels, leftTickLabels, rightTickLabels; float[] topTicks, bottomTicks, leftTicks, rightTicks; float leftLabelOffset=0, rightLabelOffset=0, topLabelOffset=0, bottomLabelOffset=0; color col = color(0); float fontSize = 12; AxesCell[][] cells; // public float[] horizGrid, vertGrid; boolean gridOn = true, gridOnTop = true; boolean axesOn = true; boolean labelsOn = true, labelsOnTop = true; color bkgndColor = color(255,0); color gridColor = color(255); color[] colormap; // style info Stylesheet styles = masterStylesheet; // really this should be inherited Axes() {} Axes(float[] rect) { setPosition(rect[0], rect[1], rect[2], rect[3]); } Axes(float x0, float y0, float wd, float ht) { setPosition(x0,y0,wd,ht); } void setPosition(float x0, float y0, float wd, float ht) { this.x0 = x0; this.y0 = y0; this.wd = wd; this.ht = ht; } void setAppearance(color col, float fontSize) { this.col = col; this.fontSize = fontSize; } void setXRange(float xdmin, float xdmax) { this.xdmin = xdmin; this.xdmax = xdmax; } void setYRange(float ydmin, float ydmax) { this.ydmin = ydmin; this.ydmax = ydmax; } void setZRange(float zdmin, float zdmax) { this.zdmin = zdmin; this.zdmax = zdmax; } void setLabels(String where, String label) { if (where.equals("left") || where.equals("left of origin") || where.equals("right") || where.equals("right of origin")) { setLabels(where, label, horizGrid); } else { setLabels(where, label, vertGrid); } } void setLabels(String where, String label, float[] ticks) { String[] tickLabels = null; if (ticks != null) { tickLabels = new String[ticks.length]; for (int i=0; i= left() && mouseX <= right() && mouseY >= top() && mouseY <= bottom()); } int[] overWhich() { if (cells==null) return new int[] {-1, -1}; for (int j=0; j left() && mouseX < right() && mouseY > top() && mouseY < bottom(); } }