org.jmat.gui
Class PlotPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--javax.swing.JComponent
                    |
                    +--javax.swing.JPanel
                          |
                          +--org.jmat.gui.PlotPanel
All Implemented Interfaces:
javax.accessibility.Accessible, BaseScalesDependant, java.awt.event.ComponentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.io.Serializable
Direct Known Subclasses:
Plot2DPanel, Plot3DPanel

public abstract class PlotPanel
extends javax.swing.JPanel
implements java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.ComponentListener, BaseScalesDependant

See Also:
Serialized Form

Field Summary
 int ActionMode
           
static java.lang.String BAR
           
protected  Base base
           
static java.lang.String BOX
           
static java.awt.Color[] colorList
           
protected  Grid grid
           
static java.lang.String HISTOGRAM
           
static java.lang.String LINE
           
static int LINEAR
           
static int LOG
           
protected  int[] mouseClick
           
protected  int[] mouseCurent
           
protected  java.util.Vector objects
           
static int[] panelSize
           
protected  java.util.Vector plots
           
static java.lang.String SCATTER
           
static java.lang.String STAIRCASE
           
 PlotToolBar toolBar
           
static int TRANSLATION
           
static int ZOOM
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Container
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
PlotPanel()
          create local toolbar
PlotPanel(double[] min, double[] max)
           
PlotPanel(double[] min, double[] max, int[] axesScales, java.lang.String[] axesLabels)
           
 
Method Summary
 void addBaseLabel(java.lang.String text, double[] where, java.awt.Color c)
           
 void addLabel(java.lang.String text, Coord where, java.awt.Color c)
           
 void addLabel(java.lang.String text, double[] where, java.awt.Color c)
           
 void addPlot(AbstractMatrix XY, java.lang.String name, java.lang.String type)
           
abstract  void addPlot(AbstractMatrix XY, java.lang.String name, java.lang.String type, java.awt.Color c)
           
 void addPlot(Plot newPlot)
           
 void addPlotable(Plotable p)
           
 void componentHidden(java.awt.event.ComponentEvent e)
           
 void componentMoved(java.awt.event.ComponentEvent e)
           
 void componentResized(java.awt.event.ComponentEvent e)
           
 void componentShown(java.awt.event.ComponentEvent e)
           
 void displayDatasFrame()
           
 void displaySetScalesFrame()
           
 int[] getAxesScales()
           
 Base getBase()
           
 Grid getGrid()
           
 Plotable getObject(int i)
           
 Plotable[] getObjects()
           
 Plot getPlot(int i)
           
 Plot[] getPlots()
           
abstract  void initBasenGrid()
           
abstract  void initBasenGrid(double[] min, double[] max)
           
abstract  void initBasenGrid(double[] min, double[] max, int[] axesScales, java.lang.String[] axesLabels)
           
 void mouseClicked(java.awt.event.MouseEvent e)
           
 void mouseDragged(java.awt.event.MouseEvent e)
           
 void mouseEntered(java.awt.event.MouseEvent e)
           
 void mouseExited(java.awt.event.MouseEvent e)
           
 void mouseMoved(java.awt.event.MouseEvent e)
           
 void mousePressed(java.awt.event.MouseEvent e)
           
 void mouseReleased(java.awt.event.MouseEvent e)
           
 void paint(java.awt.Graphics comp)
           
 void removeAllPlots()
           
 void removePlot(int I)
           
 void removePlot(Plot p)
           
 void removePlotable(int i)
           
 void removePlotable(Plotable p)
           
 void resetBase()
           
 void setActionMode(int am)
           
 void setAutoBounds()
           
 void setAutoBounds(int axe)
           
 void setAxeLabel(int axe, java.lang.String label)
           
 void setAxeScale(int axe, int scale)
           
 void setAxesLabels(java.lang.String[] labels)
           
 void setAxesScales(int[] scales)
           
 void setFixedBounds(double[] min, double[] max)
           
 void setFixedBounds(int axe, double min, double max)
           
 void setNoteCoords(boolean b)
           
 void toGraphicFile(java.io.File file)
           
 void updateBase()
           
 
Methods inherited from class javax.swing.JPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ZOOM

public static final int ZOOM
See Also:
Constant Field Values

TRANSLATION

public static final int TRANSLATION
See Also:
Constant Field Values

LINEAR

public static final int LINEAR
See Also:
Constant Field Values

LOG

public static final int LOG
See Also:
Constant Field Values

SCATTER

public static final java.lang.String SCATTER
See Also:
Constant Field Values

LINE

public static final java.lang.String LINE
See Also:
Constant Field Values

BAR

public static final java.lang.String BAR
See Also:
Constant Field Values

HISTOGRAM

public static final java.lang.String HISTOGRAM
See Also:
Constant Field Values

