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
,java.awt.event.ActionListener
,java.awt.event.FocusListener
,java.awt.event.ItemListener
,java.awt.event.WindowListener
,java.awt.image.ImageObserver
,java.awt.MenuContainer
,java.beans.PropertyChangeListener
,java.io.Serializable
,java.util.EventListener
,javax.accessibility.Accessible
,javax.swing.RootPaneContainer
,javax.swing.WindowConstants
public class JDialogDicom2XMLSelection extends JDialogListSaveSelection
Dialog to select DICOM files to convert to MIPAV XML or Minc 2.0 HDF format.- Author:
- parsonsd
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
JDialogDicom2XMLSelection.DicomTagIdentifier
DicomTagIdentifiers 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 class
JDialogDicom2XMLSelection.MyCellRenderer
This 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 font-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogListSaveSelection
JDialogListSaveSelection.JPanelListSelection, JDialogListSaveSelection.TagComparator
-
Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKAction
-
Nested classes/interfaces inherited from class javax.swing.JDialog
javax.swing.JDialog.AccessibleJDialog
-
Nested classes/interfaces inherited from class java.awt.Dialog
java.awt.Dialog.AccessibleAWTDialog, java.awt.Dialog.ModalExclusionType, java.awt.Dialog.ModalityType
-
Nested classes/interfaces inherited from class java.awt.Window
java.awt.Window.AccessibleAWTWindow, java.awt.Window.Type
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
destFormatStr
private static long
serialVersionUID
Use serialVersionUID for interoperability.private FileInfoDicom
sourceInfo
FileInfoDicom for source imageprivate boolean
wasOkay
Boolean 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, selector
-
Fields 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, voiManager
-
Fields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabled
-
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
-
-
Constructor Summary
Constructors Constructor Description JDialogDicom2XMLSelection(FileInfoDicom sourceInfo, boolean isXML)
Creates a new instance of JDialogDicom2XMLSelection.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
actionPerformed(java.awt.event.ActionEvent ae)
Handles the IGNORE button possibility of the ActionEvent, otherwise passes control to the super event handler.private void
addSortButtons()
DOCUMENT ME!protected javax.swing.JPanel
buildButtons()
Creates an OK Button, which is relabeled "Save", an "Ignore" button, a "Cancel" and a "Help" button.protected javax.swing.JButton
buildIgnoreButton()
Creates a button labelled "Ignore" and connects it to the action listener event list.protected javax.swing.JButton
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".protected void
cancelAction()
Calls the super.cancelAction.protected javax.swing.JComponent
createFileSelectorComponent()
Creates a single JPanelFileSelector which refers to the file "dicomsave.dictionary" in the user.home (specified by java's properties) directory by default.protected java.util.Vector<JDialogDicom2XMLSelection.DicomTagIdentifier>
getSaveListData()
Generates and returns the list data for the Source list from the dicom dictionary specified by the save panel as a Vector ofDicomTagIdentifier
.java.util.Hashtable<FileDicomKey,FileDicomTagInfo>
getSaveTable()
Returns a hashtable of the keys and associated DICOM tags that are in the right-list.protected JPanelFileSelection
getSaveTagFilePanel()
Returns the SelectFileB panel.protected java.util.Vector<JDialogDicom2XMLSelection.DicomTagIdentifier>
getSourceListData()
Generates and returns the list data for the Source list from the dicom dictionary as a Vector ofDicomTagIdentifier
.protected void
ignoreAction()
Empties the right-list, then closes the dialog.protected void
okAction()
Saves the list on the left side of the dialog, then closes the dialog.protected void
populateLists()
Fills the source and selected item lists with the appropriate data.protected void
propertyChangeInSelectB()
Here to allow subclasses to select the action to occur when a property change occurs in the select B panel.protected void
saveListB()
Method to save the items in List B.boolean
wasOkay()
Returns true if the window was not closed using the 'X' and was instead closed after the user clicked the 'Save' button.void
windowClosing(java.awt.event.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, registerChanges
-
Methods 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, windowOpened
-
Methods 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, update
-
Methods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
-
Methods 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, toFront
-
Methods 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, validateTree
-
Methods 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 Detail
-
serialVersionUID
private static final long serialVersionUID
Use serialVersionUID for interoperability.- See Also:
- Constant Field Values
-
wasOkay
private boolean wasOkay
Boolean that determines if the window was closed (hitting the X) wasOkay = true means the [x] was not clicked.
-
destFormatStr
private java.lang.String destFormatStr
-
sourceInfo
private FileInfoDicom sourceInfo
FileInfoDicom for source image
-
-
Constructor Detail
-
JDialogDicom2XMLSelection
public JDialogDicom2XMLSelection(FileInfoDicom sourceInfo, boolean isXML)
Creates a new instance of JDialogDicom2XMLSelection.
-
-
Method Detail
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent ae)
Handles the IGNORE button possibility of the ActionEvent, otherwise passes control to the super event handler.- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDialogListSaveSelection
- Parameters:
ae
- DOCUMENT ME!
-
getSaveTable
public java.util.Hashtable<FileDicomKey,FileDicomTagInfo> 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
public void windowClosing(java.awt.event.WindowEvent event)
Closes window and disposes of frame and component.- Specified by:
windowClosing
in interfacejava.awt.event.WindowListener
- Overrides:
windowClosing
in classJDialogBase
- Parameters:
event
- Event that triggered function
-
buildButtons
protected javax.swing.JPanel buildButtons()
Creates an OK Button, which is relabeled "Save", an "Ignore" button, a "Cancel" and a "Help" button.- Overrides:
buildButtons
in classJDialogBase
- Returns:
- JPanel The button panel containing a collection of buttons to close the dialog and perform some action.
-
buildIgnoreButton
protected javax.swing.JButton buildIgnoreButton()
Creates a button labelled "Ignore" and connects it to the action listener event list.- Returns:
- DOCUMENT ME!
-
buildOKButton
protected javax.swing.JButton 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:
buildOKButton
in classJDialogBase
- Returns:
- DOCUMENT ME!
-
cancelAction
protected void cancelAction()
Calls the super.cancelAction.- Overrides:
cancelAction
in classJDialogListSaveSelection
-
createFileSelectorComponent
protected javax.swing.JComponent 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:
createFileSelectorComponent
in classJDialogListSaveSelection
- Returns:
- this JPanelFileSelector
- See Also:
JPanelFileSelection
,JDialogListSaveSelection.initializeLayout()
,JDialogListSaveSelection.registerChanges()
-
getSaveListData
protected java.util.Vector<JDialogDicom2XMLSelection.DicomTagIdentifier> 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
DicomTagIdentifier
of 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:
DicomDictionary
,getSaveTagFilePanel()
-
getSaveTagFilePanel
protected JPanelFileSelection getSaveTagFilePanel()
Returns the SelectFileB panel.- Returns:
- DOCUMENT ME!
-
getSourceListData
protected java.util.Vector<JDialogDicom2XMLSelection.DicomTagIdentifier> 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
DicomTagIdentifier
of tags from the DICOM dictionary - See Also:
DicomDictionary
-
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:
okAction
in classJDialogListSaveSelection
-
populateLists
protected void populateLists()
Fills the source and selected item lists with the appropriate data.- Overrides:
populateLists
in 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:
propertyChangeInSelectB
in 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:
saveListB
in classJDialogListSaveSelection
-
addSortButtons
private void addSortButtons()
DOCUMENT ME!
-
-