Package gov.nih.mipav.view.dialogs
Class JDialogEditor
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.JDialogEditor
- All Implemented Interfaces:
DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
Simple editor using JPanelEdits. Goal for 1.1 is to make JDialogDICOMTagEditor a subclass of this.
- See Also:
-
Nested Class Summary
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 TypeFieldDescriptionstatic final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!protected booleanDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!private StringDOCUMENT ME!static final intDOCUMENT ME!protected Objectthe representative key of this object; must be unique.protected JPanelEdit[]DOCUMENT ME!protected JTextFieldDOCUMENT ME!private StringDOCUMENT ME!private intDOCUMENT ME!private static final longUse serialVersionUID for interoperability.static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!static final intDOCUMENT ME!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, 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
ConstructorsConstructorDescriptionJDialogEditor(Dialog owner, Object tag, Object[] old, int[] editorType) sadly, the dialog doesn't know how to figure out what editor panels to apply to the different inputs, so old values must be sent as an array of objects. -
Method Summary
Modifier and TypeMethodDescriptionvoidDOCUMENT ME!private JPanelcreates a JPanel to hold the Okay and Cancel buttons. in a FlowLayout; presets all the listeners to the buttons, the fonts and text colour.this editor's okay editable value.used when editing images associated with a project.DOCUMENT ME!DOCUMENT ME!getKey()DOCUMENT ME!DOCUMENT ME!intgetRow()DOCUMENT ME!getValue()panel may have many seperate fields of entry for the user to speeratetly enter some values.booleancheck 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.makeAppropriateInputPanel(String oldVal, int edType) Selects the panel for a given inputted edType, filling it the given string.voidsetImageFileName(String file) DOCUMENT ME!voidDOCUMENT ME!voidsetPSetDescription(String desc) DOCUMENT ME!voidsetRow(int row) DOCUMENT ME!voidDOCUMENT ME!booleandialog is closed, but can its value be accepted now?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:
-
CHAR
public static final int CHARDOCUMENT ME!- See Also:
-
STRING
public static final int STRINGDOCUMENT ME!- See Also:
-
INT_STRING
public static final int INT_STRINGDOCUMENT ME!- See Also:
-
FLOAT_STRING
public static final int FLOAT_STRINGDOCUMENT ME!- See Also:
-
ANALYZE_DATATYPE
public static final int ANALYZE_DATATYPEDOCUMENT ME!- See Also:
-
ANALYZE_ORIENTATION
public static final int ANALYZE_ORIENTATIONDOCUMENT ME!- See Also:
-
ANALYZE_DESCRIPTION
public static final int ANALYZE_DESCRIPTIONDOCUMENT ME!- See Also:
-
ANALYZE_ORIGINATOR
public static final int ANALYZE_ORIGINATORDOCUMENT ME!- See Also:
-
ANALYZE_AUX
public static final int ANALYZE_AUXDOCUMENT ME!- See Also:
-
ANALYZE_DBNAME
public static final int ANALYZE_DBNAMEDOCUMENT ME!- See Also:
-
ANALYZE_VOX
public static final int ANALYZE_VOXDOCUMENT ME!- See Also:
-
ANALYZE_CAL
public static final int ANALYZE_CALDOCUMENT ME!- See Also:
-
ANALYZE_AXIS_ORIENTATION
public static final int ANALYZE_AXIS_ORIENTATIONDOCUMENT ME!- See Also:
-
IMAGE_ORIENTATION
public static final int IMAGE_ORIENTATIONDOCUMENT ME!- See Also:
-
XML_MODALITY
public static final int XML_MODALITYDOCUMENT ME!- See Also:
-
XML_RACE
public static final int XML_RACEDOCUMENT ME!- See Also:
-
XML_DOB
public static final int XML_DOBDOCUMENT ME!- See Also:
-
XML_SEX
public static final int XML_SEXDOCUMENT ME!- See Also:
-
XML_DATE
public static final int XML_DATEDOCUMENT ME!- See Also:
-
XML_TIME
public static final int XML_TIMEDOCUMENT ME!- See Also:
-
XML_VALUETYPE
public static final int XML_VALUETYPEDOCUMENT ME!- See Also:
-
XML_SETORPARAM
public static final int XML_SETORPARAMDOCUMENT ME!- See Also:
-
XML_LINKEDIMAGE
public static final int XML_LINKEDIMAGEDOCUMENT ME!- See Also:
-
BOOLEAN
public static final int BOOLEANDOCUMENT ME!- See Also:
-
FILE_STRING
public static final int FILE_STRINGDOCUMENT ME!- See Also:
-
closedOkay
protected boolean closedOkayDOCUMENT ME! -
key
the representative key of this object; must be unique. -
newValue
DOCUMENT ME! -
oldValue
DOCUMENT ME! -
imageFileName
DOCUMENT ME! -
psetDesc
DOCUMENT ME! -
row
private int rowDOCUMENT ME!
-
-
Constructor Details
-
JDialogEditor
sadly, the dialog doesn't know how to figure out what editor panels to apply to the different inputs, so old values must be sent as an array of objects.- Parameters:
owner- an array of Object that is the coded value for each of the values. The Old values will be printed out seperated by spaces.tag- a unique identifier for this editor (use getKey())old- DOCUMENT ME!editorType- an array specifying how each of the old values are to be edited. Ie.,
-
-
Method Details
-
actionPerformed
DOCUMENT ME!- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
ae- DOCUMENT ME!
-
getDisplayValue
this editor's okay editable value.all output strings are placed together, seperated by a space.
It might be required to subclass this method to have the seperator character be something else.
- Returns:
- DOCUMENT ME!
-
getDisplayValueForInfo
used when editing images associated with a project.- Returns:
- DOCUMENT ME!
-
getDisplayValueForParam
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getImageFileName
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getKey
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getPSetDescription
DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getRow
public int getRow()DOCUMENT ME!- Returns:
- DOCUMENT ME!
-
getValue
panel may have many seperate fields of entry for the user to speeratetly enter some values. For instance, if the date were entered in several different fields [month] [day] [year], then the return values could be the set {01, 01, 01}, instead of {jan, 01, 2001}. The way the returns is implementation specific, but that this permits a panel to interperet data for the caller.- Returns:
- The value of the Panel which can be in any format appropriate to the type, containing as many fields as needed to represent each distinct field of entry in the panel.
- See Also:
-
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.
-
makeAppropriateInputPanel
Selects the panel for a given inputted edType, filling it the given string. If the editor Type is not found, the JPanelEditDefault is returned.- Parameters:
oldVal- The string to fill the editor wedType- the editor panel to use- Returns:
- the apropriate JPanelEdit.
-
setImageFileName
DOCUMENT ME!- Parameters:
file- DOCUMENT ME!
-
setKey
DOCUMENT ME!- Parameters:
tag- DOCUMENT ME!
-
setPSetDescription
DOCUMENT ME!- Parameters:
desc- DOCUMENT ME!
-
setRow
public void setRow(int row) DOCUMENT ME!- Parameters:
row- DOCUMENT ME!
-
setTable
DOCUMENT ME!- Parameters:
ht- DOCUMENT ME!isSet- DOCUMENT ME!
-
wasDialogOkay
public boolean wasDialogOkay()dialog is closed, but can its value be accepted now?- Returns:
- DOCUMENT ME!
-
buildOkayCancelPanel
creates a JPanel to hold the Okay and Cancel buttons. in a FlowLayout; presets all the listeners to the buttons, the fonts and text colour.- Returns:
- the built and loaded JPanel.
-