Package gov.nih.mipav.view.dialogs
Class JDialogDicom2XMLSelection
java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
javax.swing.JDialog
gov.nih.mipav.view.dialogs.JDialogBase
gov.nih.mipav.view.dialogs.JDialogListSaveSelection
gov.nih.mipav.view.dialogs.JDialogDicom2XMLSelection
- All Implemented Interfaces:
DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,PropertyChangeListener,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
Dialog to select DICOM files to convert to MIPAV XML or Minc 2.0 HDF format.
- Author:
- parsonsd
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassDicomTagIdentifiers allow collecting both the FileDicomTag with the associated FileDicomKey (the Group and element numbers, properly formatted) of the Dicom Tag in one place, and to ensure that they only display the key and the name string of the Tag intoString().private classThis inner class is the font style renderer for the dicom tags The left panel will display all possible DICOM tags...however, if the image has that particular tag, it will be bold fontNested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogListSaveSelection
JDialogListSaveSelection.JPanelListSelection, JDialogListSaveSelection.TagComparatorNested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested 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 Stringprivate static final longUse serialVersionUID for interoperability.private FileInfoDicomFileInfoDicom for source imageprivate booleanBoolean that determines if the window was closed (hitting the X) wasOkay = true means the [x] was not clicked.Fields inherited from class gov.nih.mipav.view.dialogs.JDialogListSaveSelection
selectFileA, selectFileB, selectorFields inherited from class gov.nih.mipav.view.dialogs.JDialogBase
applyButton, bar, cancelButton, cancelFlag, closeButton, HELP, helpButton, mainDialogPanel, NEW, OKButton, parentFrame, progressBar, REPLACE, runInSeparateThread, runningScriptFlag, runQuiet, serif12, serif12B, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields 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
ConstructorsConstructorDescriptionJDialogDicom2XMLSelection(FileInfoDicom sourceInfo, boolean isXML) Creates a new instance of JDialogDicom2XMLSelection. -
Method Summary
Modifier and TypeMethodDescriptionvoidHandles the IGNORE button possibility of the ActionEvent, otherwise passes control to the super event handler.private voidDOCUMENT ME!protected JPanelCreates an OK Button, which is relabeled "Save", an "Ignore" button, a "Cancel" and a "Help" button.protected JButtonCreates a button labelled "Ignore" and connects it to the action listener event list.protected JButtonUses the super method to create a standard OK Button, but then resets the button text to read "Save" leaving the action command string as normal: "OK".protected voidCalls the super.cancelAction.protected JComponentCreates a single JPanelFileSelector which refers to the file "dicomsave.dictionary" in the user.home (specified by java's properties) directory by default.Generates and returns the list data for the Source list from the dicom dictionary specified by the save panel as a Vector ofDicomTagIdentifier.Returns a hashtable of the keys and associated DICOM tags that are in the right-list.protected JPanelFileSelectionReturns the SelectFileB panel.Generates and returns the list data for the Source list from the dicom dictionary as a Vector ofDicomTagIdentifier.protected voidEmpties the right-list, then closes the dialog.protected voidokAction()Saves the list on the left side of the dialog, then closes the dialog.protected voidFills the source and selected item lists with the appropriate data.protected voidHere to allow subclasses to select the action to occur when a property change occurs in the select B panel.protected voidMethod to save the items in List B.booleanwasOkay()Returns true if the window was not closed using the 'X' and was instead closed after the user clicked the 'Save' button.voidwindowClosing(WindowEvent event) Closes window and disposes of frame and component.Methods inherited from class gov.nih.mipav.view.dialogs.JDialogListSaveSelection
buildSourcePanel, createButtonComponent, createListComponent, getSelectedList, getSourceList, initializeLayout, propertyChange, propertyChangeInSelectA, registerChangesMethods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, buildOKCancelButtons, buildTitledBorder, buildTitledBorder, createLabel, createProgressBar, createProgressBar, createTextField, focusGained, focusLost, getDialogName, isCancelled, isQuietRunning, isRunInSeparateThread, isScriptRunning, itemStateChanged, loadDefaults, loadDefaults, makeImageName, makeString, openNewFrame, saveDefaults, saveDefaults, setLeftHandSystem, setQuietRunning, setScriptRunning, setSeparateThread, setVisible, setVisible, setVisibleMenuBar, setVisibleStandard, setVOIManager, setWCSystem, testParameter, testParameterMin, updateFFTFileInfo, updateFileInfo, updateFileInfoOtherModality, updateFileInfoStatic, updateFileInfoStatic, updateFileTypeInfo, updateFileTypeInfo, windowActivated, windowClosed, windowDeactivated, windowDeiconified, windowIconified, windowOpenedMethods inherited from class javax.swing.JDialog
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, 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, remove, 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, transferFocusUpCycle
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
wasOkay
private boolean wasOkayBoolean that determines if the window was closed (hitting the X) wasOkay = true means the [x] was not clicked. -
destFormatStr
-
sourceInfo
FileInfoDicom for source image
-
-
Constructor Details
-
JDialogDicom2XMLSelection
Creates a new instance of JDialogDicom2XMLSelection.
-
-
Method Details
-
actionPerformed
Handles the IGNORE button possibility of the ActionEvent, otherwise passes control to the super event handler.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogListSaveSelection- Parameters:
ae- DOCUMENT ME!
-
getSaveTable
Returns a hashtable of the keys and associated DICOM tags that are in the right-list.- Returns:
- a Hashtable of the DICOM tags listed in the save-list.
-
wasOkay
public boolean wasOkay()Returns true if the window was not closed using the 'X' and was instead closed after the user clicked the 'Save' button.- Returns:
- whether the window was closed after the user clicked the 'Save' button
-
windowClosing
Closes window and disposes of frame and component.- Specified by:
windowClosingin interfaceWindowListener- Overrides:
windowClosingin classJDialogBase- Parameters:
event- Event that triggered function
-
buildButtons
Creates an OK Button, which is relabeled "Save", an "Ignore" button, a "Cancel" and a "Help" button.- Overrides:
buildButtonsin classJDialogBase- Returns:
- JPanel The button panel containing a collection of buttons to close the dialog and perform some action.
-
buildIgnoreButton
Creates a button labelled "Ignore" and connects it to the action listener event list.- Returns:
- DOCUMENT ME!
-
buildOKButton
Uses the super method to create a standard OK Button, but then resets the button text to read "Save" leaving the action command string as normal: "OK".- Overrides:
buildOKButtonin classJDialogBase- Returns:
- DOCUMENT ME!
-
cancelAction
protected void cancelAction()Calls the super.cancelAction.- Overrides:
cancelActionin classJDialogListSaveSelection
-
createFileSelectorComponent
Creates a single JPanelFileSelector which refers to the file "dicomsave.dictionary" in the user.home (specified by java's properties) directory by default.- Overrides:
createFileSelectorComponentin classJDialogListSaveSelection- Returns:
- this JPanelFileSelector
- See Also:
-
getSaveListData
Generates and returns the list data for the Source list from the dicom dictionary specified by the save panel as a Vector ofDicomTagIdentifier. The Vector returned is empty if the File listed by the save panel contains no tags, is non-existant, or is unspecified.- Returns:
- An ordered list of
DicomTagIdentifierof tags from the DICOM dictionary listed in the save tag file panel. The Vector returned is empty if the File listed by the save panel contains no tags, is non-existant, or is unspecified. - See Also:
-
getSaveTagFilePanel
Returns the SelectFileB panel.- Returns:
- DOCUMENT ME!
-
getSourceListData
Generates and returns the list data for the Source list from the dicom dictionary as a Vector ofDicomTagIdentifier.- Returns:
- Vector An ordered list of
DicomTagIdentifierof tags from the DICOM dictionary - See Also:
-
ignoreAction
protected void ignoreAction()Empties the right-list, then closes the dialog. -
okAction
protected void okAction()Saves the list on the left side of the dialog, then closes the dialog.- Overrides:
okActionin classJDialogListSaveSelection
-
populateLists
protected void populateLists()Fills the source and selected item lists with the appropriate data.- Overrides:
populateListsin classJDialogListSaveSelection
-
propertyChangeInSelectB
protected void propertyChangeInSelectB()Here to allow subclasses to select the action to occur when a property change occurs in the select B panel.- Overrides:
propertyChangeInSelectBin classJDialogListSaveSelection
-
saveListB
protected void saveListB()Method to save the items in List B. This is called by the OKAY button, and is probably implementation dependant.- Overrides:
saveListBin classJDialogListSaveSelection
-
addSortButtons
private void addSortButtons()DOCUMENT ME!
-