Class DICOMDisplayer

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, EventListener, Accessible, CellEditorListener, ListSelectionListener, RowSorterListener, TableColumnModelListener, TableModelListener, Scrollable

public class DICOMDisplayer extends JTable
This class is simply a table that goes in the query GUI and displays progress and error messages. In order for another function to call showMessage, it should call setMessageType first - the latter tells the table what column to display the message in.
Version:
1.0 July 1, 1999
Author:
Neva Cherniavsky
See Also:
  • Field Details

    • serialVersionUID

      private static final long serialVersionUID
      Use serialVersionUID for interoperability.
      See Also:
    • STATUS

      public static final int STATUS
      A status type message is "Sending query", "Moving images", etc.
      See Also:
    • PROGRESS

      public static final int PROGRESS
      A progress type message is the image number that is saved.
      See Also:
    • SOURCE

      public static final int SOURCE
      A source type message is the server from which the images are coming.
      See Also:
    • DESTINATION

      public static final int DESTINATION
      A destination type message is the file directory to which the images are going.
      See Also:
    • ERROR

      public static final int ERROR
      An error type message is one thrown in an exception or if the files were not saved.
      See Also:
    • ID

      public static int ID
      DOCUMENT ME!
    • row

      private static int row
      DOCUMENT ME!
    • col

      private static int col
      DOCUMENT ME!
    • succeeded

      private static boolean succeeded
      DOCUMENT ME!
    • message_id

      private static int[] message_id
      DOCUMENT ME!
    • columnNames

      private String[] columnNames
      DOCUMENT ME!
    • model

      private ViewTableModel model
      DOCUMENT ME!
  • Constructor Details

    • DICOMDisplayer

      public DICOMDisplayer()
      Creates a new table and table model and sets up the headers.
  • Method Details

    • getIDFromRow

      public static int getIDFromRow(int row)
      Returns the ID from the specificed row.
      Parameters:
      row - Row to get ID from.
      Returns:
      The id.
    • getRowFromID

      public static int getRowFromID(int id)
      Returns the row number that has a matching ID.
      Parameters:
      id - - to match to IDs in each row
      Returns:
      the row that has the matching ID; If this fails return -1
    • getSucceeded

      public static boolean getSucceeded()
      Static method that returns a boolean indicating if the program succeeded in saving the images to the home directory.
      Returns:
      flag indicating success
    • setMessageType

      public static void setMessageType(int process, int type)
      Sets the type of message so it will be displayed in the appropriate column.
      Parameters:
      process - DOCUMENT ME!
      type - type to set column to.
    • setSucceeded

      public void setSucceeded(boolean success)
      Sets the success flag.
      Parameters:
      success - flag indicating whether or not the file save succeeded
    • showMessage

      public void showMessage(String s)
      Displays the message in the appropriate column.
      Parameters:
      s - message to be displayed.
    • updateRow

      public int updateRow()
      Makes the row that's written into the next row available.
      Returns:
      DOCUMENT ME!