Class JDialogDICOMNewTagEditor

  • 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 JDialogDICOMNewTagEditor
    extends JDialogBase
    dialog for adding new 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.01
    Author:
    William Gandler
    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
      JDialogDICOMNewTagEditor​(java.awt.Dialog parent, 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.
      java.lang.String getTagKey()
      returns the key to the edited tag (group,element) for the tag (ie., "0010,0040").
      java.lang.String getTagName()  
      java.lang.String getTagValue()  
      private boolean isHexadecimal​(java.lang.String tString)  
      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)  
      private boolean setVariables()  
      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

      • applyToAllSlicesCheckBox

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

        private javax.swing.JTextField textTagGroup
        DOCUMENT ME!
      • textTagElement

        private javax.swing.JTextField textTagElement
      • textTagName

        private javax.swing.JTextField textTagName
      • textTagValue

        private javax.swing.JTextField textTagValue
      • groupString

        java.lang.String groupString
      • elementString

        java.lang.String elementString
      • tagName

        java.lang.String tagName
      • tagValue

        java.lang.String tagValue
      • 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.
    • Constructor Detail

      • JDialogDICOMNewTagEditor

        public JDialogDICOMNewTagEditor​(java.awt.Dialog parent,
                                        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.
        _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
      • setVariables

        private boolean setVariables()
      • isHexadecimal

        private boolean isHexadecimal​(java.lang.String tString)
      • 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!
      • getTagName

        public java.lang.String getTagName()
      • getTagValue

        public java.lang.String getTagValue()
      • 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!