BOX

public static final java.lang.String BOX
See Also:
Constant Field Values

STAIRCASE

public static final java.lang.String STAIRCASE
See Also:
Constant Field Values

colorList

public static java.awt.Color[] colorList

panelSize

public static int[] panelSize

base

protected Base base

grid

protected Grid grid

plots

protected java.util.Vector plots

objects

protected java.util.Vector objects

ActionMode

public int ActionMode

mouseCurent

protected int[] mouseCurent

mouseClick

protected int[] mouseClick

toolBar

public PlotToolBar toolBar
Constructor Detail

PlotPanel

public PlotPanel()
create local toolbar


PlotPanel

public PlotPanel(double[] min,
                 double[] max)

PlotPanel

public PlotPanel(double[] min,
                 double[] max,
                 int[] axesScales,
                 java.lang.String[] axesLabels)
Method Detail

setActionMode

public void setActionMode(int am)

setNoteCoords

public void setNoteCoords(boolean b)

initBasenGrid

public abstract void initBasenGrid(double[] min,
                                   double[] max,
                                   int[] axesScales,
                                   java.lang.String[] axesLabels)

initBasenGrid

public abstract void initBasenGrid(double[] min,
                                   double[] max)

initBasenGrid

public abstract void initBasenGrid()

resetBase

public void resetBase()

getBase

public Base getBase()

getPlots

public Plot[] getPlots()

getPlot

public Plot getPlot(int i)

getObjects

public Plotable[] getObjects()

getObject

public Plotable getObject(int i)

getGrid

public Grid getGrid()

getAxesScales

public int[] getAxesScales()

setAxesLabels

public void setAxesLabels(java.lang.String[] labels)

setAxeLabel

public void setAxeLabel(int axe,
                        java.lang.String label)

setAxesScales

public void setAxesScales(int[] scales)

setAxeScale

public void setAxeScale(int axe,
                        int scale)

setFixedBounds

public void setFixedBounds(double[] min,
                           double[] max)

setFixedBounds

public void setFixedBounds(int axe,
                           double min,
                           double max)

setAutoBounds

public void setAutoBounds()

setAutoBounds

public void setAutoBounds(int axe)

updateBase

public void updateBase()
Specified by:
updateBase in interface BaseScalesDependant

addLabel

public void addLabel(java.lang.String text,
                     double[] where,
                     java.awt.Color c)

addLabel

public void addLabel(java.lang.String text,
                     Coord where,
                     java.awt.Color c)

addBaseLabel

public void addBaseLabel(java.lang.String text,
                         double[] where,
                         java.awt.Color c)

addPlotable

public void addPlotable(Plotable p)

removePlotable

public void removePlotable(Plotable p)

removePlotable

public void removePlotable(int i)

addPlot

public void addPlot(Plot newPlot)

addPlot

public void addPlot(AbstractMatrix XY,
                    java.lang.String name,
                    java.lang.String type)

addPlot

public abstract void addPlot(AbstractMatrix XY,
                             java.lang.String name,
                             java.lang.String type,
                             java.awt.Color c)

removePlot

public void removePlot(int I)

removePlot

public void removePlot(Plot p)

removeAllPlots

public void removeAllPlots()

toGraphicFile

public void toGraphicFile(java.io.File file)

displaySetScalesFrame

public void displaySetScalesFrame()

displayDatasFrame

public void displayDatasFrame()

paint

public void paint(java.awt.Graphics comp)
Overrides:
paint in class javax.swing.JComponent

mouseDragged

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

mousePressed

public void mousePressed(java.awt.event.MouseEvent e)
Specified by:
mousePressed in interface java.awt.event.MouseListener

mouseClicked

public void mouseClicked(java.awt.event.MouseEvent e)
Specified by:
mouseClicked in interface java.awt.event.MouseListener

mouseReleased

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

mouseEntered

public void mouseEntered(java.awt.event.MouseEvent e)
Specified by:
mouseEntered in interface java.awt.event.MouseListener

mouseExited

public void mouseExited(java.awt.event.MouseEvent e)
Specified by:
mouseExited in interface java.awt.event.MouseListener

mouseMoved

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

componentHidden

public void componentHidden(java.awt.event.ComponentEvent e)
Specified by:
componentHidden in interface java.awt.event.ComponentListener

componentMoved

public void componentMoved(java.awt.event.ComponentEvent e)
Specified by:
componentMoved in interface java.awt.event.ComponentListener

componentResized

public void componentResized(java.awt.event.ComponentEvent e)
Specified by:
componentResized in interface java.awt.event.ComponentListener

componentShown

public void componentShown(java.awt.event.ComponentEvent e)
Specified by:
componentShown in interface java.awt.event.ComponentListener