Class JDialogFileInfo
- 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.JDialogFileInfo
-
- 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 JDialogFileInfo extends JDialogBase implements java.awt.event.ActionListener
This class shows the dialog which conatains the file-info header information as used in the FileInfoBase class.it builds two tables, and any row can be made editable when supplied with the appropriate editor to use. Entries that are edited okay, reports updates to file info.
It merely brings up a JDalogEditor when "edit" button is clicked.
17 January 2002: Right now, this class is set up to handle only FileInfoAnalyze edits. This is because the
- Version:
- 0.2
- Author:
- parsonsd;
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
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 javax.swing.JButton
edit
DOCUMENT ME!private java.util.Hashtable
editorDialogTable
DOCUMENT ME!private FileInfoBase
fileinfo
DOCUMENT ME!private ModelImage
image
DOCUMENT ME!private java.util.Hashtable<java.lang.Integer,JDialogEditor>
primaryEditorHolder
private ViewTableModel
primaryModel
DOCUMENT ME!private javax.swing.JTable
primaryTable
DOCUMENT ME!private java.util.Hashtable<java.lang.Integer,java.util.Vector<java.lang.Integer>>
primaryTypeHolder
tpe holds the type of editor to be used; editor holds the editor dialog.private javax.swing.JScrollPane
scrollPane
DOCUMENT ME!private java.util.Hashtable<java.lang.Integer,JDialogEditor>
secondaryEditorHolder
private ViewTableModel
secondaryModel
DOCUMENT ME!private javax.swing.JTable
secondaryTable
DOCUMENT ME!private java.util.Hashtable<java.lang.Integer,java.util.Vector<java.lang.Integer>>
secondaryTypeHolder
DOCUMENT ME!private static long
serialVersionUID
Use serialVersionUID for interoperability.-
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 JDialogFileInfo(java.awt.Frame parent, java.lang.String title, ModelImage img)
This method displays all the valid variables, that is, the ones that are no longer equal to their default values.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
accessPrimaryData(java.lang.String name)
permits the caller to get a value out of the primary table by using the name given to the fileInfo.void
actionPerformed(java.awt.event.ActionEvent e)
closes the dialog when the user clicks close.void
appendPrimaryData(java.lang.String name, java.lang.String value)
appends a row to the end of the editable table.void
appendPrimaryData(java.lang.String name, java.lang.String value, int[] editor)
appends a row to the end of the primary info table. assigns this name/value pair to be editable and adds the fileinfo to listen for this name.void
appendSecondaryData(java.lang.String name, java.lang.String value)
appends a row to the end of the Secondary Info table.void
appendSecondaryData(java.lang.String name, java.lang.String value, int[] editor)
appends a row to the end of the editable table.private boolean
bringToFront(java.lang.String tagKey, java.util.Hashtable<java.lang.String,JDialogEditor> model)
checks whether or not the dialog exists; if it does, it brings the dialog to front.void
displayAboutInfo(FileInfoBase fileInfo)
makes the display frame. builds the layout.void
keyTyped(java.awt.event.KeyEvent ke)
DOCUMENT ME!protected java.lang.String[]
separateValues(java.lang.String incoming)
DOCUMENT ME!-
Methods inherited from class gov.nih.mipav.view.dialogs.JDialogBase
buildApplyButton, buildButtons, buildCancelButton, buildCancelButton, buildCloseButton, buildHelpButton, buildImageComboBox, buildOKButton, 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, windowClosing, 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
-
edit
private javax.swing.JButton edit
DOCUMENT ME!
-
editorDialogTable
private java.util.Hashtable editorDialogTable
DOCUMENT ME!
-
fileinfo
private FileInfoBase fileinfo
DOCUMENT ME!
-
image
private final ModelImage image
DOCUMENT ME!
-
primaryModel
private ViewTableModel primaryModel
DOCUMENT ME!
-
primaryTable
private javax.swing.JTable primaryTable
DOCUMENT ME!
-
primaryTypeHolder
private final java.util.Hashtable<java.lang.Integer,java.util.Vector<java.lang.Integer>> primaryTypeHolder
tpe holds the type of editor to be used; editor holds the editor dialog.
-
primaryEditorHolder
private final java.util.Hashtable<java.lang.Integer,JDialogEditor> primaryEditorHolder
-
scrollPane
private javax.swing.JScrollPane scrollPane
DOCUMENT ME!
-
secondaryModel
private ViewTableModel secondaryModel
DOCUMENT ME!
-
secondaryTable
private javax.swing.JTable secondaryTable
DOCUMENT ME!
-
secondaryTypeHolder
private final java.util.Hashtable<java.lang.Integer,java.util.Vector<java.lang.Integer>> secondaryTypeHolder
DOCUMENT ME!
-
secondaryEditorHolder
private final java.util.Hashtable<java.lang.Integer,JDialogEditor> secondaryEditorHolder
-
-
Constructor Detail
-
JDialogFileInfo
public JDialogFileInfo(java.awt.Frame parent, java.lang.String title, ModelImage img)
This method displays all the valid variables, that is, the ones that are no longer equal to their default values. It calls parseDate and parseTime when needed and translates other strings. However, this method does not yet translate every single DICOM tag, only those most used. The others it outputs as strings.- Parameters:
parent
- the number of columns an editable table should have (either 2 or 3 is allowed).title
- DOCUMENT ME!img
- DOCUMENT ME!
-
-
Method Detail
-
accessPrimaryData
public java.lang.String accessPrimaryData(java.lang.String name)
permits the caller to get a value out of the primary table by using the name given to the fileInfo.- Parameters:
name
- DOCUMENT ME!- Returns:
- the value returned is the first value which keys to this name; any other instances of the name will be
ignored.
Null
is returned if the name cannot be found
-
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent e)
closes the dialog when the user clicks close.Creates editor dialogs to allow changing the value-field of a tag when user clicks "Edit Tag" button. This implmentation supports virtually any number of tag editors, bringing forward any previously opened editor. Most processing occurs when this class hears an editor window close;
will alert any open window (frame) to set title as that information may have changed.
to make this more FileInfoBase friendly, add a public static void stateChanged(Vector) to FileInfoBase. Then remove the references to the cast. Otherwise, using the editors with other varieties of FileInfo will throw ClassCastExceptions. Also suggest that a distinct datatype (other than Vector) be created to handle the special needs.
- Specified by:
actionPerformed
in interfacejava.awt.event.ActionListener
- Overrides:
actionPerformed
in classJDialogBase
- Parameters:
e
- event that triggered this action
-
appendPrimaryData
public void appendPrimaryData(java.lang.String name, java.lang.String value)
appends a row to the end of the editable table.- Parameters:
name
- name file info parameter (ie., dimensions, extents, &c).value
- value value assigned to a fileinfo parameter
-
appendPrimaryData
public void appendPrimaryData(java.lang.String name, java.lang.String value, int[] editor)
appends a row to the end of the primary info table. assigns this name/value pair to be editable and adds the fileinfo to listen for this name.- Parameters:
name
- file info parameter (ie., dimensions, extents, &c).value
- value assigned to a fileinfo parametereditor
- The value of editor is the editor interface to be used. Eg., a JPanelEditDefault. Specified by- JDialogFileInfo#IntString
- JDialogFileInfo#FloatString
- JDialogFileInfo#AnalyzeDataType
- JDialogFileInfo#AnalyzeDescription
- JDialogFileInfo#AnalyzeOrientation
-
appendSecondaryData
public void appendSecondaryData(java.lang.String name, java.lang.String value)
appends a row to the end of the Secondary Info table. For non-editable data.- Parameters:
name
- name file info parameter (ie., dimensions, extents, &c).value
- ring value value assigned to a fileinfo parameter
-
appendSecondaryData
public void appendSecondaryData(java.lang.String name, java.lang.String value, int[] editor)
appends a row to the end of the editable table.- Parameters:
String
- name file info parameter (ie., dimensions, extents, &c).String
- value value assigned to a fileinfo parametereditor
- The value of editor is the editor interface to be used. Eg., a JPanelEditDefault. For example, specified by- JDialogEditor#STRING
- JDialogEditor#INT_STRING
- JDialogEditor#FLOAT_STRING
- JDialogEditor#ANALYZE_DATATYPE
- JDialogEditor#ANALYZE_DESCRIPTION
- JDialogEditor#ANALYZE_ORIENTATION
- JDialogEditor#ANALYZE_AXIS_ORIENTATION
- See Also:
JPanelEdit
-
displayAboutInfo
public void displayAboutInfo(FileInfoBase fileInfo)
makes the display frame. builds the layout.- Parameters:
fileInfo
- DOCUMENT ME!
-
keyTyped
public void keyTyped(java.awt.event.KeyEvent ke)
DOCUMENT ME!- Parameters:
ke
- DOCUMENT ME!
-
separateValues
protected java.lang.String[] separateValues(java.lang.String incoming)
DOCUMENT ME!- Parameters:
incoming
- DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
bringToFront
private boolean bringToFront(java.lang.String tagKey, java.util.Hashtable<java.lang.String,JDialogEditor> model)
checks whether or not the dialog exists; if it does, it brings the dialog to front.- Parameters:
tagKey
- the tag's Key. Used to dtermine if this tag already has an editor associated with it.model
- DOCUMENT ME!- Returns:
- true if both a tag with the tagkey existed in the list and the associated dialog was brought to front.
-
-