Class JDialogRawIO

  • 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 JDialogRawIO
    extends JDialogBase
    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:
    FileIO, 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
      JDialogRawIO​(java.awt.Frame theParentFrame, java.lang.String title)
      Creates new dialog for entering necessary info to read in RAW image.
    • 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 and sets the variables.
      void extractExtents​(java.lang.String commas)
      Inserts the values given by the preference file into the extents fields of the dialog.
      void extractResolutions​(java.lang.String commas)
      Inserts the values given by the preference file into the resolutions fields of the dialog.
      void extractUnitIndeces​(java.lang.String commas)
      Inserts the values given by the preference file into the units of measure fields of the dialog.
      int getDataType()
      Accessor that returns the data type.
      boolean getEndianess()
      Accessor that returns the endianess.
      int[] getExtents()
      Accessor that returns the extents.
      int getOffset()
      Accessor that returns the offset.
      float[] getResolutions()
      Accessor that returns the resolutions.
      int[] getUnitsOfMeasure()
      Accessor that returns the units of measure for each dimension.
      private void init()
      Initializes the GUI components and makes the dialog visible.
      java.lang.String makeExtentsString()
      Makes a single string out of the extents.
      java.lang.String makeResolutionString()
      Makes a single string out of the resolutions.
      java.lang.String makeUnitString()
      Makes a single string out of the units of measure.
      void setBigEndian​(boolean b)
      Marks the checkmark when true.
      private void setComboBox​(javax.swing.JComboBox cBox)
      Sets combo box choices that match resolution units listed in FileInfoBase in the same order.
      void setDataOffset​(java.lang.String o)
      Method to preset the image data offset.
      void setDataType​(int t)
      Accessor that sets the appropriate radio button as given by the image-data type.
      • 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

      • serialVersionUID

        private static final long serialVersionUID
        Use serialVersionUID for interoperability.
        See Also:
        Constant Field Values
      • DEFAULT_IMAGE_TYPE

        private static final int DEFAULT_IMAGE_TYPE
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • DEFAULT_BIG_ENDIAN_BYTE_ORDER

        private static final boolean DEFAULT_BIG_ENDIAN_BYTE_ORDER
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • DEFAULT_DATA_OFFSET

        private static final int DEFAULT_DATA_OFFSET
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • DEFAULT_EXTENTS

        private static final java.lang.String DEFAULT_EXTENTS
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • DEFAULT_RES

        private static final java.lang.String DEFAULT_RES
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • DEFAULT_UNIT_INDEX

        private static final java.lang.String DEFAULT_UNIT_INDEX
        DOCUMENT ME!
        See Also:
        Constant Field Values
      • checkboxEnd

        private javax.swing.JCheckBox checkboxEnd
        DOCUMENT ME!
      • comboBoxUnitOfMeasure1

        private javax.swing.JComboBox comboBoxUnitOfMeasure1
        DOCUMENT ME!
      • comboBoxUnitOfMeasure2

        private javax.swing.JComboBox comboBoxUnitOfMeasure2
        DOCUMENT ME!
      • comboBoxUnitOfMeasure3

        private javax.swing.JComboBox comboBoxUnitOfMeasure3
        DOCUMENT ME!
      • comboBoxUnitOfMeasure4

        private javax.swing.JComboBox comboBoxUnitOfMeasure4
        DOCUMENT ME!
      • comboBoxUnitOfMeasure5

        private javax.swing.JComboBox comboBoxUnitOfMeasure5
        DOCUMENT ME!
      • dataType

        private int dataType
        DOCUMENT ME!
      • dimExtents

        private int[] dimExtents
        DOCUMENT ME!
      • endianess

        private boolean endianess
        DOCUMENT ME!
      • extents

        private int[] extents
        DOCUMENT ME!
      • labelOffset

        private javax.swing.JLabel labelOffset
        DOCUMENT ME!
      • offset

        private int offset
        DOCUMENT ME!
      • radioARGB

        private javax.swing.JRadioButton radioARGB
        DOCUMENT ME!
      • radioARGB_USHORT

        private javax.swing.JRadioButton radioARGB_USHORT
        DOCUMENT ME!
      • radioBool

        private javax.swing.JRadioButton radioBool
        DOCUMENT ME!
      • radioByte

        private javax.swing.JRadioButton radioByte
        DOCUMENT ME!
      • radioDouble

        private javax.swing.JRadioButton radioDouble
        DOCUMENT ME!
      • radioFloat

        private javax.swing.JRadioButton radioFloat
        DOCUMENT ME!
      • radioInt

        private javax.swing.JRadioButton radioInt
        DOCUMENT ME!
      • radioLong

        private javax.swing.JRadioButton radioLong
        DOCUMENT ME!
      • radioShort

        private javax.swing.JRadioButton radioShort
        DOCUMENT ME!
      • radioUByte

        private javax.swing.JRadioButton radioUByte
        DOCUMENT ME!
      • radioUInt

        private javax.swing.JRadioButton radioUInt
        DOCUMENT ME!
      • radioUShort

        private javax.swing.JRadioButton radioUShort
        DOCUMENT ME!
      • resolutions

        private float[] resolutions
        DOCUMENT ME!
      • textDim1

        private javax.swing.JTextField textDim1
        DOCUMENT ME!
      • textDim2

        private javax.swing.JTextField textDim2
        DOCUMENT ME!
      • textDim3

        private javax.swing.JTextField textDim3
        DOCUMENT ME!
      • textDim4

        private javax.swing.JTextField textDim4
        DOCUMENT ME!
      • textDim5

        private javax.swing.JTextField textDim5
        DOCUMENT ME!
      • textOffset

        private javax.swing.JTextField textOffset
        DOCUMENT ME!
      • textRes1

        private javax.swing.JTextField textRes1
        DOCUMENT ME!
      • textRes2

        private javax.swing.JTextField textRes2
        DOCUMENT ME!
      • textRes3

        private javax.swing.JTextField textRes3
        DOCUMENT ME!
      • textRes4

        private javax.swing.JTextField textRes4
        DOCUMENT ME!
      • textRes5

        private javax.swing.JTextField textRes5
        DOCUMENT ME!
      • unitsOfMeasure

        private int[] unitsOfMeasure
        DOCUMENT ME!
    • Constructor Detail

      • JDialogRawIO

        public JDialogRawIO​(java.awt.Frame theParentFrame,
                            java.lang.String title)
        Creates new dialog for entering necessary info to read in RAW image.
        Parameters:
        theParentFrame - Parent frame
        title - Title of dialog frame
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent event)
        Closes dialog box when the OK button is pressed and sets the variables.
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
        Overrides:
        actionPerformed in class JDialogBase
        Parameters:
        event - Event that triggers this function
      • extractExtents

        public void extractExtents​(java.lang.String commas)
        Inserts the values given by the preference file into the extents fields of the dialog.
        Parameters:
        commas - Delimited string representing the extents.
      • extractResolutions

        public void extractResolutions​(java.lang.String commas)
        Inserts the values given by the preference file into the resolutions fields of the dialog.
        Parameters:
        commas - Delimited string representing the resolutions.
      • extractUnitIndeces

        public void extractUnitIndeces​(java.lang.String commas)
        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

        public java.lang.String makeExtentsString()
        Makes a single string out of the extents.
        Returns:
        String with extents separated by commas.
      • makeResolutionString

        public java.lang.String makeResolutionString()
        Makes a single string out of the resolutions.
        Returns:
        String with resolutions separated by commas.
      • makeUnitString

        public java.lang.String 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

        public void setDataOffset​(java.lang.String o)
        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

        private void setComboBox​(javax.swing.JComboBox cBox)
        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