Class JDialogFileInfoXML
- All Implemented Interfaces:
DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
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:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassClass to hold one table, model, invalid input: '&' label per parameter set There can be infinite parameter sets, and the sets are deletable, so each set display must be stored in a hashtable for easy access/deletion.classClass to hold one table, model, invalid input: '&' label per parameter set There can be infinite parameter sets, and the sets are deletable, so each set display must be stored in a hashtable for easy access/deletion.Nested classes/interfaces inherited from class gov.nih.mipav.view.dialogs.JDialogBase
JDialogBase.CancelAction, JDialogBase.HelpAction, JDialogBase.OKActionNested classes/interfaces inherited from class javax.swing.JDialog
JDialog.AccessibleJDialogNested classes/interfaces inherited from class java.awt.Dialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityTypeNested classes/interfaces inherited from class java.awt.Window
Window.AccessibleAWTWindow, Window.TypeNested classes/interfaces inherited from class java.awt.Container
Container.AccessibleAWTContainerNested classes/interfaces inherited from class java.awt.Component
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final JMenuItemmenu item for adding parameter.private JButtonbutton for adding sets.private JButtonbutton for adding surfaces.private JButtonedit button.private Hashtable<?, JDialogEditor> hashtable to store editor dialogs associated with the table.private JButtonexpand dicom tags button.private FileInfoImageXMLfile info xml to be displayed.private final ModelImagemodel image associated with the FileInfo.private Hashtable<Integer, JDialogEditor> private ViewTableModelmodel associated with investigator information.private JTableinvestigator information table.private booleanare the dicom tags expanded *private JScrollPanemaster scroll pane in which to display all information.private intcounter for number of sets within file info.private final String[]array of strings for parameter column names.private final Hashtable<Integer, JDialogEditor> private ViewTableModelmodel associated with primary image information.private JTableprimary image information table.Type holds the type of editor, editor holds the actual editor dialog.private JButtonbutton for removing parameters.private JButtonbutton for removing surfaces.private Hashtable<Integer, JDialogEditor> private ViewTableModelmodel associated with scan information.private JTablescan infomation table.private BoxBox to hold table information.private static final longUse serialVersionUID for interoperability.private Stringstring holding set description when adding a parameter.private final Hashtable<String, JDialogFileInfoXML.PSetDisplay> hash table holding set information.private TableSorterprivate Hashtable<Integer, JDialogEditor> private ViewTableModelmodel associated with subject information.private JTablesubject information table.private final String[]array of strings for surface column names.private final JDialogFileInfoXML.SurfaceDisplayfor displaying surfaces.private JLabelprivate ViewTableModelmodel associated with tag information.private JTableFields 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, voiManagerFields inherited from class javax.swing.JDialog
accessibleContext, rootPane, rootPaneCheckingEnabledFields inherited from class java.awt.Dialog
DEFAULT_MODALITY_TYPEFields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENTFields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTHFields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE -
Constructor Summary
ConstructorsConstructorDescriptionJDialogFileInfoXML(Frame parent, String title, ModelImage img) Creates a new JDialogFileInfoXML object. -
Method Summary
Modifier and TypeMethodDescriptionaccessPrimaryData(String name) permits the caller to get a value out of the primary table by using the name given to the fileInfo.voidcloses the dialog when the user clicks close.voidappendInvestigatorData(String name, String value, int[] editor) appends an editable row to the end of the investigators table.voidappendParameter(String setDesc, String paramName, String paramDesc, String valueType, String value, String date, String time) appends an editable row with the given parameter data to the proper set display table.voidappendPrimaryData(String name, String value) appends a non editable row to the end of the primary table.voidappendPrimaryData(String name, 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.voidappendScanData(String name, String value, int[] editor) appends an editable row to the end of the scan information table.voidappendSubjectData(String name, String value, int[] editor) appends an editable row to the end of the subject information table.voidappendTagData(String tag, String name, String value, int[] editor) appends an editable row to the end of the tag table.private booleanbringToFront(String tagKey, Hashtable<String, JDialogEditor> model) checks whether or not the dialog exists; if it does, it brings the dialog to front.voiddisplayAboutInfo(FileInfoImageXML fileInfo) makes the display frame. builds the layout.voidDOCUMENT ME!protected String[]separateValues(String incoming) Divides space separate strings into an array of strings.private static voidsort(ViewTableModel model, int col, boolean reverse) Sort the tag column or name column of the table model.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, windowOpenedMethods 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, updateMethods inherited from class java.awt.Dialog
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBackMethods 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, toFrontMethods 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, validateTreeMethods 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 Details
-
serialVersionUID
private static final long serialVersionUIDUse serialVersionUID for interoperability.- See Also:
-
addParam
menu item for adding parameter. -
addSet
button for adding sets. -
addSurface
button for adding surfaces. -
edit
edit button. -
expandTags
expand dicom tags button. -
isExpanded
private boolean isExpandedare the dicom tags expanded * -
editorDialogTable
hashtable to store editor dialogs associated with the table. -
fileinfo
file info xml to be displayed. -
image
model image associated with the FileInfo. -
investigatorModel
model associated with investigator information. -
tagModel
model associated with tag information. -
investigatorTable
investigator information table. -
tagTable
-
masterScrollPane
master scroll pane in which to display all information. -
numSets
private int numSetscounter for number of sets within file info. -
parameterColumnNames
array of strings for parameter column names. -
model associated with primary image information.
-
primaryTable
primary image information table. -
primaryTypeHolder
Type holds the type of editor, editor holds the actual editor dialog. -
primaryEditorHolder
-
subjectTypeHolder
-
subjectEditorHolder
-
scanTypeHolder
-
scanEditorHolder
-
investigatorTypeHolder
-
investigatorEditorHolder
-
tagTypeHolder
-
removeParam
button for removing parameters. -
removeSurface
button for removing surfaces. -
scanModel
model associated with scan information. -
scanTable
scan infomation table. -
scrollingBox
Box to hold table information. -
tagLabel
-
sorter
-
setDescforAddParam
string holding set description when adding a parameter. -
setHashtable
hash table holding set information. -
subjectModel
model associated with subject information. -
subjectTable
subject information table. -
surfaceColumnNames
array of strings for surface column names. -
surfaces
for displaying surfaces.
-
-
Constructor Details
-
JDialogFileInfoXML
Creates a new JDialogFileInfoXML object.- Parameters:
parent- Frametitle- Stringimg- ModelImage
-
-
Method Details
-
accessPrimaryData
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.
Nullis returned if the name cannot be found
-
actionPerformed
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:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
e- event that triggered this action
-
appendInvestigatorData
appends an editable row to the end of the investigators table.- Parameters:
name- DOCUMENT ME!value- DOCUMENT ME!editor- - list of editor types for editing this row
-
appendTagData
appends an editable row to the end of the tag table.- Parameters:
name- DOCUMENT ME!value- DOCUMENT ME!editor- - list of editor types for editing this rowdate-
-
appendParameter
public void appendParameter(String setDesc, String paramName, String paramDesc, String valueType, String value, String date, String time) appends an editable row with the given parameter data to the proper set display table.- Parameters:
setDesc- StringparamName- StringparamDesc- StringvalueType- Stringvalue- Stringdate- Stringtime- String
-
appendPrimaryData
appends a non editable row to the end of the primary table.- Parameters:
name- - file info parameter (ie., dimensions, extents, invalid input: '&c').value- - value assigned to a fileinfo parameter
-
appendPrimaryData
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, invalid input: '&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
-
appendScanData
appends an editable row to the end of the scan information table.- Parameters:
name- DOCUMENT ME!value- DOCUMENT ME!editor- - list of editor types for editing this row
-
appendSubjectData
appends an editable row to the end of the subject information table.- Parameters:
name- DOCUMENT ME!value- DOCUMENT ME!editor- - list of editor types for editing this row
-
displayAboutInfo
makes the display frame. builds the layout.- Parameters:
fileInfo- DOCUMENT ME!
-
keyTyped
DOCUMENT ME!- Parameters:
ke- DOCUMENT ME!
-
separateValues
Divides space separate strings into an array of strings.- Parameters:
incoming- string- Returns:
- array of separated strings
-
sort
Sort the tag column or name column of the table model. If reverse is true, sorts in reverse order.- Parameters:
model- the table model to sort oncol- column to sort onreverse- whether or not to sort in reverse order.
-
bringToFront
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.
-