org.rosuda.ibase.plots
Class HistCanvas
java.lang.Object
org.rosuda.ibase.toolkit.PlotComponent
org.rosuda.ibase.toolkit.PGSCanvas
org.rosuda.ibase.toolkit.BaseCanvas
org.rosuda.ibase.plots.HistCanvas
- All Implemented Interfaces:
- ActionListener, KeyListener, MouseListener, MouseMotionListener, Printable, EventListener, Commander, Dependent
- Direct Known Subclasses:
- HistCanvasEx
public class HistCanvas
- extends BaseCanvas
implementation of histograms (new version - based on BaseCanvas).
- Version:
- $Id: HistCanvas.java,v 1.54 2006/10/10 18:59:31 urbaneks Exp $
| Fields inherited from class org.rosuda.ibase.toolkit.BaseCanvas |
allow180, allowDragMove, allowDragZoom, allowZoom, alphaHighlighting, autoAdjustMargins, baseDrag, baseDragX1, baseDragX2, baseDragY1, baseDragY2, borderColor, borderColorSel, C_BLACK, changingHilitingNeedsUpdateRoot, COL_INVALID, COL_OUTLINE, COL_SELBG, COL_ZOOMBG, defaultMBottom, defaultMBottom1, defaultMBottom2, defaultMBottom3, defaultMLeft, defaultMLeft1, defaultMLeft2, defaultMLeft3, defaultMRight, defaultMRight1, defaultMRight2, defaultMRight3, defaultMTop, defaultMTop1, defaultMTop2, defaultMTop3, dontCache, dontPaint, fillColor, fillColorSel, fillInside, H, horizontalMedDist, horizontalMinDist, ignoreNotifications, inQuery, inZoom, isExtQuery, lastQueriedIndex, lastQueriedPrimitive, m, M_ALPHADOWN, M_ALPHAUP, M_RESETZOOM, M_SETCB1, M_SETCB64, M_TRANSHIGHL, mBottom, MItransHighl, mLeft, mouseX, mouseY, moveDrag, mRight, mTop, objectClipping, opAx, opAy, orientation, paintOutline, pop, pp, ppAlpha, ppAlphaH, qi, queryables, resizeOnRotate, rotateYLabels, rotateYLabelsBy, selDrag, selectedPaintOutline, seperateAlphas, showOnlyHilited, showQuery, updateGeometry, verticalMedDist, verticalMinDist, W, xLabels, yLabels, zoomDrag, zoomRetainsAspect, zoomSequence |
| Methods inherited from class org.rosuda.ibase.toolkit.BaseCanvas |
actionPerformed, addXLabels, addXLabels, addXLabels, addXLabels, addYLabels, addYLabels, addYLabels, createMenu, endAddingLabels, getBoundValues, getDefaultMLeft, getFirstPrimitiveContaining, getMBottom, getMinimumSize, getMLeft, getMRight, getMTop, getPrimitivesContaining, getPrimitivesIntersecting, isShowLabels, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, Notifying, paintInit, paintObjects, paintPoGraSS, paintSelected, performZoomIn, performZoomIn, performZoomOut, queryObject, resetZoom, rotate, 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 |
v
protected SVar v
- associated variable
spinovar
protected SVar spinovar
- variable for spinograms
anchor
public double anchor
binw
public double binw
dragMode
protected int dragMode
dragX
protected int dragX
dragBinwBars
protected int dragBinwBars
bars
protected int bars
autoScaleXAxis
public boolean autoScaleXAxis
autoScaleYAxis
public boolean autoScaleYAxis
HistCanvas
public HistCanvas(int gd,
Frame f,
SVar var,
SMarker mark)
- creates a new histogram canvas
- Parameters:
f - frame owning this canvas or null if nonevar - source variablemark - associated marker
getData
public SVar getData(int id)
- Description copied from class:
PGSCanvas
- this method provides an API to fetch data contents of the plot. The id is implementation-dependent, but first two variables x and y should be mapped to 0 and 1 correspondingly. Therefore every plot containting data must support getData(0). For invalid ids
null is returned.
- Overrides:
getData in class PGSCanvas
updateObjects
public void updateObjects()
- Description copied from class:
BaseCanvas
- rebuilds plot primitives - subclasses should override this method. It is not defined as abstract only for convenience, but minimal subclass simply overrides this method.
- Overrides:
updateObjects in class BaseCanvas
paintBack
public void paintBack(PoGraSS g)
- Overrides:
paintBack in class BaseCanvas
paintPost
public void paintPost(PoGraSS g)
- Overrides:
paintPost in class BaseCanvas
mousePressed
public void mousePressed(MouseEvent ev)
- Specified by:
mousePressed in interface MouseListener- Overrides:
mousePressed in class BaseCanvas
mouseMoved
public void mouseMoved(MouseEvent ev)
- Specified by:
mouseMoved in interface MouseMotionListener- Overrides:
mouseMoved in class BaseCanvas
mouseReleased
public void mouseReleased(MouseEvent e)
- Specified by:
mouseReleased in interface MouseListener- Overrides:
mouseReleased in class BaseCanvas
mouseDragged
public void mouseDragged(MouseEvent e)
- Specified by:
mouseDragged in interface MouseMotionListener- Overrides:
mouseDragged in class BaseCanvas
queryObject
public String queryObject(int i)
- Overrides:
queryObject in class BaseCanvas
queryPlotSpace
public String queryPlotSpace()
- Overrides:
queryPlotSpace in class BaseCanvas
keyPressed
public void keyPressed(KeyEvent e)
- Specified by:
keyPressed in interface KeyListener- Overrides:
keyPressed in class BaseCanvas
run
public Object run(Object o,
String cmd)
- Description copied from class:
PGSCanvas
- default handing of commands "exportPGS" and "exportPS". Any descendant should
call
super.run(o,cmd) to retain this functionality
- Specified by:
run in interface Commander- Overrides:
run in class BaseCanvas
- Parameters:
o - origin of the commandcmd - command string
- Returns:
- any object, the actual interpretation is up to the calling object
getMouseOverAxis
protected Axis getMouseOverAxis(int x,
int y)
getAxisQuery
protected String getAxisQuery(int x,
int y)
- Overrides:
getAxisQuery in class BaseCanvas
setIsSpine
public void setIsSpine(boolean isSpine)
adjustMargin
public boolean adjustMargin(PoGraSS g)
- Description copied from class:
BaseCanvas
- Possibly adjust mLeft etc.
- Overrides:
adjustMargin in class BaseCanvas
- Returns:
- Returns
true if margins have been changed