org.rosuda.ibase.plots
Class ParallelAxesCanvas

java.lang.Object
  extended by org.rosuda.ibase.toolkit.PlotComponent
      extended by org.rosuda.ibase.toolkit.PGSCanvas
          extended by org.rosuda.ibase.toolkit.BaseCanvas
              extended by org.rosuda.ibase.plots.ParallelAxesCanvas
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.KeyListener, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.print.Printable, java.util.EventListener, Commander, Dependent

public class ParallelAxesCanvas
extends BaseCanvas


Nested Class Summary
 
Nested classes/interfaces inherited from class org.rosuda.ibase.toolkit.PGSCanvas
PGSCanvas.IDlgCL
 
Field Summary
 boolean alterningLabels
           
protected  int[] axcoordX
           
protected  int[] axcoordY
           
protected  int[][] aycoordX
           
protected  int[][] aycoordY
           
 java.awt.Color COL_AXES
           
 boolean isMouseOnHilite
           
static int TYPE_BOX
           
static int TYPE_PCP
           
static int TYPE_PCPBOX
           
 
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, defaultMBottom1, defaultMBottom2, defaultMBottom3, defaultMLeft1, defaultMLeft2, defaultMLeft3, defaultMRight1, defaultMRight2, defaultMRight3, 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
 
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
ParallelAxesCanvas(int gd, java.awt.Frame f, SVar[] yvs, SMarker mark, int type)
          basic constructor.
ParallelAxesCanvas(int gd, java.awt.Frame f, SVar var, SMarker mark, int type)
           
ParallelAxesCanvas(int gd, java.awt.Frame f, SVar var, SVar cvar, SMarker mark, int type)
          create a boxplot canvas for a multiple grouped boxplots side-by-side
 
Method Summary
 boolean adjustMargin(PoGraSS g)
          Possibly adjust mLeft etc.
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.
 java.awt.Dimension getMinimumSize()
           
protected  Axis getMouseOverAxis(int x, int y)
           
 void keyPressed(java.awt.event.KeyEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paintBack(PoGraSS g)
           
 void paintInit(PoGraSS g)
           
 void paintPost(PoGraSS g)
           
 void paintSelected(PoGraSS g)
           
 void performZoomIn(int x1, int y1, int x2, int y2)
           
 java.lang.String queryObject(PlotPrimitive p)
           
 java.lang.String queryPlotSpace()
           
protected  void resetAxesCoord()
           
 void resetZoom()
           
 void rotate(int amount)
           
 java.lang.Object run(java.lang.Object o, java.lang.String cmd)
          default handing of commands "exportPGS" and "exportPS".
 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, createMenu, dispose, endAddingLabels, getAxisX, getAxisY, getBoundValues, getDefaultMLeft, getFirstPrimitiveContaining, getMBottom, getMLeft, getMRight, getMTop, getPrimitivesContaining, getPrimitivesIntersecting, isShowLabels, keyReleased, keyTyped, mouseClicked, mouseEntered, mouseExited, mousePressed, Notifying, paintObjects, paintPoGraSS, performZoomIn, performZoomOut, queryObject, 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

TYPE_PCP

public static final int TYPE_PCP
See Also:
Constant Field Values

TYPE_BOX

public static final int TYPE_BOX
See Also:
Constant Field Values

TYPE_PCPBOX

public static final int TYPE_PCPBOX
See Also:
Constant Field Values

alterningLabels

public boolean alterningLabels

COL_AXES

public java.awt.Color COL_AXES

isMouseOnHilite

public boolean isMouseOnHilite

axcoordX

protected int[] axcoordX

axcoordY

protected int[] axcoordY

aycoordX

protected int[][] aycoordX

aycoordY

protected int[][] aycoordY
Constructor Detail

ParallelAxesCanvas

public ParallelAxesCanvas(int gd,
                          java.awt.Frame f,
                          SVar var,
                          SVar cvar,
                          SMarker mark,
                          int type)
create a boxplot canvas for a multiple grouped boxplots side-by-side

Parameters:
f - associated frame (or null if none)
var - source numerical variable
cvar - categorical variable for grouping
mark - associated marker

ParallelAxesCanvas

public ParallelAxesCanvas(int gd,
                          java.awt.Frame f,
                          SVar var,
                          SMarker mark,
                          int type)
Parameters:
f - associated frame (or null if none)
var - source variable
mark - associated marker

ParallelAxesCanvas

public ParallelAxesCanvas(int gd,
                          java.awt.Frame f,
                          SVar[] yvs,
                          SMarker mark,
                          int type)
basic constructor. Every subclass must call this constructor

Parameters:
f - frame owning this canvas. since BaseCanvas itself doesn't modify any attribute of the frame except for title it is possible to put more canvases into one frame. This doesn't have to hold for subclasses, especially those providing their own menus.
mark - marker which will be used for selection/linked highlighting
Method Detail

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Specified by:
keyPressed in interface java.awt.event.KeyListener
Overrides:
keyPressed in class BaseCanvas

run

public java.lang.Object run(java.lang.Object o,
                            java.lang.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 command
cmd - command string
Returns:
any object, the actual interpretation is up to the calling object

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

performZoomIn

public void performZoomIn(int x1,
                          int y1,
                          int x2,
                          int y2)
Overrides:
performZoomIn in class BaseCanvas

resetZoom

public void resetZoom()
Overrides:
resetZoom in class BaseCanvas

paintBack

public void paintBack(PoGraSS g)
Overrides:
paintBack in class BaseCanvas

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

paintInit

public void paintInit(PoGraSS g)
Overrides:
paintInit in class BaseCanvas

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent e)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class BaseCanvas

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent e)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class BaseCanvas

getMinimumSize

public java.awt.Dimension getMinimumSize()
Overrides:
getMinimumSize in class BaseCanvas

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

paintPost

public void paintPost(PoGraSS g)
Overrides:
paintPost in class BaseCanvas

queryObject

public java.lang.String queryObject(PlotPrimitive p)
Overrides:
queryObject in class BaseCanvas

queryPlotSpace

public java.lang.String queryPlotSpace()
Overrides:
queryPlotSpace in class BaseCanvas

rotate

public void rotate(int amount)
Overrides:
rotate in class BaseCanvas

paintSelected

public void paintSelected(PoGraSS g)
Overrides:
paintSelected in class BaseCanvas

getMouseOverAxis

protected Axis getMouseOverAxis(int x,
                                int y)

getAxisQuery

protected java.lang.String getAxisQuery(int x,
                                        int y)
Overrides:
getAxisQuery in class BaseCanvas

resetAxesCoord

protected void resetAxesCoord()

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent e)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class BaseCanvas