public class PlotWindow extends ImageWindow implements java.awt.event.ActionListener, java.awt.datatransfer.ClipboardOwner, java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.awt.event.KeyListener, ImageListener, java.lang.Runnable
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
Modifier and Type | Field and Description |
---|---|
static boolean |
autoClose
Automatically close window after saving values.
|
static int |
BOX
Display points using an box-shaped mark.
|
static int |
CIRCLE
Display points using a circle 5 pixels in diameter.
|
static int |
CROSS
Display points using an cross-shaped mark.
|
static boolean |
interpolate
Interpolate line profiles.
|
static int |
LINE
Connect points with solid lines.
|
static boolean |
listValues
Display the XY coordinates in a separate window.
|
static boolean |
noGridLines
Add grid lines to plots
|
static int |
plotHeight
The height of the plot in pixels.
|
static int |
plotWidth
The width of the plot in pixels.
|
static boolean |
saveXValues
Save x-values only.
|
static int |
TRIANGLE
Display points using an tiangular mark.
|
static int |
X
Display points using an X-shaped mark.
|
closed, ic, ij, imp, MIN_HEIGHT, MIN_WIDTH, running, running2
CROSSHAIR_CURSOR, DEFAULT_CURSOR, E_RESIZE_CURSOR, HAND_CURSOR, ICONIFIED, MAXIMIZED_BOTH, MAXIMIZED_HORIZ, MAXIMIZED_VERT, MOVE_CURSOR, N_RESIZE_CURSOR, NE_RESIZE_CURSOR, NORMAL, NW_RESIZE_CURSOR, S_RESIZE_CURSOR, SE_RESIZE_CURSOR, SW_RESIZE_CURSOR, TEXT_CURSOR, W_RESIZE_CURSOR, WAIT_CURSOR
Constructor and Description |
---|
PlotWindow(java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel,
double[] xValues,
double[] yValues)
Deprecated.
replaced by the Plot class.
|
PlotWindow(java.lang.String title,
java.lang.String xLabel,
java.lang.String yLabel,
float[] xValues,
float[] yValues)
Deprecated.
replaced by the Plot class.
|
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
addErrorBars(float[] errorBars)
Adds error bars to the plot.
|
void |
addLabel(double x,
double y,
java.lang.String label)
Draws a label.
|
void |
addPoints(double[] x,
double[] y,
int shape)
Adds a set of points to the plot using double arrays.
|
void |
addPoints(float[] x,
float[] y,
int shape)
Adds a set of points to the plot or adds a curve if shape is set to LINE.
|
void |
changeFont(java.awt.Font font)
Changes the font.
|
void |
draw()
Displays the plot.
|
void |
drawPlot(Plot plot)
Draws a new plot in this window.
|
ResultsTable |
getResultsTable()
Returns the X and Y plot values as a ResultsTable.
|
float[] |
getXValues() |
float[] |
getYValues() |
void |
imageClosed(ImagePlus imp) |
void |
imageOpened(ImagePlus imp) |
void |
imageUpdated(ImagePlus imp) |
void |
keyPressed(java.awt.event.KeyEvent e) |
void |
keyReleased(java.awt.event.KeyEvent e) |
void |
keyTyped(java.awt.event.KeyEvent e) |
void |
lostOwnership(java.awt.datatransfer.Clipboard clipboard,
java.awt.datatransfer.Transferable contents) |
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(int x,
int y)
Updates the graph X and Y values when the mouse is moved.
|
void |
mouseMoved(java.awt.event.MouseEvent e) |
void |
mousePressed(java.awt.event.MouseEvent e) |
void |
mouseReleased(java.awt.event.MouseEvent e) |
void |
run() |
static void |
savePreferences(java.util.Properties prefs)
Called once when ImageJ quits.
|
void |
setColor(java.awt.Color c)
Changes the drawing color.
|
void |
setLimits(double xMin,
double xMax,
double yMin,
double yMax)
Sets the x-axis and y-axis range.
|
void |
setLineWidth(int lineWidth)
Changes the line width.
|
add, centerNextImage, close, close, copy, createSubtitle, drawInfo, focusGained, focusLost, getCanvas, getImagePlus, getInitialMagnification, getInsets, getMaximumBounds, isClosed, maximize, minimize, mouseWheelMoved, paint, paste, setImage, setLocationAndSize, setNextLocation, setNextLocation, toString, updateImage, windowActivated, windowClosed, windowClosing, windowDeactivated, windowDeiconified, windowIconified, windowOpened, windowStateChanged
addNotify, getAccessibleContext, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, paramString, remove, removeNotify, setBackground, setCursor, setExtendedState, setIconImage, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecorated
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, hide, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, postEvent, processEvent, processWindowEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, setVisible, show, toBack, toFront
add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, setLayout, transferFocusDownCycle, update, validate, validateTree
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, transferFocus, transferFocusBackward, transferFocusUpCycle
public static final int CIRCLE
public static final int X
public static final int BOX
public static final int TRIANGLE
public static final int CROSS
public static final int LINE
public static boolean saveXValues
public static boolean autoClose
public static int plotWidth
public static int plotHeight
public static boolean listValues
public static boolean interpolate
public static boolean noGridLines
public PlotWindow(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, float[] xValues, float[] yValues)
public PlotWindow(java.lang.String title, java.lang.String xLabel, java.lang.String yLabel, double[] xValues, double[] yValues)
public void setLimits(double xMin, double xMax, double yMin, double yMax)
public void addPoints(float[] x, float[] y, int shape)
x
- the x-coodinatesy
- the y-coodinatesshape
- CIRCLE, X, BOX, TRIANGLE, CROSS or LINEpublic void addPoints(double[] x, double[] y, int shape)
public void addErrorBars(float[] errorBars)
public void addLabel(double x, double y, java.lang.String label)
public void setColor(java.awt.Color c)
public void setLineWidth(int lineWidth)
public void changeFont(java.awt.Font font)
public void draw()
public void mouseMoved(int x, int y)
mouseMoved
in class ImageWindow
ImageWindow.mouseMoved(int, int)
public void lostOwnership(java.awt.datatransfer.Clipboard clipboard, java.awt.datatransfer.Transferable contents)
lostOwnership
in interface java.awt.datatransfer.ClipboardOwner
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public float[] getXValues()
public float[] getYValues()
public ResultsTable getResultsTable()
public void drawPlot(Plot plot)
public static void savePreferences(java.util.Properties prefs)
public void mousePressed(java.awt.event.MouseEvent e)
mousePressed
in interface java.awt.event.MouseListener
public void mouseDragged(java.awt.event.MouseEvent e)
mouseDragged
in interface java.awt.event.MouseMotionListener
public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked
in interface java.awt.event.MouseListener
public void keyPressed(java.awt.event.KeyEvent e)
keyPressed
in interface java.awt.event.KeyListener
public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased
in interface java.awt.event.MouseListener
public void mouseExited(java.awt.event.MouseEvent e)
mouseExited
in interface java.awt.event.MouseListener
public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered
in interface java.awt.event.MouseListener
public void mouseMoved(java.awt.event.MouseEvent e)
mouseMoved
in interface java.awt.event.MouseMotionListener
public void keyTyped(java.awt.event.KeyEvent e)
keyTyped
in interface java.awt.event.KeyListener
public void keyReleased(java.awt.event.KeyEvent e)
keyReleased
in interface java.awt.event.KeyListener
public void imageOpened(ImagePlus imp)
imageOpened
in interface ImageListener
public void imageUpdated(ImagePlus imp)
imageUpdated
in interface ImageListener
public void imageClosed(ImagePlus imp)
imageClosed
in interface ImageListener
public void run()
run
in interface java.lang.Runnable