Class JDialogFileInfo

All Implemented Interfaces:
DialogDefaultsInterface, ActionListener, FocusListener, ItemListener, WindowListener, ImageObserver, MenuContainer, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants

public class JDialogFileInfo extends JDialogBase implements 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:
  • Field Details

  • Constructor Details

    • JDialogFileInfo

      public JDialogFileInfo(Frame parent, 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 Details

    • accessPrimaryData

      public String accessPrimaryData(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(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 interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      e - event that triggered this action
    • appendPrimaryData

      public void appendPrimaryData(String name, String value)
      appends a row to the end of the editable table.
      Parameters:
      name - name file info parameter (ie., dimensions, extents, invalid input: '&c').
      value - value value assigned to a fileinfo parameter
    • appendPrimaryData

      public void appendPrimaryData(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.
      Parameters:
      name - file info parameter (ie., dimensions, extents, invalid input: '&c').
      value - value assigned to a fileinfo parameter
      editor - 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(String name, 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, invalid input: '&c').
      value - ring value value assigned to a fileinfo parameter
    • appendSecondaryData

      public void appendSecondaryData(String name, String value, int[] editor)
      appends a row to the end of the editable table.
      Parameters:
      editor - 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
      as a partial list.
      String - name file info parameter (ie., dimensions, extents, invalid input: '&c').
      String - value value assigned to a fileinfo parameter
      See Also:
    • displayAboutInfo

      public void displayAboutInfo(FileInfoBase fileInfo)
      makes the display frame. builds the layout.
      Parameters:
      fileInfo - DOCUMENT ME!
    • keyTyped

      public void keyTyped(KeyEvent ke)
      DOCUMENT ME!
      Parameters:
      ke - DOCUMENT ME!
    • separateValues

      protected String[] separateValues(String incoming)
      DOCUMENT ME!
      Parameters:
      incoming - DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • bringToFront

      private boolean bringToFront(String tagKey, Hashtable<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.