Package gov.nih.mipav.view.dialogs
Class JDialogRawIO
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.JDialogRawIO
- All Implemented Interfaces:
DialogDefaultsInterface,ActionListener,FocusListener,ItemListener,WindowListener,ImageObserver,MenuContainer,Serializable,EventListener,Accessible,RootPaneContainer,WindowConstants
Simple dialog to indicate type, dimensionality, of a raw image or image with a fixed length header in front of the
image data. Checks the Preferences file, and will default to the most recently used JDialogRawIO values. The dialog
will save the values chosen when [OK] is struck.
- Version:
- 0.1 Aug 1, 1997, 0.2 Jun 20, 2001
- Author:
- Matthew J. McAuliffe, Ph.D., David Parsons
- 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 TypeFieldDescriptionprivate JCheckBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private JComboBoxDOCUMENT ME!private intDOCUMENT ME!private static final booleanDOCUMENT ME!private static final intDOCUMENT ME!private static final StringDOCUMENT ME!private static final intDOCUMENT ME!private static final StringDOCUMENT ME!private static final StringDOCUMENT ME!private int[]DOCUMENT ME!private booleanDOCUMENT ME!private int[]DOCUMENT ME!private JLabelDOCUMENT ME!private intDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonprivate JRadioButtonprivate JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private JRadioButtonDOCUMENT ME!private float[]DOCUMENT ME!private static final longUse serialVersionUID for interoperability.private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private JTextFieldDOCUMENT ME!private int[]DOCUMENT 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
ConstructorsConstructorDescriptionJDialogRawIO(Frame theParentFrame, String title) Creates new dialog for entering necessary info to read in RAW image. -
Method Summary
Modifier and TypeMethodDescriptionvoidactionPerformed(ActionEvent event) Closes dialog box when the OK button is pressed and sets the variables.voidextractExtents(String commas) Inserts the values given by the preference file into the extents fields of the dialog.voidextractResolutions(String commas) Inserts the values given by the preference file into the resolutions fields of the dialog.voidextractUnitIndeces(String commas) Inserts the values given by the preference file into the units of measure fields of the dialog.intAccessor that returns the data type.booleanAccessor that returns the endianess.int[]Accessor that returns the extents.intAccessor that returns the offset.float[]Accessor that returns the resolutions.int[]Accessor that returns the units of measure for each dimension.private voidinit()Initializes the GUI components and makes the dialog visible.Makes a single string out of the extents.Makes a single string out of the resolutions.Makes a single string out of the units of measure.voidsetBigEndian(boolean b) Marks the checkmark when true.private voidsetComboBox(JComboBox cBox) Sets combo box choices that match resolution units listed in FileInfoBase in the same order.voidMethod to preset the image data offset.voidsetDataType(int t) Accessor that sets the appropriate radio button as given by the image-data type.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:
-
DEFAULT_IMAGE_TYPE
private static final int DEFAULT_IMAGE_TYPEDOCUMENT ME!- See Also:
-
DEFAULT_BIG_ENDIAN_BYTE_ORDER
private static final boolean DEFAULT_BIG_ENDIAN_BYTE_ORDERDOCUMENT ME!- See Also:
-
DEFAULT_DATA_OFFSET
private static final int DEFAULT_DATA_OFFSETDOCUMENT ME!- See Also:
-
DEFAULT_EXTENTS
DOCUMENT ME!- See Also:
-
DEFAULT_RES
DOCUMENT ME!- See Also:
-
DEFAULT_UNIT_INDEX
DOCUMENT ME!- See Also:
-
checkboxEnd
DOCUMENT ME! -
comboBoxUnitOfMeasure1
DOCUMENT ME! -
comboBoxUnitOfMeasure2
DOCUMENT ME! -
comboBoxUnitOfMeasure3
DOCUMENT ME! -
comboBoxUnitOfMeasure4
DOCUMENT ME! -
comboBoxUnitOfMeasure5
DOCUMENT ME! -
dataType
private int dataTypeDOCUMENT ME! -
dimExtents
private int[] dimExtentsDOCUMENT ME! -
endianess
private boolean endianessDOCUMENT ME! -
extents
private int[] extentsDOCUMENT ME! -
labelOffset
DOCUMENT ME! -
offset
private int offsetDOCUMENT ME! -
radioARGB
DOCUMENT ME! -
radioARGB_USHORT
DOCUMENT ME! -
radioARGB_UINTEGER
-
radioARGB_FLOAT
-
radioBool
DOCUMENT ME! -
radioByte
DOCUMENT ME! -
radioDouble
DOCUMENT ME! -
radioFloat
DOCUMENT ME! -
radioInt
DOCUMENT ME! -
radioLong
DOCUMENT ME! -
radioShort
DOCUMENT ME! -
radioUByte
DOCUMENT ME! -
radioUInt
DOCUMENT ME! -
radioUShort
DOCUMENT ME! -
resolutions
private float[] resolutionsDOCUMENT ME! -
textDim1
DOCUMENT ME! -
textDim2
DOCUMENT ME! -
textDim3
DOCUMENT ME! -
textDim4
DOCUMENT ME! -
textDim5
DOCUMENT ME! -
textOffset
DOCUMENT ME! -
textRes1
DOCUMENT ME! -
textRes2
DOCUMENT ME! -
textRes3
DOCUMENT ME! -
textRes4
DOCUMENT ME! -
textRes5
DOCUMENT ME! -
unitsOfMeasure
private int[] unitsOfMeasureDOCUMENT ME!
-
-
Constructor Details
-
JDialogRawIO
Creates new dialog for entering necessary info to read in RAW image.- Parameters:
theParentFrame- Parent frametitle- Title of dialog frame
-
-
Method Details
-
actionPerformed
Closes dialog box when the OK button is pressed and sets the variables.- Specified by:
actionPerformedin interfaceActionListener- Overrides:
actionPerformedin classJDialogBase- Parameters:
event- Event that triggers this function
-
extractExtents
Inserts the values given by the preference file into the extents fields of the dialog.- Parameters:
commas- Delimited string representing the extents.
-
extractResolutions
Inserts the values given by the preference file into the resolutions fields of the dialog.- Parameters:
commas- Delimited string representing the resolutions.
-
extractUnitIndeces
Inserts the values given by the preference file into the units of measure fields of the dialog.- Parameters:
commas- Delimited string representing the units of measure.
-
getDataType
public int getDataType()Accessor that returns the data type.- Returns:
- The data type
-
getEndianess
public boolean getEndianess()Accessor that returns the endianess.- Returns:
- boolean indicating the endianess
-
getExtents
public int[] getExtents()Accessor that returns the extents.- Returns:
- The extents in an array
-
getOffset
public int getOffset()Accessor that returns the offset.- Returns:
- The offset
-
getResolutions
public float[] getResolutions()Accessor that returns the resolutions.- Returns:
- The resolutions in an array
-
getUnitsOfMeasure
public int[] getUnitsOfMeasure()Accessor that returns the units of measure for each dimension.- Returns:
- Int array indicating the unit of measure
-
makeExtentsString
Makes a single string out of the extents.- Returns:
- String with extents separated by commas.
-
makeResolutionString
Makes a single string out of the resolutions.- Returns:
- String with resolutions separated by commas.
-
makeUnitString
Makes a single string out of the units of measure.- Returns:
- String with units of measure separated by commas.
-
setBigEndian
public void setBigEndian(boolean b) Marks the checkmark when true. Equivalent to checkboxEnd.setSelected(b)- Parameters:
b- Value for the checkbox "Big Endian"
-
setDataOffset
Method to preset the image data offset.- Parameters:
o- The offset
-
setDataType
public void setDataType(int t) Accessor that sets the appropriate radio button as given by the image-data type.- Parameters:
t- The data type
-
init
private void init()Initializes the GUI components and makes the dialog visible. -
setComboBox
Sets combo box choices that match resolution units listed in FileInfoBase in the same order.- Parameters:
cBox- Combo box to setup to display the units
-