Class 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 in toString().
      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 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
      • Nested classes/interfaces inherited from class java.awt.Container

        java.awt.Container.AccessibleAWTContainer
      • Nested classes/interfaces inherited from class java.awt.Component

        java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
    • 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 of DicomTagIdentifier.
      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 of DicomTagIdentifier.
      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 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogListSaveSelection
        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 interface java.awt.event.WindowListener
        Overrides:
        windowClosing in class JDialogBase
        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 class JDialogBase
        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 class JDialogBase
        Returns:
        DOCUMENT ME!
      • 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 of DicomTagIdentifier. 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 of DicomTagIdentifier.
        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 class JDialogListSaveSelection
      • 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 class JDialogListSaveSelection
      • 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 class JDialogListSaveSelection
      • addSortButtons

        private void addSortButtons()
        DOCUMENT ME!