|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.strbio.util.graph.ClickablePointPlot
public class ClickablePointPlot
A component that acts like it's displaying points, but only circles the one that's been clicked on. Also, a callback function in ClickListener gets called when the point is clicked. It should be overlayed with a PointPlot or PointColorPlot to work.
Version 1.0, 5/14/99 - original version.
| Nested Class Summary | |
|---|---|
static interface |
ClickablePointPlot.ClickListener
This is an interface for things that are interested in knowing when the graph is clicked. |
| Field Summary | |
|---|---|
protected DVectorSet |
points
This is a vector of points to plot. |
protected PointType |
ptype
type of point to draw. |
| Constructor Summary | |
|---|---|
ClickablePointPlot(DVectorSet x,
ClickablePointPlot.ClickListener y)
initialize with a set of points. |
|
| Method Summary | |
|---|---|
void |
clicked(double x,
double y)
this method gets called by Graph2D when the graph is clicked on. |
Legend |
getLegend()
there is no legend for this type of graph. |
DVectorSet |
getPoints()
Returns a pointer to the points being drawn. |
double |
maxX()
maximum x value that will be graphed. |
double |
maxY()
maximum y value that will be graphed. |
double |
minX()
minimum x value that will be graphed. |
double |
minY()
minimum y value that will be graphed. |
void |
paintGraph(java.awt.Graphics g,
java.awt.Rectangle r,
Graph2D gr)
draw the graph, in a given rectangle. |
void |
setListener(ClickablePointPlot.ClickListener l)
|
void |
setPoints(DVectorSet x)
Sets the points being drawn. |
void |
setPointType(PointType pt)
Set point type to draw. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DVectorSet points
protected PointType ptype
| Constructor Detail |
|---|
public ClickablePointPlot(DVectorSet x,
ClickablePointPlot.ClickListener y)
| Method Detail |
|---|
public void setListener(ClickablePointPlot.ClickListener l)
public DVectorSet getPoints()
public Legend getLegend()
getLegend in interface Graphable2Dpublic void setPoints(DVectorSet x)
public double minX()
Graphable2D
minX in interface Graphable2Dpublic double minY()
Graphable2D
minY in interface Graphable2Dpublic double maxX()
Graphable2D
maxX in interface Graphable2Dpublic double maxY()
Graphable2D
maxY in interface Graphable2Dpublic void setPointType(PointType pt)
public void clicked(double x,
double y)
clicked in interface Graph2D.ClickListener
public void paintGraph(java.awt.Graphics g,
java.awt.Rectangle r,
Graph2D gr)
Graphable2D
paintGraph in interface Graphable2D
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||