org.math.plot
Class PlotPanel
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.math.plot.PlotPanel
- All Implemented Interfaces:
- ImageObserver, MenuContainer, Serializable, Accessible
- Direct Known Subclasses:
- Plot2DPanel, Plot3DPanel
public abstract class PlotPanel
- extends JPanel
BSD License
- Author:
- Yann RICHET
- See Also:
- Serialized Form
Method Summary |
void |
addBaseLabel(String text,
Color c,
double... where)
|
void |
addLabel(String text,
Color c,
double... where)
|
void |
addLegend(String o)
|
int |
addPlot(Plot newPlot)
|
abstract int |
addPlot(String type,
String name,
Color c,
double[]... v)
|
int |
addPlot(String type,
String name,
double[]... v)
|
void |
addPlotable(Plotable p)
|
void |
addPlotToolBar(String o)
|
void |
addQuantiletoPlot(int numPlot,
double[]... q)
|
void |
addQuantiletoPlot(int numPlot,
int numAxe,
double... q)
|
void |
addQuantiletoPlot(int numPlot,
int numAxe,
double q)
|
void |
changePlotColor(int I,
Color c)
|
void |
changePlotData(int I,
double[]... XY)
|
void |
changePlotName(int I,
String name)
|
Axe |
getAxe(int i)
|
String[] |
getAxesScales()
|
boolean |
getEditable()
|
protected Color |
getNewColor()
|
boolean |
getNotable()
|
Plot |
getPlot(int i)
|
Plotable |
getPlotable(int i)
|
Plotable[] |
getPlotables()
|
int |
getPlotIndex(Plot p)
|
Plot[] |
getPlots()
|
void |
includeInBounds(double... into)
|
void |
includeInBounds(Plot plot)
|
static void |
main(String[] args)
|
void |
removeAllPlots()
|
void |
removeLegend()
|
void |
removePlot(int I)
|
void |
removePlot(Plot p)
|
void |
removePlotable(int i)
|
void |
removePlotable(Plotable p)
|
void |
removePlotToolBar()
|
void |
setActionMode(int am)
|
void |
setAutoBounds()
|
void |
setAutoBounds(int axe)
|
void |
setAxeLabel(int axe,
String label)
|
void |
setAxeScale(int axe,
String scale)
|
void |
setAxesLabels(String... labels)
|
void |
setAxesScales(String... scales)
|
void |
setEditable(boolean b)
|
void |
setFixedBounds(double[] min,
double[] max)
|
void |
setFixedBounds(int axe,
double min,
double max)
|
void |
setLegendOrientation(String o)
|
void |
setNotable(boolean b)
|
void |
setNoteCoords(boolean b)
|
void |
setPlot(int I,
Plot p)
|
void |
setPlotToolBarOrientation(String o)
|
void |
toGraphicFile(File file)
|
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, 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, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, 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, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, 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 |
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
plotToolBar
public PlotToolBar plotToolBar
plotCanvas
public PlotCanvas plotCanvas
plotLegend
public LegendPanel plotLegend
EAST
public static final String EAST
- See Also:
- Constant Field Values
SOUTH
public static final String SOUTH
- See Also:
- Constant Field Values
NORTH
public static final String NORTH
- See Also:
- Constant Field Values
WEST
public static final String WEST
- See Also:
- Constant Field Values
INVISIBLE
public static final String INVISIBLE
- See Also:
- Constant Field Values
SCATTER
public static final String SCATTER
- See Also:
- Constant Field Values
LINE
public static final String LINE
- See Also:
- Constant Field Values
BAR
public static final String BAR
- See Also:
- Constant Field Values
HISTOGRAM
public static final String HISTOGRAM
- See Also:
- Constant Field Values
BOX
public static final String BOX
- See Also:
- Constant Field Values
STAIRCASE
public static final String STAIRCASE
- See Also:
- Constant Field Values
GRID
public static final String GRID
- See Also:
- Constant Field Values
COLORLIST
public static final Color[] COLORLIST
PlotPanel
public PlotPanel(PlotCanvas _canvas,
String legendOrientation)
PlotPanel
public PlotPanel(PlotCanvas _canvas)
addLegend
public void addLegend(String o)
removeLegend
public void removeLegend()
setLegendOrientation
public void setLegendOrientation(String o)
addPlotToolBar
public void addPlotToolBar(String o)
removePlotToolBar
public void removePlotToolBar()
setPlotToolBarOrientation
public void setPlotToolBarOrientation(String o)
setActionMode
public void setActionMode(int am)
setNoteCoords
public void setNoteCoords(boolean b)
setEditable
public void setEditable(boolean b)
getEditable
public boolean getEditable()
setNotable
public void setNotable(boolean b)
getNotable
public boolean getNotable()
getPlots
public Plot[] getPlots()
getPlot
public Plot getPlot(int i)
getPlotIndex
public int getPlotIndex(Plot p)
getPlotables
public Plotable[] getPlotables()
getPlotable
public Plotable getPlotable(int i)
getAxe
public Axe getAxe(int i)
getAxesScales
public String[] getAxesScales()
setAxesLabels
public void setAxesLabels(String... labels)
setAxeLabel
public void setAxeLabel(int axe,
String label)
setAxesScales
public void setAxesScales(String... scales)
setAxeScale
public void setAxeScale(int axe,
String scale)
setFixedBounds
public void setFixedBounds(double[] min,
double[] max)
setFixedBounds
public void setFixedBounds(int axe,
double min,
double max)
includeInBounds
public void includeInBounds(double... into)
includeInBounds
public void includeInBounds(Plot plot)
setAutoBounds
public void setAutoBounds()
setAutoBounds
public void setAutoBounds(int axe)
addLabel
public void addLabel(String text,
Color c,
double... where)
addBaseLabel
public void addBaseLabel(String text,
Color c,
double... where)
addPlotable
public void addPlotable(Plotable p)
removePlotable
public void removePlotable(Plotable p)
removePlotable
public void removePlotable(int i)
addPlot
public int addPlot(Plot newPlot)
getNewColor
protected Color getNewColor()
addPlot
public int addPlot(String type,
String name,
double[]... v)
addPlot
public abstract int addPlot(String type,
String name,
Color c,
double[]... v)
setPlot
public void setPlot(int I,
Plot p)
changePlotData
public void changePlotData(int I,
double[]... XY)
changePlotName
public void changePlotName(int I,
String name)
changePlotColor
public void changePlotColor(int I,
Color c)
removePlot
public void removePlot(int I)
removePlot
public void removePlot(Plot p)
removeAllPlots
public void removeAllPlots()
addQuantiletoPlot
public void addQuantiletoPlot(int numPlot,
double[]... q)
addQuantiletoPlot
public void addQuantiletoPlot(int numPlot,
int numAxe,
double... q)
addQuantiletoPlot
public void addQuantiletoPlot(int numPlot,
int numAxe,
double q)
toGraphicFile
public void toGraphicFile(File file)
throws IOException
- Throws:
IOException
main
public static void main(String[] args)