|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.rosuda.ibase.toolkit.PlotComponent org.rosuda.ibase.toolkit.PGSCanvas org.rosuda.ibase.toolkit.BaseCanvas org.rosuda.ibase.plots.ScatterCanvas
public class ScatterCanvas
implementation of scatterplots
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.rosuda.ibase.toolkit.PGSCanvas |
---|
PGSCanvas.IDlgCL |
Field Summary | |
---|---|
boolean |
bgTopOnly
Deprecated. only used by klimt |
int |
changePtDiamBy
The number of pixels the point diameter should be changed when in-/decreasing it. |
java.awt.Color |
COL_CUSTOMBG
Custom background color. |
boolean |
customFieldBg
|
protected boolean |
drag
|
boolean |
drawAxes
Whether axes shoud be drawn. |
protected int[] |
filter
|
protected int |
H
|
protected java.awt.MenuItem |
MIlabels
|
int |
minimalDiam
minimal point diameter |
int |
ptDiam
diameter of a point |
protected int |
pts
# of points |
protected boolean |
showLabels
flag whether axis labels should be shown |
protected java.util.TreeMap |
sortedPointsX
sorted set of the points, used to check with log(n) time cost if a point belongs to an existing primitive |
protected java.util.TreeMap |
sortedPointsY
sorted set of the points, used to check with log(n) time cost if a point belongs to an existing primitive |
protected int |
TH
|
protected int |
TW
|
protected SVar[] |
v
array of two variables (X and Y) |
protected int |
W
|
protected int |
x1
|
protected int |
x2
|
protected int |
Y
|
protected int |
y1
|
protected int |
y2
|
protected boolean |
zoomRetainsAspect
|
Fields inherited from class org.rosuda.ibase.toolkit.PGSCanvas |
---|
ax, ay, cancel, desc, inProgress, intDlg, myFrame, pageFormat, paintLayerCounter, pm |
Fields inherited from class org.rosuda.ibase.toolkit.PlotComponent |
---|
AWTGrDevID, GrDevID, JOGLGrDevID, layers, SWINGGrDevID |
Fields inherited from interface java.awt.print.Printable |
---|
NO_SUCH_PAGE, PAGE_EXISTS |
Constructor Summary | |
---|---|
ScatterCanvas(int gd,
java.awt.Frame f,
SVar v1,
SVar v2,
SMarker mark)
create a new scatterplot |
Method Summary | |
---|---|
protected java.lang.String |
getAxisQuery(int x,
int y)
|
SVar |
getData(int id)
this method provides an API to fetch data contents of the plot. |
protected PlotPrimitive |
getFirstPrimitiveContaining(int x,
int y)
Determine the first plot primitive containing the given point. |
protected Axis |
getMouseOverAxis(int x,
int y)
|
protected PlotPrimitive[] |
getPrimitivesContaining(int x,
int y)
Determine the plot primitives containing the given point. |
protected PlotPrimitive[] |
getPrimitivesIntersecting(java.awt.Rectangle rec)
Determine the plot primitives intersecting the given rectangle. |
double |
getSpaceprop()
Get the amount of space around the data points. |
void |
keyPressed(java.awt.event.KeyEvent e)
|
void |
mouseMoved(java.awt.event.MouseEvent ev)
|
void |
paintBack(PoGraSS g)
|
void |
paintPost(PoGraSS g)
|
java.lang.String |
queryObject(PlotPrimitive p)
|
java.lang.String |
queryPlotSpace()
|
void |
rotate()
|
java.lang.Object |
run(java.lang.Object o,
java.lang.String cmd)
default handing of commands "exportPGS" and "exportPS". |
void |
setEquiscale(boolean equiscale)
|
void |
setFilter(int[] f)
Deprecated. |
void |
setFilter(java.util.Vector v)
Deprecated. |
void |
setSpaceprop(double SPACEPROP)
Sets the amount of space around the data points. 1.0 means no space, 1.5 means half as much space around the data as is used for the data itself. |
void |
updateObjects()
rebuilds plot primitives - subclasses should override this method. |
Methods inherited from class org.rosuda.ibase.toolkit.BaseCanvas |
---|
actionPerformed, addXLabels, addXLabels, addXLabels, addXLabels, addYLabels, addYLabels, addYLabels, adjustMargin, createMenu, dispose, endAddingLabels, getAxisX, getAxisY, getBoundValues, getDefaultMLeft, getMBottom, getMinimumSize, getMLeft, getMRight, getMTop, isShowLabels, keyReleased, keyTyped, mouseClicked, mouseDragged, mouseEntered, mouseExited, mousePressed, mouseReleased, Notifying, paintInit, paintObjects, paintPoGraSS, paintSelected, performZoomIn, performZoomIn, performZoomOut, queryObject, resetZoom, rotate, setAxDefaultGeometry, setAyDefaultGeometry, setColors, setDefaultMargins, setExtQueryString, setMBottom, setMLeft, setMRight, setMTop, setQueryText, setQueryText, setQueryText, setShowLabels, startAddingLabels, useExtQuery |
Methods inherited from class org.rosuda.ibase.toolkit.PGSCanvas |
---|
beginPaint, endPaint, finalize, forcedFlush, getFrame, getGlobalNotifier, getPlotManager, getTitle, getXAxis, getYAxis, nextLayer, paintLayer, print, setFrame, setOption, setOption, setOption, setOption, setOption, setOption, setTitle |
Methods inherited from class org.rosuda.ibase.toolkit.PlotComponent |
---|
addKeyListener, addMouseListener, addMouseMotionListener, getBounds, getComponent, getHeight, getLocation, getParent, getSize, getWidth, newQueryPopup, newQueryPopup, paintLayer, repaint, setBackground, setCursor, setSize, setSize, setToolTipText, setUpdateRoot |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected SVar[] v
protected boolean showLabels
public boolean bgTopOnly
public int ptDiam
public int minimalDiam
public boolean customFieldBg
protected int pts
protected int x1
protected int y1
protected int x2
protected int y2
protected boolean drag
protected java.awt.MenuItem MIlabels
protected int Y
protected int W
protected int H
protected int TW
protected int TH
protected int[] filter
protected boolean zoomRetainsAspect
public java.awt.Color COL_CUSTOMBG
public int changePtDiamBy
public boolean drawAxes
protected java.util.TreeMap sortedPointsX
protected java.util.TreeMap sortedPointsY
Constructor Detail |
---|
public ScatterCanvas(int gd, java.awt.Frame f, SVar v1, SVar v2, SMarker mark)
f
- associated frame (or null
if none)v1
- variable 1v2
- variable 2mark
- associated markerMethod Detail |
---|
public SVar getData(int id)
PGSCanvas
null
is returned.
getData
in class PGSCanvas
public void setFilter(int[] f)
public void setFilter(java.util.Vector v)
public void rotate()
rotate
in class BaseCanvas
public void updateObjects()
BaseCanvas
updateObjects
in class BaseCanvas
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
keyPressed
in class BaseCanvas
public java.lang.Object run(java.lang.Object o, java.lang.String cmd)
PGSCanvas
super.run(o,cmd)
to retain this functionality
run
in interface Commander
run
in class BaseCanvas
o
- origin of the commandcmd
- command string
public void paintBack(PoGraSS g)
paintBack
in class BaseCanvas
public java.lang.String queryObject(PlotPrimitive p)
queryObject
in class BaseCanvas
public java.lang.String queryPlotSpace()
queryPlotSpace
in class BaseCanvas
public void paintPost(PoGraSS g)
paintPost
in class BaseCanvas
protected PlotPrimitive getFirstPrimitiveContaining(int x, int y)
BaseCanvas
getFirstPrimitiveContaining
in class BaseCanvas
protected PlotPrimitive[] getPrimitivesContaining(int x, int y)
BaseCanvas
getPrimitivesContaining
in class BaseCanvas
protected PlotPrimitive[] getPrimitivesIntersecting(java.awt.Rectangle rec)
BaseCanvas
getPrimitivesIntersecting
in class BaseCanvas
public void mouseMoved(java.awt.event.MouseEvent ev)
mouseMoved
in interface java.awt.event.MouseMotionListener
mouseMoved
in class BaseCanvas
protected Axis getMouseOverAxis(int x, int y)
protected java.lang.String getAxisQuery(int x, int y)
getAxisQuery
in class BaseCanvas
public double getSpaceprop()
setSpaceprop(double)
public void setSpaceprop(double SPACEPROP)
updateObjects()
needs to be called afterwards.
SPACEPROP
- New amount of space. Defaults to 1.1.public void setEquiscale(boolean equiscale)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |