public abstract class PlotPanel extends JPanel
JPanel.AccessibleJPanelJComponent.AccessibleJComponentContainer.AccessibleAWTContainerComponent.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy| Modifier and Type | Field and Description |
|---|---|
static String |
BAR |
static String |
BOX |
static Color[] |
COLORLIST |
static String |
EAST |
static String |
GRID |
static String |
HISTOGRAM |
static String |
INVISIBLE |
static String |
LINE |
static String |
NORTH |
PlotCanvas |
plotCanvas |
LegendPanel |
plotLegend |
PlotToolBar |
plotToolBar |
static String |
SCATTER |
static String |
SOUTH |
static String |
STAIRCASE |
static String |
WEST |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOWaccessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH| Constructor and Description |
|---|
PlotPanel(PlotCanvas _canvas) |
PlotPanel(PlotCanvas _canvas,
String legendOrientation) |
| Modifier and Type | Method and Description |
|---|---|
void |
addBaseLabel(String text,
Color c,
double... where) |
void |
addGaussQuantilestoPlot(int numPlot,
int numAxe,
double s) |
void |
addGaussQuantilestoPlot(int numPlot,
int numAxe,
double[] s) |
void |
addLabel(String text,
Color c,
double... where) |
void |
addLegend(String location)
Defines where the legend of the plot should be added to the plot
panel.
|
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 location)
Adds a new plot toolbar to the specified location.
|
void |
addQuantilestoPlot(int numPlot,
int numAxe,
double[] q) |
void |
addQuantilestoPlot(int numPlot,
int numAxe,
double[][] q) |
void |
addQuantiletoPlot(int numPlot,
int numAxe,
double rate,
boolean symetric,
double q) |
void |
addQuantiletoPlot(int numPlot,
int numAxe,
double rate,
boolean symetric,
double[] q) |
void |
addVectortoPlot(int numPlot,
double[][] v) |
void |
changePlotColor(int I,
Color c) |
void |
changePlotData(int I,
double[]... XY) |
void |
changePlotName(int I,
String name) |
Axis |
getAxis(int i)
Return the axis specified in parameter.
|
String[] |
getAxisScales()
Returns the scaling for all of the axis of the plot.
|
boolean |
getEditable() |
Font |
getFont() |
protected Color |
getNewColor() |
boolean |
getNotable() |
Plot |
getPlot(int i) |
Plotable |
getPlotable(int i) |
LinkedList<Plotable> |
getPlotables() |
int |
getPlotIndex(Plot p) |
LinkedList<Plot> |
getPlots() |
PlotToolBar |
getPlotToolBar() |
void |
includeInBounds(double... into)
Modify bounds of the axes so as to include the point given in parameter.
|
void |
includeInBounds(Plot plot)
Modify axes boundaries so as to include all the points of a given plot.
|
static void |
main(String[] args) |
double[][] |
mapData(Object[][] stringdata) |
void |
removeAllPlotables() |
void |
removeAllPlots() |
void |
removeLegend()
Removes the current legend from the plot panel.
|
void |
removePlot(int I) |
void |
removePlot(Plot p) |
void |
removePlotable(int i) |
void |
removePlotable(Plotable p) |
void |
removePlotToolBar()
Removes the plot toolbar from the panel.
|
void |
resetMapData() |
void |
setActionMode(int am) |
void |
setAdjustBounds(boolean adjust) |
void |
setAutoBounds()
Set bounds automatically.
|
void |
setAutoBounds(int axe)
Set bounds automatically for one axis.
|
void |
setAxisLabel(int axe,
String label)
Sets the name of the axis specified in parameter.
|
void |
setAxisLabels(String... labels)
Sets the name of the axis, in this order: X, Y and Z.
|
void |
setAxisScale(int axe,
String scale)
Sets the scaling of the specified axis.
|
void |
setAxisScales(String... scales)
Sets the scale of the axes, linear or logarithm, in this order: X,Y,Z.
|
void |
setEditable(boolean b) |
void |
setFixedBounds(double[] min,
double[] max)
Sets the boundaries for each axis.
|
void |
setFixedBounds(int axe,
double min,
double max)
Sets the boundaries for the specified axis.
|
void |
setFont(Font font) |
void |
setLegendOrientation(String location)
Moves the legend to the specified location.
|
void |
setNotable(boolean b) |
void |
setNoteCoords(boolean b) |
void |
setPlot(int I,
Plot p) |
void |
setPlotToolBarOrientation(String location)
Moves the plot toolbar to the specified location.
|
void |
toGraphicFile(File file) |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUIaddAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, 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, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, 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, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateadd, 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, transferFocusDownCycle, validate, validateTreeaction, 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, 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, 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, transferFocusBackward, transferFocusUpCyclepublic PlotToolBar plotToolBar
public PlotCanvas plotCanvas
public LegendPanel plotLegend
public static final String EAST
public static final String SOUTH
public static final String NORTH
public static final String WEST
public static final String INVISIBLE
public static final String SCATTER
public static final String LINE
public static final String BAR
public static final String HISTOGRAM
public static final String BOX
public static final String STAIRCASE
public static final String GRID
public static final Color[] COLORLIST
public PlotPanel(PlotCanvas _canvas, String legendOrientation)
public PlotPanel(PlotCanvas _canvas)
public void addLegend(String location)
location - Location where should be put the legend (String).
location can have the following values (case insensitive): EAST,
SOUTH, WEST, NORTH, INVISIBLE (legend will be hidden in this case).
Any other value will be ignored and an error message will be sent to
the error output.public void removeLegend()
public void setLegendOrientation(String location)
location - Location where should be put the legend (String).
location can have the following values (case insensitive): EAST,
SOUTH, WEST, NORTH, INVISIBLE (legend will be hidden in this case).
Any other value will be ignored and an error message will be sent to
the error output.public void addPlotToolBar(String location)
location - Location where should be put the toolbar (String).
location can have the following values (case insensitive): EAST,
SOUTH, WEST, NORTH.
Any other value will be ignored and an error message will be sent to
the error output.public void removePlotToolBar()
public void setPlotToolBarOrientation(String location)
location - Location where should be put the toolbar (String).
location can have the following values (case insensitive): EAST,
SOUTH, WEST, NORTH.
Any other value will be ignored and an error message will be sent to
the error output.public PlotToolBar getPlotToolBar()
public void setAdjustBounds(boolean adjust)
public void setActionMode(int am)
public void setNoteCoords(boolean b)
public void setEditable(boolean b)
public boolean getEditable()
public void setNotable(boolean b)
public boolean getNotable()
public LinkedList<Plot> getPlots()
public Plot getPlot(int i)
public int getPlotIndex(Plot p)
public LinkedList<Plotable> getPlotables()
public Plotable getPlotable(int i)
public Axis getAxis(int i)
i - Axis number. 0 for X, 1 for Y, 2 for Z.public String[] getAxisScales()
public void setAxisLabels(String... labels)
labels - One to three strings containing the name of each axis.public void setAxisLabel(int axe,
String label)
axe - Axis number. 0 for X, 1 for Y, 2 for Z.label - Name to be given.public void setAxisScales(String... scales)
scales - Strings containing the scaling, LOG or LIN (case insensitive) for the axes.public void setAxisScale(int axe,
String scale)
axe - Axis number. 0 for X, 1 for Y, 2 for Z.scale - String specifying the scaling. LIN or LOG, case insensitive.public void setFixedBounds(double[] min,
double[] max)
min - Array of at most 3 doubles specifying the min bound of each axis, in this order: X,Y,Z.max - Array of at most 3 doubles specifying the max bound of each axis, in this order: X,Y,Z.public void setFixedBounds(int axe,
double min,
double max)
axe - Axis number to modify. 0 for X, 1 for Y, 2 for Z.min - Min bound of the axis.max - Max bound of the axis.public void includeInBounds(double... into)
into - Coords of the point to include in bounds.public void includeInBounds(Plot plot)
plot - Plot to include.public void setAutoBounds()
public void setAutoBounds(int axe)
axe - Number of the axis to modify. 0 for X, 1 for Y, 2 for Z.public double[][] mapData(Object[][] stringdata)
public void resetMapData()
public void addPlotable(Plotable p)
public void removePlotable(Plotable p)
public void removePlotable(int i)
public void removeAllPlotables()
public int addPlot(Plot newPlot)
protected Color getNewColor()
public void setPlot(int I,
Plot p)
public void changePlotData(int I,
double[]... XY)
public void changePlotName(int I,
String name)
public void changePlotColor(int I,
Color c)
public void removePlot(int I)
public void removePlot(Plot p)
public void removeAllPlots()
public void addVectortoPlot(int numPlot,
double[][] v)
public void addQuantiletoPlot(int numPlot,
int numAxe,
double rate,
boolean symetric,
double[] q)
public void addQuantiletoPlot(int numPlot,
int numAxe,
double rate,
boolean symetric,
double q)
public void addQuantilestoPlot(int numPlot,
int numAxe,
double[][] q)
public void addQuantilestoPlot(int numPlot,
int numAxe,
double[] q)
public void addGaussQuantilestoPlot(int numPlot,
int numAxe,
double[] s)
public void addGaussQuantilestoPlot(int numPlot,
int numAxe,
double s)
public void toGraphicFile(File file) throws IOException
IOExceptionpublic static void main(String[] args)
public Font getFont()
getFont in interface MenuContainergetFont in class Componentpublic void setFont(Font font)
setFont in class JComponentfont - the font to setCopyright © 2015. All rights reserved.