Package gov.nih.mipav.view
Class ViewJFrameGraph
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Frame
javax.swing.JFrame
gov.nih.mipav.view.ViewJFrameGraph
- All Implemented Interfaces:
ActionListener,ComponentListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,ChangeListener,RootPaneContainer,WindowConstants
public class ViewJFrameGraph
extends JFrame
implements ComponentListener, ActionListener, ChangeListener, WindowListener
This is a frame which holds a graph in one panel and a set of user buttons in the other. It uses swing components for
all of the graphics and calls ViewJComponentGraph for the graph.
- Version:
- 1.0 Aug 1, 1999
- Author:
- Neva Cherniavsky (primary), Harman Singh aev* @see ViewJComponentGraph
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) classThis class is called by the color chooser when the user selects a a color from the background color chooser dialog box.(package private) classThis class is called by the color chooser when the user cancels.(package private) classThis class is called by the color chooser when the user selects a a color from the function line color chooser dialog.static enumNested classes/interfaces inherited from class javax.swing.JFrame
JFrame.AccessibleJFrameNested classes/interfaces inherited from class java.awt.Frame
Frame.AccessibleAWTFrameNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanprivate JCheckBoxprivate booleanDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JPanelDOCUMENT ME!private JButtonDOCUMENT ME!private JLabelDOCUMENT ME!private JPanelDOCUMENT ME!private JTextFieldprivate ViewJColorChooserDOCUMENT ME!private JDialogDOCUMENT ME!private JMenuDOCUMENT ME!private StringDOCUMENT ME!private JMenuDOCUMENT ME!private booleanprivate booleanprivate JPanelprivate JMenuDOCUMENT ME!private booleanprivate JMenuDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JCheckBox[]DOCUMENT ME!private JPanelDOCUMENT ME!private ViewJFrameGraph.FitModeCurrent mode for fitting functionsprivate JComboBoxCombo box for selecting the fitting function typeprivate VOIDOCUMENT ME!private intDOCUMENT ME!private JLabel[]DOCUMENT ME!private JPanelDOCUMENT ME!private JButton[]DOCUMENT ME!private JCheckBox[]the slope changes.private ViewJComponentGraphDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JPanelDOCUMENT ME!private JPanelprivate ModelImageprivate doubleprivate doubleprivate intprivate doubleprivate doubleprivate JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemprivate JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemprivate JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemDOCUMENT ME!private JMenuItemprivate StringDOCUMENT ME!private JCheckBoxDOCUMENT ME!private JPanelDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JCheckBoxprivate JCheckBoxprivate JPanelDOCUMENT ME!private intprivate JTextFieldprivate JLabelprivate JTextFieldprivate JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private JTextFieldprivate JLabelprivate JTextFieldprivate static final intMinimum height of the graph panelprivate static final intMinimum width of the graph panelprivate JCheckBoxDOCUMENT ME!private JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private JDialogDOCUMENT ME!private JPanelDOCUMENT ME!private JTextField[]DOCUMENT ME!private intprivate JTextFieldprivate JLabelprivate JMenuBarDOCUMENT ME!private static final intMinimum distance between frame and subpanelsprivate JRadioButtonprivate ButtonGroupprivate JRadioButtonprivate JPanelDOCUMENT ME!private JPanelDOCUMENT ME!private JButtonprivate JButtonDOCUMENT ME!private intprivate static final longUse serialVersionUID for interoperability.private JPanelDOCUMENT ME!private intprivate JTabbedPaneDOCUMENT ME!private JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private StringDOCUMENT ME!private intDOCUMENT ME!private doubleprivate doubleDOCUMENT ME!DOCUMENT ME!private JMenuDOCUMENT ME!private VOIDOCUMENT ME!private JLabelDOCUMENT ME!private JTextFieldDOCUMENT ME!private ButtonGroupprivate JCheckBox[]private JPanelprivate JRadioButtonprivate JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private JScrollPaneprivate JRadioButtonprivate int[][]this is a list of the x,y coords of the voi's boundaryprivate JLabelDOCUMENT ME!private JTextFieldDOCUMENT ME!private ButtonGroupprivate JCheckBox[]private JPanelprivate JRadioButtonprivate JTextFieldDOCUMENT ME!private JLabelDOCUMENT ME!private JScrollPaneprivate JRadioButtonFields inherited from class javax.swing.JFrame
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Frame
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_CURSORFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionViewJFrameGraph(float[][] xInit, float[][] yInit, String title) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[][] x, float[][] y, String title, VOI v) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, VOI v, String units) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, String labelX, String labelY) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, String labelX, String labelY, Color[] colorArray) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[] xInit, float[] yInit, String title, int[][] xyCoords) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[] x, float[] y, String title, VOI v) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[] xInit, float[] yInit, String title, VOI v, String units, int[][] xyCoords) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY, boolean visible) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY, Color color) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(ModelImage image, int RGBOffset, boolean entireImage, int initialSummaryBins, double initialUserMin, double initialUserMax, float[] xInit, float[] yInit, String title, String labelX, String labelY) Constructor Constructs the frame, with the graph component in one panel and the user options in the other.ViewJFrameGraph(String title, boolean openFileGUI) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Takes the action commands and paints if the apply button is pressed, closes if the close button is pressed.private voidCreates a panel to edit various fitted function features.private voidCreates a panel where various features of the functions can be edited, such as showing the legend, and changing function names.private voidFunction that builds the menu of various tools to be used in conjunction with the graph. ie: opening / saving files, changing gridlines, title / axis labels, etc.private voidCreats a panel where various featuers of the graph can be edited, such as visbility of gridlines and minor tick marks, number of gridlines, background color, range, and labels for the title, x and y axiis.voidcomponentHidden(ComponentEvent event) DOCUMENT ME!voidcomponentMoved(ComponentEvent event) DOCUMENT ME!voidcomponentResized(ComponentEvent event) Resets the bounds of component graph if the window is resized.voidcomponentShown(ComponentEvent event) DOCUMENT ME!private voidCreates a dialog box in which the user can modify various features of the graph.voiddeleteFunct(int index) Deletes the indicated function from the graph.private voidvoidfocusGained(FocusEvent event) Unchanged.voidfocusLost(FocusEvent event) Unchanged.Accessor that gets the default directory.getGraph()private floatgetMedian(float[] toSort) DOCUMENT ME!voiditemStateChanged(ItemEvent event) Unchanged.voidDOCUMENT ME!booleanopenNew()Opens Excel data (tab-delimited fields) into a new graph.booleanopenSame()Opens Excel data (tab-delimited fields) into this graph.private float[]parseString(String s, int len) DOCUMENT ME!private voidprint()Prints the current graph being displayed to the printer.voidvoidreplaceFunction(float[] newX, float[] newY) Replaces the function used with a line image.voidreplaceFunction(float[] newX, float[] newY, int[][] newXYCoords, VOI myVoi, int index) Replaces the function used with a line image.voidsave()Saves this graph as Excel data so that Excel can read in the data and graph it as an Excel file.voidSaves this graph as Excel data so that Excel can read in the data and graph it as an Excel file.voidsaveNewFunction(float[][] newX, float[][] newY, int ptIndex) Replaces the first three functions (used with RGB images).voidsaveNewFunction(float[] newX, float[] newY, int index) Saves the current function and adds a blank new function.voidAccessor that sets the default directory.voidSets the axis labels.voidvoidsetResetEnabled(boolean enabled) Accessor that enables or disables the reset item.voidsetUnitsInLabel(String units) Sets the units in the default axis labels.voidsetVisible(boolean status) Makes the dialog visible in center of screen.voidsetVisibleNoLocChange(boolean status) Makes the dialog visible without setting position.voidAccessor that sets the VOI ViewJFrameGraph was made from.voidDOCUMENT ME!voidChangeListener************************************************************************* /** Sets values based on knob along sliderprivate voidprivate booleantestMaxParameter(String str, float maxValue) Tests that the entered parameter is above maxValue.private booleantestMinParameter(String str, float minValue) Tests that the entered parameter is below minValue.private booleantestParameter(String str, int minValue, int maxValue) Tests that the entered parameter is in range.voidupdate(float[][] x, float[][] y, int ptIndex) Updates the graph by changing the plot to the desired new 3 functions (RGB).voidupdate(float[] x, float[] y, int j) Updates the graph by changing the plot to the desired new function / intensity plot.voidCalls paint instead of erasing.voidDeprecated.If data were changed, this could be useful to refit data without pressing a new button, but this function is not currently utilized.private voidUpdates fields of the Modify Graph Dialog which may have changed due to things such as adding/deleting functions.voidwindowActivated(WindowEvent event) Unchanged.voidwindowClosed(WindowEvent event) Unchanged.voidwindowClosing(WindowEvent event) Disposes of error dialog, then frame.voidwindowDeactivated(WindowEvent event) Unchanged.voidwindowDeiconified(WindowEvent event) Unchanged.voidwindowIconified(WindowEvent event) Unchanged.voidwindowOpened(WindowEvent event) Unchanged.Methods inherited from class javax.swing.JFrame
addImpl, createRootPane, frameInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setIconImage, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandlerMethods inherited from class java.awt.Frame
addNotify, getCursorType, getExtendedState, getFrames, getIconImage, getMaximizedBounds, getMenuBar, getState, getTitle, isResizable, isUndecorated, remove, removeNotify, setBackground, setCursor, setExtendedState, setMaximizedBounds, setMenuBar, setOpacity, setResizable, setShape, setState, setTitle, setUndecoratedMethods inherited from class java.awt.Window
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, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, show, toBack, toFrontMethods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setFont, transferFocusDownCycle, validate, validateTreeMethods inherited from class java.awt.Component
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, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, 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, requestFocus, requestFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setMixingCutoutShape, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.awt.MenuContainer
getFont, postEvent
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
MINIMUM_WIDTH
private static final int MINIMUM_WIDTHMinimum width of the graph panel- See Also:
-
MINIMUM_HEIGHT
private static final int MINIMUM_HEIGHTMinimum height of the graph panel- See Also:
-
PANEL_OFFSET
private static final int PANEL_OFFSETMinimum distance between frame and subpanels- See Also:
-
autoShrinkDomain
private boolean autoShrinkDomain -
autoShrinkDomainCheckbox
-
autoShrinkRange
private boolean autoShrinkRangeDOCUMENT ME! -
autoShrinkRangeCheckbox
DOCUMENT ME! -
axisPanel
DOCUMENT ME! -
backgroundButton
DOCUMENT ME! -
backgroundLabel
DOCUMENT ME! -
backgroundPanel
DOCUMENT ME! -
colorChooser
DOCUMENT ME! -
colorDialog
DOCUMENT ME! -
copyMenu
DOCUMENT ME! -
defaultDirectory
DOCUMENT ME! -
deleteMenu
DOCUMENT ME! -
editMenu
DOCUMENT ME! -
fileMenu
DOCUMENT ME! -
fitFunctPanel
DOCUMENT ME! -
fitFunctTypePanel
DOCUMENT ME! -
fitFunctVisibleCheckbox
DOCUMENT ME! -
fitFunctVisiblePanel
DOCUMENT ME! -
fitMode
Current mode for fitting functions -
frameGraphVOI
DOCUMENT ME! -
functionIndex
private int functionIndexDOCUMENT ME! -
functLineColorButton
DOCUMENT ME! -
functVisibleCheckbox
the slope changes. -
graph
DOCUMENT ME! -
gridlinesCheckbox
DOCUMENT ME! -
gridPanel
DOCUMENT ME! -
itemClose
DOCUMENT ME! -
itemModifyGraph
DOCUMENT ME! -
itemNormalize
DOCUMENT ME! -
itemOpenNewGraph
-
itemOpenSameGraph
DOCUMENT ME! -
itemPasteFunct
DOCUMENT ME! -
itemPrintGraph
DOCUMENT ME! -
itemResetGraph
DOCUMENT ME! -
itemResetDomain
-
itemResetRange
DOCUMENT ME! -
itemSaveGraph
DOCUMENT ME! -
itemTableOutput
-
lastUnits
DOCUMENT ME! -
legendCheckbox
DOCUMENT ME! -
nameField
DOCUMENT ME! -
functionLabel
DOCUMENT ME! -
legendPanel
DOCUMENT ME! -
mainPanel
DOCUMENT ME! -
maxDomainField
-
maxDomainLabel
-
minDomainField
-
minDomainLabel
-
maxRangeField
DOCUMENT ME! -
maxRangeLabel
DOCUMENT ME! -
minorTickMarksCheckbox
DOCUMENT ME! -
minRangeField
DOCUMENT ME! -
minRangeLabel
DOCUMENT ME! -
modifyDialog
DOCUMENT ME! -
modifyGraphPanel
DOCUMENT ME! -
functionPropPanel
DOCUMENT ME! -
openingMenuBar
DOCUMENT ME! -
linesOnlyButton
DOCUMENT ME! -
pointsAndLinesButton
-
pointsOnlyButton
-
pointsAndLinesGroup
-
pointsVisiblePanel
DOCUMENT ME! -
fitType
Combo box for selecting the fitting function type -
domainPanel
-
resetDomainButton
-
logScaleCheckboxX
-
doLogX
private boolean doLogX -
rangePanel
DOCUMENT ME! -
resetRangeButton
DOCUMENT ME! -
logScaleCheckboxY
-
doLogY
private boolean doLogY -
showPanel
DOCUMENT ME! -
tabbedPane
DOCUMENT ME! -
titleField
DOCUMENT ME! -
titleLabel
DOCUMENT ME! -
units
DOCUMENT ME! -
updateRGBIndex
private int updateRGBIndexDOCUMENT ME! -
vectorCopyFunct
DOCUMENT ME! -
vectorDeleteFunct
DOCUMENT ME! -
viewMenu
DOCUMENT ME! -
voi
DOCUMENT ME! -
xAxisLabel
DOCUMENT ME! -
xAxisLabelField
DOCUMENT ME! -
xGridEvenSpacedButton
-
xGridUserSpacedButton
-
xGridButtonGroup
-
xGridCheckBoxPanel
-
xGridCheckBoxList
-
xGridScrollPane
-
xGridLineField
DOCUMENT ME! -
xGridLineLabel
DOCUMENT ME! -
yAxisLabel
DOCUMENT ME! -
yAxisLabelField
DOCUMENT ME! -
yGridEvenSpacedButton
-
yGridUserSpacedButton
-
yGridButtonGroup
-
yGridCheckBoxPanel
-
yGridCheckBoxList
-
yGridScrollPane
-
yGridLineField
DOCUMENT ME! -
yGridLineLabel
DOCUMENT ME! -
xyCoords
private int[][] xyCoordsthis is a list of the x,y coords of the voi's boundary -
numVariablesLabel
-
numVariablesField
-
numVariables
private int numVariables -
image
-
RGBOffset
private int RGBOffset -
entireImage
private boolean entireImage -
initialSummaryBins
private int initialSummaryBins -
summaryBins
private int summaryBins -
initialUserMin
private double initialUserMin -
userMin
private double userMin -
initialUserMax
private double initialUserMax -
userMax
private double userMax -
minField
-
maxField
-
binsField
-
imageMin
private double imageMin -
imageMax
private double imageMax -
maxBins
private int maxBins -
histogramPanel
-
-
Constructor Details
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. No function is loaded by default, but the user can open a new function to be displayed- Parameters:
title- DOCUMENT ME!openFileGUI- DOCUMENT ME!
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the frame
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the frame
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.- Parameters:
x- the array of x coordinates to be plotted in the graphy- the array of y coordinates to be plotted in the graphtitle- the title of the framev- the VOI the graph is being made for
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.- Parameters:
x- the array of x coordinates to be plotted in the graphy- the array of y coordinates to be plotted in the graphtitle- the title of the framev- the VOI the graph is being made for
-
ViewJFrameGraph
public ViewJFrameGraph(ModelImage image, int RGBOffset, boolean entireImage, int initialSummaryBins, double initialUserMin, double initialUserMax, float[] xInit, float[] yInit, String title, String labelX, String labelY) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framelabelX- x axis labellabelY- y aixs label
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framelabelX- x axis labellabelY- y aixs label
-
ViewJFrameGraph
public ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY, boolean visible) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framelabelX- x axis labellabelY- y aixs label
-
ViewJFrameGraph
public ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, String labelX, String labelY) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framelabelX- x axis labellabelY- y axis label
-
ViewJFrameGraph
public ViewJFrameGraph(float[] xInit, float[] yInit, String title, VOI v, String units, int[][] xyCoords) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framev- the VOI the graph is being made forunits- the string representing the units of the curve (x-axis)xyCoords- actual x,y coords of the boundary go in here if not null
-
ViewJFrameGraph
Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Graph is assumed to be made from a VOIPoint. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framev- the VOI the graph is being made forunits- the string representing the units of the curve (x-axis)
-
ViewJFrameGraph
public ViewJFrameGraph(float[] xInit, float[] yInit, String title, String labelX, String labelY, Color color) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framelabelX- x axis labellabelY- y aixs labelcolor- DOCUMENT ME!
-
ViewJFrameGraph
public ViewJFrameGraph(float[][] xInit, float[][] yInit, String title, String labelX, String labelY, Color[] colorArray) Constructor Constructs the frame, with the graph component in one panel and the user options in the other. Draws initial default graph of desired function / intensity plot.- Parameters:
xInit- the array of x coordinates to be plotted in the graphyInit- the array of y coordinates to be plotted in the graphtitle- the title of the framelabelX- x axis labellabelY- y axis labelcolorArray- DOCUMENT ME!
-
-
Method Details
-
actionPerformed
Takes the action commands and paints if the apply button is pressed, closes if the close button is pressed.- Specified by:
actionPerformedin interfaceActionListener- Parameters:
event- event that triggers this function
-
fitFunctions
-
componentHidden
DOCUMENT ME!- Specified by:
componentHiddenin interfaceComponentListener- Parameters:
event- DOCUMENT ME!
-
componentMoved
DOCUMENT ME!- Specified by:
componentMovedin interfaceComponentListener- Parameters:
event- DOCUMENT ME!
-
componentResized
Resets the bounds of component graph if the window is resized.- Specified by:
componentResizedin interfaceComponentListener- Parameters:
event- event that triggered this function
-
componentShown
DOCUMENT ME!- Specified by:
componentShownin interfaceComponentListener- Parameters:
event- DOCUMENT ME!
-
deleteFunct
public void deleteFunct(int index) Deletes the indicated function from the graph.- Parameters:
index- the index of the function to be deleted
-
focusGained
Unchanged.- Parameters:
event- DOCUMENT ME!
-
focusLost
Unchanged.- Parameters:
event- DOCUMENT ME!
-
getDefaultDirectory
Accessor that gets the default directory.- Returns:
- the default directory
-
itemStateChanged
Unchanged.- Parameters:
event- DOCUMENT ME!
-
makeRangeSymmetric
public void makeRangeSymmetric()DOCUMENT ME! -
openNew
Opens Excel data (tab-delimited fields) into a new graph. The graphs could also have been saved using MIPAV- Returns:
- DOCUMENT ME!
- Throws:
IOException- DOCUMENT ME!
-
openSame
Opens Excel data (tab-delimited fields) into this graph. The graphs could also have been saved using MIPAV- Returns:
- DOCUMENT ME!
- Throws:
IOException- DOCUMENT ME!
-
replaceFunction
public void replaceFunction(float[] newX, float[] newY) Replaces the function used with a line image.- Parameters:
newX- a 1-d array of which contains the x-coordinates for the functionnewY- a 1-d array of which contains the y-coordinates for the function
-
replaceFunction
Replaces the function used with a line image.- Parameters:
newX- a 1-d array of which contains the x-coordinates for the functionnewY- a 1-d array of which contains the y-coordinates for the functionmyVoi- the new VOI for this functionindex- DOCUMENT ME!
-
saveNewFunction
public void saveNewFunction(float[] newX, float[] newY, int index) Saves the current function and adds a blank new function.- Parameters:
newX- array of which contains the x-coordinates for the new functionnewY- an array of which contains the y-coordinates for the new functionsindex- the index of the point to be updated
-
saveNewFunction
public void saveNewFunction(float[][] newX, float[][] newY, int ptIndex) Replaces the first three functions (used with RGB images).- Parameters:
newX- a 2-d array of which contains the x-coordinates for the three functions (RGB)newY- a 2-d array of which contains the y-coordinates for the three functions (RGB)ptIndex- the index of the point to be updated
-
setDefaultDirectory
Accessor that sets the default directory.- Parameters:
dir- string to set the default directory to
-
setLabels
Sets the axis labels.- Parameters:
labelX- DOCUMENT ME!labelY- DOCUMENT ME!
-
setLabelY
-
setResetEnabled
public void setResetEnabled(boolean enabled) Accessor that enables or disables the reset item.- Parameters:
enabled- boolean that enables if true, disables if false
-
setUnitsInLabel
Sets the units in the default axis labels.- Parameters:
units- the String representing the units to be displayed
-
setVisible
public void setVisible(boolean status) Makes the dialog visible in center of screen.- Overrides:
setVisiblein classWindow- Parameters:
status- - flag to indicating if the dialog should be visible
-
setVisibleNoLocChange
public void setVisibleNoLocChange(boolean status) Makes the dialog visible without setting position.- Parameters:
status- - flag to indicating if the dialog should be visible
-
setVOI
Accessor that sets the VOI ViewJFrameGraph was made from.- Parameters:
v- DOCUMENT ME!
-
showXYZLegends
public void showXYZLegends()DOCUMENT ME! -
stateChanged
ChangeListener************************************************************************* /** Sets values based on knob along slider- Specified by:
stateChangedin interfaceChangeListener- Parameters:
e- event that triggered this function
-
update
Calls paint instead of erasing. -
update
public void update(float[] x, float[] y, int j) Updates the graph by changing the plot to the desired new function / intensity plot.- Parameters:
x- the array of x coordinates to be plotted in the graphy- the array of y coordinates to be plotted in the graphj- The function index of which point to be updated
-
update
public void update(float[][] x, float[][] y, int ptIndex) Updates the graph by changing the plot to the desired new 3 functions (RGB).- Parameters:
x- the 2-d array of x coordinates to be plotted in the graph for each functiony- the 2-d array of y coordinates to be plotted in the graph for each functionptIndex- the index of the point to be updated (will not do anything if trying to update of an index different than updateRGBIndex)
-
updateFittedFunctions
public void updateFittedFunctions()Deprecated.If data were changed, this could be useful to refit data without pressing a new button, but this function is not currently utilized. Will be removed in future version of MIPAV unless a use can be found Updates Fitted Functions to accurately estimate the functions in the graph (Function data may have chaned due to realtime updating, and therefore the fitted functions must be updated). -
windowActivated
Unchanged.- Specified by:
windowActivatedin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
windowClosed
Unchanged.- Specified by:
windowClosedin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
windowClosing
Disposes of error dialog, then frame. Nullifies pointer to this in VOIPoint, if this graph was made from a VOIPoint.- Specified by:
windowClosingin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
windowDeactivated
Unchanged.- Specified by:
windowDeactivatedin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
windowDeiconified
Unchanged.- Specified by:
windowDeiconifiedin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
windowIconified
Unchanged.- Specified by:
windowIconifiedin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
windowOpened
Unchanged.- Specified by:
windowOpenedin interfaceWindowListener- Parameters:
event- DOCUMENT ME!
-
buildFitFunctPanel
private void buildFitFunctPanel()Creates a panel to edit various fitted function features. (Panel is to be used in the tabbed pane of the Modify Graph Dialog box -
buildFunctionPanel
private void buildFunctionPanel()Creates a panel where various features of the functions can be edited, such as showing the legend, and changing function names. This panel is used by the tabbed pane in Modify Graph Dialog Box. -
buildMenu
private void buildMenu()Function that builds the menu of various tools to be used in conjunction with the graph. ie: opening / saving files, changing gridlines, title / axis labels, etc. -
buildModifyGraphPanel
private void buildModifyGraphPanel()Creats a panel where various featuers of the graph can be edited, such as visbility of gridlines and minor tick marks, number of gridlines, background color, range, and labels for the title, x and y axiis. -
createModifyDialog
private void createModifyDialog()Creates a dialog box in which the user can modify various features of the graph. -
getMedian
private float getMedian(float[] toSort) DOCUMENT ME!- Parameters:
toSort- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
parseString
DOCUMENT ME!- Parameters:
s- DOCUMENT ME!len- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
print
private void print()Prints the current graph being displayed to the printer. -
save
Saves this graph as Excel data so that Excel can read in the data and graph it as an Excel file. The file can also be saved to be viewed at a later time with MIPAV- Throws:
IOException- DOCUMENT ME!
-
save
Saves this graph as Excel data so that Excel can read in the data and graph it as an Excel file. The file can also be saved to be viewed at a later time with MIPAV- Throws:
IOException- DOCUMENT ME!
-
tableOutput
private void tableOutput() -
testMaxParameter
Tests that the entered parameter is above maxValue.- Parameters:
str- the value entered by the usermaxValue- the value that the entered paramater must be more than- Returns:
- boolean result of test
-
testMinParameter
Tests that the entered parameter is below minValue.- Parameters:
str- the value entered by the userminValue- the value that the variable should be less than- Returns:
- boolean result of test
-
testParameter
Tests that the entered parameter is in range.- Parameters:
str- the value entered by the userminValue- the minimum value this variable may be set tomaxValue- the maximum value this variable may be set to- Returns:
- boolean result of test
-
updateModifyDialog
private void updateModifyDialog()Updates fields of the Modify Graph Dialog which may have changed due to things such as adding/deleting functions. -
getGraph
-
getFrameGraphics
-
removeComponentListener
public void removeComponentListener()
-