public class GraphPanel
extends javax.swing.JPanel
Modifier and Type | Class and Description |
---|---|
class |
GraphPanel.Graph
Graph object.
|
class |
GraphPanel.Spline
Cubic spline interpolation
This algorithm follows the description in
Kohn, M.C.
|
javax.swing.JPanel.AccessibleJPanel
javax.swing.JComponent.AccessibleJComponent
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
Constructor and Description |
---|
GraphPanel()
Defines a GraphPanel object.
|
GraphPanel(int nmax,
int smax)
Defines a GraphPanel object (kept for compatibility).
|
Modifier and Type | Method and Description |
---|---|
void |
addFunction(Function f0,
double[] p0,
double[] ft,
java.awt.Color col,
int n0)
Adds a new function graph to the panel or overwrites an existing one.
|
void |
addSpectrum(double[] xData,
double[] yData,
boolean[] masked,
int startCounter,
java.awt.Color col,
int n0,
int type)
Adds a new spectrum graph to the panel or overwrites an exisiting one.
|
void |
addSpectrum(double[] xData,
double[] yData,
int startCounter,
java.awt.Color col,
int n0,
int type)
Adds a new spectrum graph to the panel or overwrites an exisiting one.
|
void |
applyDefaults()
Apply default values.
|
double |
baselineLinY(double x)
Returns the y-value of the current "baseline" at given x.
|
void |
displaySpectrum(int n)
Displays the graph of the specified spectrum on the panel.
|
boolean |
errorBarsShown(int n)
Returns true if error bars are shown for a particular spectrum.
|
int |
getBarWidth(int n0)
Returns the symbol size of a particular spectrum.
|
double[] |
getBaselineLinParams()
Returns the slope and y-intercept of the "baseline".
|
double |
getCursorXPosition()
Returns the x-value at current vertical cursor position.
|
double |
getCursorXValueY(int n0)
Returns the y-value of specified spectrum at current vertical cursor position.
|
double |
getCursorYPosition()
Returns the y-value at current horizontal cursor position.
|
double[] |
getCursorYValueX(int n0)
Returns the x-values of specified spectrum at current horizontal cursor position.
|
java.lang.String |
getInfo() |
java.awt.Font |
getLabelFont()
Returns font of axis labels.
|
java.lang.String |
getLegend(int n0)
Returns legend description for a particular spectrum.
|
int[] |
getLegendBox()
Returns coordinates of the legend box in Java2D coordinates.
|
java.awt.Font |
getLegendFont()
Returns font of legend.
|
int |
getNoDatapoints(int n0)
Returns the number of data points in specified spectrum.
|
java.awt.Dimension |
getPanelSize()
Returns dimension of the graph panel.
|
int |
getPosLeftYaxis()
Returns the position of the left y-axis.
|
int |
getPosLowerXaxis()
Returns the position of the lower x-axis.
|
int |
getPosRightYaxis()
Returns the position of the right y-axis.
|
int |
getPosUpperXaxis()
Returns the position of the upper x-axis.
|
boolean |
getScientificNotationX()
Returns true if x-axis labels have scientific notation.
|
boolean |
getScientificNotationY()
Returns true if y-axis labels have scientific notation.
|
java.lang.String |
getSubtitle()
Returns the plot subtitle.
|
java.awt.Font |
getSubtitleFont()
Returns font of plot subtitle.
|
org.w3c.dom.Document |
getSVG()
Returns an SVG document of the graphics using tmp.svg
|
int |
getSymbol(int n0)
Returns symbol type of a particular spectrum.
|
int |
getSymbolSize(int n0)
Returns the symbol size of a particular spectrum.
|
java.lang.String |
getTitle()
Returns the plot title.
|
java.awt.Font |
getTitleFont()
Returns font of plot title.
|
double[] |
getXAreaBox()
Returns the x-values of the x-area box (e.g.
|
boolean |
getXAutoScale()
Returns true if auto-scaling is turned on for x-axis.
|
double |
getXend()
Returns the high limit of the x-axis scale.
|
double |
getXMajorTickInterval()
Returns the interval of major ticks on the x-axis.
|
double |
getXmax()
Returns the maximum value of x-axis.
|
double |
getXmin()
Returns the minimum value of x-axis.
|
int |
getXMinorTickFrequency()
Returns the frequency of minor ticks on the x-axis.
|
double |
getXof(int c)
Returns x-value of a x-coordinate in Java2D coordinate system.
|
int |
getXPostdec()
Get the number of decimals for x-axis labels.
|
boolean |
getXReverse()
Returns the status of the x-axis (normal, reverse).
|
int |
getXScaleType()
Returns x-axis type.
|
double |
getXstart()
Returns the low limit of the x-axis scale.
|
java.lang.String |
getXTitle()
Returns the x-axis title.
|
double |
getY(double xValue,
int n0)
Returns the y-value of specified spectrum at a certain x-value.
|
boolean |
getYAutoScale()
Returns true if auto-scaling is turned on for y-axis.
|
double |
getYend()
Returns the high limit of the y-axis scale.
|
double |
getYMajorTickInterval()
Returns the interval of major ticks on the y-axis.
|
double |
getYmax()
Returns the maximum value of y-axis.
|
double |
getYmin()
Returns the minimum value of y-axis.
|
int |
getYMinorTickFrequency()
Returns the frequency of minor ticks on the y-axis.
|
double |
getYof(int c)
Returns y-value of a y-coordinate in Java2D coordinate system.
|
int |
getYPostdec()
Get the number of decimals for y-axis labels.
|
boolean |
getYReverse()
Returns the status of the y-axis (normal, reverse).
|
int |
getYScaleType()
Returns y-axis type.
|
double |
getYstart()
Returns the low limit of the y-axis scale.
|
java.lang.String |
getYTitle()
Returns the y-axis title.
|
void |
hideBaselineLinear()
Hides the "baseline".
|
void |
hideCursorX()
Hides the vertical line cursor.
|
void |
hideCursorY()
Hides the horizontal line cursor.
|
void |
hideErrorBars(int n0)
Hides error bars for a particular spectrum.
|
void |
hideSpectrum(int n)
Removes the graph of the specified spectrum from the panel.
|
void |
hideXAreaBox()
Hides the x-area box.
|
void |
hideXDrop()
Hide vertical drop lines.
|
void |
hideXLine()
Hide vertical lines.
|
void |
initialise()
Initialises the object.
|
boolean |
isBarFilled(int n0)
Returns true if bar of a particular spectrum is filled, false
if bar is open.
|
boolean |
isGridShown()
Returns true if the grid is shown.
|
boolean |
isLegendShown()
Returns true if the legend box is shown.
|
boolean |
isSpectrumShown(int n) |
boolean |
isSymbolFilled(int n0)
Returns true if symbol of a particular spectrum is filled, false
if symbol is open.
|
void |
maskDatapoints(boolean[] m,
int n0)
Mask datapoints in dataset n0 based on array m.
|
void |
moveCursorX(int j)
Move the vertical cursor by a defined distance.
|
void |
moveCursorY(int j)
Move the horizontal cursor by a defined distance.
|
void |
moveLegendBox(int dx,
int dy)
Moves the legend box by increments dx and dy in Java2D coordinates.
|
protected void |
paintComponent(java.awt.Graphics g)
Paints the entire graphics on the panel.
|
void |
paintGraph(java.awt.Graphics2D g)
Paints the graphics components.
|
void |
removeAll()
Removes all spectra.
|
void |
removeSpectrum(int n)
Removes the specified spectrum from the list of spectra.
|
void |
rescale()
Auto-scales all currently active spectra on the panel.
|
void |
rescale(int x0,
int y0,
int x1,
int y1)
Re-scales all currently active spectra on the panel.
|
void |
rescaleX()
Auto-scales all currently active spectra on the panel on x-axis only.
|
void |
rescaleY()
Auto-scales all currently active spectra on the panel on y-axis only.
|
void |
setBarFilled(boolean b,
int n0)
Sets filling of bars of a particular spectrum.
|
void |
setBarWidth(int width,
int n0)
Set symbol size for a particular spectrum.
|
void |
setBaselineLinear(int x,
int y)
Translates the "baseline" such that runs through point (x,y) in the
Java2D coordinate system, leaving the slope unaltered.
|
void |
setBaselineLinearY(int x,
int y)
Translates the "baseline" such that it goes through point (x,y) in
the Java2D coordinate system.
|
void |
setColour(java.awt.Color colour,
int n0)
Sets the colour for a given spectrum.
|
void |
setCursorX(double d)
Sets the vertical cursor to specified position using an x-value of the
spectrum graph.
|
void |
setCursorX(int j)
Sets the vertical cursor to specified position using the Java2D coordinate system.
|
void |
setCursorY(double d)
Sets the horizontal cursor to specified position using a y-value of the
spectrum graph.
|
void |
setCursorY(int j)
Sets the horizontal cursor to specified position using the Java2D
coordinate system.
|
void |
setCurveMarker(double[][] d,
java.awt.Color c)
Sets coordinates of curve markers.
|
void |
setDropColour(java.awt.Color colour)
Set colour of drop lines.
|
void |
setDropLines(double[] xl,
double[] yl)
Define coordinates for drop lines from points (xl,yl) to coordinate axes.
|
void |
setGraphType(int type,
int n0)
Sets the type of graph: 0 - continuous, 1: discrete, 2: bar.
|
void |
setLabelFont(java.awt.Font fnt)
Set font for axis labels.
|
void |
setLegend(java.lang.String s,
int n0)
Set legend for a particular spectrum.
|
void |
setLegendBox(int[] box)
Sets coordinates of the legend box in Java2D coordinates.
|
void |
setLegendFont(java.awt.Font fnt)
Set font for legend.
|
void |
setLegendPosition(java.lang.String s)
Sets position of the legend box as String.
|
void |
setLineWidth(float lw,
int n0)
Set linewidth for a particular spectrum.
|
void |
setPosLeftYaxis(int p)
Sets the position of the left y-axis.
|
void |
setPosLowerXaxis(int p)
Sets the position of the lower x-axis.
|
void |
setPosRightYaxis(int p)
Sets the position of the right y-axis.
|
void |
setPosUpperXaxis(int p)
Sets the position of the upper x-axis.
|
void |
setScientificNotationX(boolean b)
Sets scientific notation for labels on x-axis.
|
void |
setScientificNotationY(boolean b)
Sets scientific notation for labels on y-axis.
|
void |
setSigma(double[] sig,
int n0)
Sets standard error values for a particular spectrum.
|
void |
setSubtitle(java.lang.String s)
Sets the plot subtitle.
|
void |
setSubtitleFont(java.awt.Font fnt)
Set font for plot subtitle.
|
void |
setSymbol(int symb,
int n0)
Set symbol type for a particular spectrum.
|
void |
setSymbolFilled(boolean b,
int n0)
Sets filling of symbol of a particular spectrum.
|
void |
setSymbolSize(int size,
int n0)
Set symbol size for a particular spectrum.
|
void |
setTitle(java.lang.String s)
Sets the plot title.
|
void |
setTitleFont(java.awt.Font fnt)
Set font for plot title.
|
void |
setVerticalMarker(double v,
int i)
Sets the position of the vertical marker for a spectrum.
|
void |
setXAreaBoxLimits(int left,
int right)
Sets the size of the x-area box (e.g.
|
void |
setXAutoScale(boolean b)
Sets auto-scaling for x-axis.
|
void |
setXLine(double[] xl)
Sets vertical lines at given x-values.
|
void |
setXLineColour(java.awt.Color colour)
Sets the colour for vertical lines.
|
void |
setXMajorTickInterval(double d)
Sets the interval of major ticks on the x-axis.
|
void |
setXmax(double d)
Sets the maximum value of x-axis and rescales the graphics.
|
void |
setXmin(double d)
Sets the minimum value of x-axis and rescales the graphics.
|
void |
setXMinorTickFrequency(int f)
Sets the frequency of minor ticks on the x-axis.
|
void |
setXPostdec(int i)
Sets the number of digits after the floating point (x-axis tick labelling).
|
void |
setXReverse(boolean b)
Displays the x-axis normal (left-to-right) or
reverse (right-to-left).
|
void |
setXScaleType(int type)
Sets x-axis type.
|
void |
setXTitle(java.lang.String s)
Sets the x-axis title.
|
void |
setYAutoScale(boolean b)
Sets auto-scaling for y-axis.
|
void |
setYMajorTickInterval(double d)
Sets the interval of major ticks on the y-axis.
|
void |
setYmax(double d)
Sets the maximum value of y-axis and rescales the graphics.
|
void |
setYmin(double d)
Sets the minimum value of y-axis and rescales the graphics.
|
void |
setYMinorTickFrequency(int f)
Sets the frequency of minor ticks on the y-axis.
|
void |
setYReverse(boolean b)
Displays the y-axis normal (left-to-right) or
reverse (right-to-left).
|
void |
setYScaleType(int type)
Sets y-axis type.
|
void |
setYTitle(java.lang.String s)
Sets the y-axis title.
|
void |
setZoomBox(int left,
int top,
int width,
int height)
Sets the size of the zoom box in Java2D coordinate system.
|
void |
showBaselineLinear()
Creates a line ("baseline" ) parallel to the x-axis and intersecting the origin.
|
void |
showCursorX()
Shows the vertical line cursor.
|
void |
showCursorY()
Shows the horizontal line cursor.
|
void |
showCurveMarker(boolean b)
Sets curve markers.
|
void |
showErrorBars(int n0)
Turns on error bars for a particular spectrum.
|
void |
showGrid(boolean show)
Displays the grid.
|
void |
showLegend(boolean show)
Displays the legend box.
|
void |
showVerticalMarker(boolean b,
int i)
Show or hide the vertical marker for a spectrum.
|
void |
showXDrop()
Show vertical drop lines.
|
void |
showXLine()
Show vertical lines.
|
void |
SVGGen(java.io.File f)
Generates an SVG file of the graphics, saved as tmp.svg
|
void |
update()
Repaints the panel.
|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, 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, 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
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, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusUpCycle
public GraphPanel()
public GraphPanel(int nmax, int smax)
nmax
- OBSOLETE max. number of datapoints in one spectrumsmax
- max. number of spectra in panelprotected void paintComponent(java.awt.Graphics g)
paintComponent
in class javax.swing.JComponent
public void paintGraph(java.awt.Graphics2D g)
g
- Graphics2D objectpublic void initialise()
public void update()
public void addSpectrum(double[] xData, double[] yData, int startCounter, java.awt.Color col, int n0, int type)
xData
- array of x valuesyData
- array of y valuesstartCounter
- starting number of the x- and y-value arrayscol
- colour to be used for this spectrumn0
- number of this spectrumtype
- 0:continous, 1:discrete, 2:barpublic void addSpectrum(double[] xData, double[] yData, boolean[] masked, int startCounter, java.awt.Color col, int n0, int type)
xData
- array of x valuesyData
- array of y valuesmasked
- array of booleans (true: masked data point)startCounter
- starting number of the x- and y-value arrayscol
- colour to be used for this spectrumn0
- number of this spectrumtype
- 0:continous, 1:discrete, 2:barpublic void addFunction(Function f0, double[] p0, double[] ft, java.awt.Color col, int n0)
f0
- Functionp0
- array of parametersft
- fromX, toXcol
- colour to be used for this spectrumn0
- number of this spectrumpublic void displaySpectrum(int n)
n
- spectrum numberpublic void hideSpectrum(int n)
n
- spectrum numberpublic boolean isSpectrumShown(int n)
public boolean errorBarsShown(int n)
n
- number of spectrumpublic void removeSpectrum(int n)
n
- spectrum numberpublic void removeAll()
removeAll
in class java.awt.Container
public void rescale()
public void rescale(int x0, int y0, int x1, int y1)
x0
- sets the minimum x valuey0
- sets the minimum y valuex1
- sets the maximum x valuey1
- sets the maximum y valuepublic void rescaleX()
public void rescaleY()
public void setCursorX(int j)
j
- x-coordinate on the panelpublic void setCursorX(double d)
d
- x-value of spectrum graphpublic void setCursorY(int j)
j
- y-coordinate on the panelpublic void setCursorY(double d)
d
- y-value of spectrum graphpublic void moveCursorX(int j)
j
- x-distance on the Java 2D panelpublic void moveCursorY(int j)
j
- y-distance on the Java 2D panelpublic int getNoDatapoints(int n0)
n0
- number of spectrumpublic double getY(double xValue, int n0)
xValue
- x-valuen0
- number of spectrumpublic double getCursorXValueY(int n0)
n0
- number of spectrumpublic double[] getCursorYValueX(int n0)
n0
- number of spectrumpublic void maskDatapoints(boolean[] m, int n0)
m
- boolean array (false:not masked; true: masked) of the same length
as x- and y-value arraysm
- boolean array (false: not maksed; true: masked) of same length as
the arrays of x- and y-valuesn0
- number of spectrumpublic double getCursorXPosition()
public double getCursorYPosition()
public double getXmin()
public double getXmax()
public double getYmin()
public double getYmax()
public void setXmin(double d)
d
- minimum x-valuepublic void setXmax(double d)
d
- maximum x-valuepublic void setYmin(double d)
d
- minimum y-valuepublic void setYmax(double d)
d
- maximum y-valuepublic double getXMajorTickInterval()
public void setXMajorTickInterval(double d)
d
- major tick interval on xpublic double getYMajorTickInterval()
public void setYMajorTickInterval(double d)
d
- major tick interval on ypublic int getXMinorTickFrequency()
public void setXMinorTickFrequency(int f)
f
- major tick interval on xpublic int getYMinorTickFrequency()
public void setYMinorTickFrequency(int f)
f
- major tick interval on ypublic void setXReverse(boolean b)
b
- reverses x-axis if truepublic boolean getXReverse()
public void setYReverse(boolean b)
b
- reverses y-axis if truepublic boolean getYReverse()
public void setXPostdec(int i)
i
- number of digitspublic void setXTitle(java.lang.String s)
s
- title as String expressionpublic void setYTitle(java.lang.String s)
s
- title as String expressionpublic void setTitle(java.lang.String s)
s
- title as String expressionpublic void setSubtitle(java.lang.String s)
s
- subtitle as String expressionpublic java.lang.String getXTitle()
public java.lang.String getYTitle()
public java.lang.String getTitle()
public java.lang.String getSubtitle()
public void setZoomBox(int left, int top, int width, int height)
left
- left limit of the zoom boxtop
- top limit of the zoom boxwidth
- width of the zoom boxheight
- height of the zoom boxpublic void setXAreaBoxLimits(int left, int right)
left
- left limit of the arearight
- right limit of the areapublic double[] getXAreaBox()
public void hideXAreaBox()
public void showBaselineLinear()
public void hideBaselineLinear()
public void setBaselineLinear(int x, int y)
x
- x-coordinatey
- y-coordinatepublic void setBaselineLinearY(int x, int y)
x
- x-coordinatey
- y-coordinatepublic double[] getBaselineLinParams()
public double baselineLinY(double x)
x
- x-coordinatepublic void showCursorX()
public void hideCursorX()
public void showCursorY()
public void hideCursorY()
public int getXPostdec()
public int getYPostdec()
public void setColour(java.awt.Color colour, int n0)
colour
- Colourn0
- number of spectrumpublic void setXLine(double[] xl)
xl
- x-values as arraypublic void setXLineColour(java.awt.Color colour)
colour
- Colourpublic void showXLine()
public void hideXLine()
public void setDropLines(double[] xl, double[] yl)
xl
- array of x-ccordinatesyl
- array of y-coordinatespublic void setDropColour(java.awt.Color colour)
colour
- Colourpublic void showXDrop()
public void hideXDrop()
public void applyDefaults()
public void setLabelFont(java.awt.Font fnt)
fnt
- fontpublic void setTitleFont(java.awt.Font fnt)
fnt
- fontpublic void setSubtitleFont(java.awt.Font fnt)
fnt
- fontpublic void setLegendFont(java.awt.Font fnt)
fnt
- fontpublic void setLineWidth(float lw, int n0)
lw
- linewidthn0
- number of spectrumpublic void setSymbol(int symb, int n0)
symb
- symbol typen0
- number of spectrumpublic int getSymbol(int n0)
n0
- number of spectrumpublic void setSymbolSize(int size, int n0)
size
- symbol sizen0
- number of spectrumpublic int getSymbolSize(int n0)
n0
- number of spectrumpublic boolean isSymbolFilled(int n0)
n0
- number of spectrumpublic void setSymbolFilled(boolean b, int n0)
b
- true - filled, false - openn0
- number of spectrumpublic void setBarWidth(int width, int n0)
width
- bar width (odd number)n0
- number of spectrumpublic int getBarWidth(int n0)
n0
- number of spectrumpublic void setBarFilled(boolean b, int n0)
b
- true - filled, false - openn0
- number of spectrumpublic boolean isBarFilled(int n0)
n0
- number of spectrumpublic void setLegend(java.lang.String s, int n0)
s
- legend descriptionn0
- number of spectrumpublic java.lang.String getLegend(int n0)
n0
- number of spectrumpublic void showErrorBars(int n0)
n0
- number of spectrumpublic void hideErrorBars(int n0)
n0
- number of spectrumpublic void setGraphType(int type, int n0)
type
- graph typen0
- number of spectrumpublic void setSigma(double[] sig, int n0)
sig
- standard errors as arrayn0
- number of spectrumpublic void setXScaleType(int type)
type
- 0 - linear, else logarithmicpublic int getXScaleType()
public void setYScaleType(int type)
type
- 0 - linear, else logarithmicpublic int getYScaleType()
public void setScientificNotationX(boolean b)
b
- true - scientific notation, false - decimal notationpublic void setScientificNotationY(boolean b)
b
- true - scientific notation, false - decimal notationpublic boolean getScientificNotationX()
public boolean getScientificNotationY()
public double getXof(int c)
c
- y-coordinate in Java2D coordinate systempublic double getYof(int c)
c
- y-coordinate in Java2D coordinate systempublic void setXAutoScale(boolean b)
b
- true turns on auto-scalingpublic void setYAutoScale(boolean b)
b
- true turns on auto-scalingpublic boolean getXAutoScale()
public boolean getYAutoScale()
public java.awt.Font getLabelFont()
public java.awt.Font getTitleFont()
public java.awt.Font getSubtitleFont()
public java.awt.Font getLegendFont()
public java.awt.Dimension getPanelSize()
public int[] getLegendBox()
public void setLegendBox(int[] box)
box
- [0],[1]: upper left corner; [2],[3]: lower right cornerpublic void moveLegendBox(int dx, int dy)
dx
- shift in x directiondy
- shift in y directionpublic void showLegend(boolean show)
show
- true shows the legend boxpublic boolean isLegendShown()
public void setLegendPosition(java.lang.String s)
s
- "topRight", "topLeft", "bottomLeft", "bottomRight"public void showGrid(boolean show)
show
- true shows the gridpublic boolean isGridShown()
public double getXstart()
public double getXend()
public double getYstart()
public double getYend()
public void setCurveMarker(double[][] d, java.awt.Color c)
d
- coordinates of markers in real values; d[N][2]c
- Colourpublic void showCurveMarker(boolean b)
b
- true if curve markers are to be shownpublic int getPosLeftYaxis()
public int getPosRightYaxis()
public int getPosUpperXaxis()
public int getPosLowerXaxis()
public void setPosLeftYaxis(int p)
p
- position on the graphics panelpublic void setPosRightYaxis(int p)
p
- position on the graphics panelpublic void setPosUpperXaxis(int p)
p
- position on the graphics panelpublic void setPosLowerXaxis(int p)
p
- position on the graphics panelpublic void setVerticalMarker(double v, int i)
v
- x-position of the vertical markeri
- number of spectrumpublic void showVerticalMarker(boolean b, int i)
b
- true/falsei
- number of spectrumpublic void SVGGen(java.io.File f)
f
- output filepublic org.w3c.dom.Document getSVG()
public java.lang.String getInfo()