Class JDialogDicom2XMLSelection

All Implemented Interfaces:
DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, RootPaneContainer, 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:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • 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 String destFormatStr
    • sourceInfo

      private FileInfoDicom sourceInfo
      FileInfoDicom for source image
  • Constructor Details

    • JDialogDicom2XMLSelection

      public JDialogDicom2XMLSelection(FileInfoDicom sourceInfo, boolean isXML)
      Creates a new instance of JDialogDicom2XMLSelection.
  • Method Details

    • actionPerformed

      public void actionPerformed(ActionEvent ae)
      Handles the IGNORE button possibility of the ActionEvent, otherwise passes control to the super event handler.
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogListSaveSelection
      Parameters:
      ae - DOCUMENT ME!
    • getSaveTable

      public 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(WindowEvent event)
      Closes window and disposes of frame and component.
      Specified by:
      windowClosing in interface WindowListener
      Overrides:
      windowClosing in class JDialogBase
      Parameters:
      event - Event that triggered function
    • buildButtons

      protected 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 JButton buildIgnoreButton()
      Creates a button labelled "Ignore" and connects it to the action listener event list.
      Returns:
      DOCUMENT ME!
    • buildOKButton

      protected 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!
    • cancelAction

      protected void cancelAction()
      Calls the super.cancelAction.
      Overrides:
      cancelAction in class JDialogListSaveSelection
    • createFileSelectorComponent

      protected 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 class JDialogListSaveSelection
      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 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:
    • getSaveTagFilePanel

      protected JPanelFileSelection getSaveTagFilePanel()
      Returns the SelectFileB panel.
      Returns:
      DOCUMENT ME!
    • getSourceListData

      protected 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:
    • 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
    • populateLists

      protected void populateLists()
      Fills the source and selected item lists with the appropriate data.
      Overrides:
      populateLists 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!