Class JDialogDICOMTagEditor

  • 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.io.Serializable, java.util.EventListener, javax.accessibility.Accessible, javax.swing.RootPaneContainer, javax.swing.WindowConstants

    public class JDialogDICOMTagEditor
    extends JDialogBase
    dialog for editing DICOM tag information currently allows a limited number of special tags (procssing of which must be performed by the DICOM tag itself), but allows editing seperate multiplicity values.
    Version:
    0.02
    Author:
    David Parsons (parsonsd)
    See Also:
    Serialized Form
    • Nested Class Summary

      • 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
    • Constructor Summary

      Constructors 
      Constructor Description
      JDialogDICOMTagEditor​(java.awt.Dialog parent, java.lang.String _tagKey, FileDicomTagTable _tagTable, boolean modal, boolean isStandalone)
      builds a dialog box with as many input panels as is needed to allow changing each value (when there are more than one values (vm > 1). as in "v1\v2\v3") independantly of any other value in the tag.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent event)
      closes dialog box when the OK button is pressed.
      void addButtonListener​(java.awt.event.ActionListener listener)
      tell the "Apply to all slices" check-box, OK and cancel buttons to tell the calling object that it is doing something.
      boolean applyToAllSlices()
      accessor to see the value of the selected value of the applyToAllSlicesCheckBox.
      protected javax.swing.JPanel buildOKCancelPanel()
      builds the panel which allows user to accept or decline using this algorithm.
      javax.swing.Box getMainBox()  
      java.lang.String getTagKey()
      returns the key to the edited tag (group,element) for the tag (ie., "0010,0040").
      boolean isDialogOkay()
      check the dialog so that if all the fields are okay (have the right number of digits, etc) and there are no messages to send back to the user about correctness.
      private JPanelEdit makeAppropriateInputPanel​(java.lang.String editString)
      allows editing of the input value as allowed by kind of VR or keyword.
      FileDicomTag returnTag()
      returns the value of the edited tag.
      void setStruckOkayButton​(boolean struckOkayButton)  
      boolean wasDialogOkay()
      check the dialog that dialog's OKAY button was struck, and it closed without problems.
      • 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
      • applyToAllSlicesCheckBox

        private javax.swing.JCheckBox applyToAllSlicesCheckBox
        DOCUMENT ME!
      • newInputPanel

        private JPanelEdit[] newInputPanel
        DOCUMENT ME!
      • originalTextField

        private javax.swing.JTextField originalTextField
        DOCUMENT ME!
      • struckOkayButton

        private boolean struckOkayButton
        DOCUMENT ME!
      • tagKey

        private java.lang.String tagKey
        DOCUMENT ME!
      • tagTable

        private FileDicomTagTable tagTable
        A reference to the tag table containing the tag we will be editing.
      • mainBox

        private javax.swing.Box mainBox
        The main panel that is accessed.
    • Constructor Detail

      • JDialogDICOMTagEditor

        public JDialogDICOMTagEditor​(java.awt.Dialog parent,
                                     java.lang.String _tagKey,
                                     FileDicomTagTable _tagTable,
                                     boolean modal,
                                     boolean isStandalone)
        builds a dialog box with as many input panels as is needed to allow changing each value (when there are more than one values (vm > 1). as in "v1\v2\v3") independantly of any other value in the tag.
        Parameters:
        parent - DICOM key (gggg,eeee) for this tag (as might be stored in a hashtable.
        _tagKey - the owner of the JDialog. Sets the imageIcon.
        _tagTable - the tag table containing the tag to edit.
        modal - force this dialog to stay on top (when true)
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        closes dialog box when the OK button is pressed.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogBase
        Parameters:
        event - event that triggers this function
      • addButtonListener

        public void addButtonListener​(java.awt.event.ActionListener listener)
        tell the "Apply to all slices" check-box, OK and cancel buttons to tell the calling object that it is doing something. Creates a listener to an object
        Parameters:
        listener - listener object to listen to the OKButton, cancelButton, and applyToAllSlicesCheckBox.
      • applyToAllSlices

        public boolean applyToAllSlices()
        accessor to see the value of the selected value of the applyToAllSlicesCheckBox. Allows the user class to find out if the user wants the changes in the DICOM tag to be spread over an entire image-set.
        Returns:
        boolean the value of applyToAllSlicesCheckBox.isSelected()
      • getTagKey

        public java.lang.String getTagKey()
        returns the key to the edited tag (group,element) for the tag (ie., "0010,0040").
        Returns:
        DOCUMENT ME!
      • getMainBox

        public javax.swing.Box getMainBox()
        Returns:
        the mainBox
      • isDialogOkay

        public boolean isDialogOkay()
        check the dialog so that if all the fields are okay (have the right number of digits, etc) and there are no messages to send back to the user about correctness.
        Returns:
        boolean true if the dialog box is closing okay.
      • returnTag

        public FileDicomTag returnTag()
        returns the value of the edited tag.
        Returns:
        DOCUMENT ME!
      • wasDialogOkay

        public boolean wasDialogOkay()
        check the dialog that dialog's OKAY button was struck, and it closed without problems.
        Returns:
        boolean true if the dialog box closed okay.
      • setStruckOkayButton

        public void setStruckOkayButton​(boolean struckOkayButton)
      • buildOKCancelPanel

        protected javax.swing.JPanel buildOKCancelPanel()
        builds the panel which allows user to accept or decline using this algorithm.
        Returns:
        the panel already populated.
      • makeAppropriateInputPanel

        private JPanelEdit makeAppropriateInputPanel​(java.lang.String editString)
        allows editing of the input value as allowed by kind of VR or keyword.
        Parameters:
        editString - DOCUMENT ME!
        Returns:
        DOCUMENT ME!