Class JDialogEditor

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

public class JDialogEditor extends JDialogBase
Simple editor using JPanelEdits. Goal for 1.1 is to make JDialogDICOMTagEditor a subclass of this.
See Also:
  • Field Details

    • serialVersionUID

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

      public static final int CHAR
      DOCUMENT ME!
      See Also:
    • STRING

      public static final int STRING
      DOCUMENT ME!
      See Also:
    • INT_STRING

      public static final int INT_STRING
      DOCUMENT ME!
      See Also:
    • FLOAT_STRING

      public static final int FLOAT_STRING
      DOCUMENT ME!
      See Also:
    • ANALYZE_DATATYPE

      public static final int ANALYZE_DATATYPE
      DOCUMENT ME!
      See Also:
    • ANALYZE_ORIENTATION

      public static final int ANALYZE_ORIENTATION
      DOCUMENT ME!
      See Also:
    • ANALYZE_DESCRIPTION

      public static final int ANALYZE_DESCRIPTION
      DOCUMENT ME!
      See Also:
    • ANALYZE_ORIGINATOR

      public static final int ANALYZE_ORIGINATOR
      DOCUMENT ME!
      See Also:
    • ANALYZE_AUX

      public static final int ANALYZE_AUX
      DOCUMENT ME!
      See Also:
    • ANALYZE_DBNAME

      public static final int ANALYZE_DBNAME
      DOCUMENT ME!
      See Also:
    • ANALYZE_VOX

      public static final int ANALYZE_VOX
      DOCUMENT ME!
      See Also:
    • ANALYZE_CAL

      public static final int ANALYZE_CAL
      DOCUMENT ME!
      See Also:
    • ANALYZE_AXIS_ORIENTATION

      public static final int ANALYZE_AXIS_ORIENTATION
      DOCUMENT ME!
      See Also:
    • IMAGE_ORIENTATION

      public static final int IMAGE_ORIENTATION
      DOCUMENT ME!
      See Also:
    • XML_MODALITY

      public static final int XML_MODALITY
      DOCUMENT ME!
      See Also:
    • XML_RACE

      public static final int XML_RACE
      DOCUMENT ME!
      See Also:
    • XML_DOB

      public static final int XML_DOB
      DOCUMENT ME!
      See Also:
    • XML_SEX

      public static final int XML_SEX
      DOCUMENT ME!
      See Also:
    • XML_DATE

      public static final int XML_DATE
      DOCUMENT ME!
      See Also:
    • XML_TIME

      public static final int XML_TIME
      DOCUMENT ME!
      See Also:
    • XML_VALUETYPE

      public static final int XML_VALUETYPE
      DOCUMENT ME!
      See Also:
    • XML_SETORPARAM

      public static final int XML_SETORPARAM
      DOCUMENT ME!
      See Also:
    • XML_LINKEDIMAGE

      public static final int XML_LINKEDIMAGE
      DOCUMENT ME!
      See Also:
    • BOOLEAN

      public static final int BOOLEAN
      DOCUMENT ME!
      See Also:
    • FILE_STRING

      public static final int FILE_STRING
      DOCUMENT ME!
      See Also:
    • closedOkay

      protected boolean closedOkay
      DOCUMENT ME!
    • key

      protected Object key
      the representative key of this object; must be unique.
    • newValue

      protected JPanelEdit[] newValue
      DOCUMENT ME!
    • oldValue

      protected JTextField oldValue
      DOCUMENT ME!
    • imageFileName

      private String imageFileName
      DOCUMENT ME!
    • psetDesc

      private String psetDesc
      DOCUMENT ME!
    • row

      private int row
      DOCUMENT ME!
  • Constructor Details

    • JDialogEditor

      public JDialogEditor(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.
      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

      public void actionPerformed(ActionEvent ae)
      DOCUMENT ME!
      Specified by:
      actionPerformed in interface ActionListener
      Overrides:
      actionPerformed in class JDialogBase
      Parameters:
      ae - DOCUMENT ME!
    • getDisplayValue

      public String 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

      public String getDisplayValueForInfo()
      used when editing images associated with a project.
      Returns:
      DOCUMENT ME!
    • getDisplayValueForParam

      public String getDisplayValueForParam()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getImageFileName

      public String getImageFileName()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getKey

      public Object getKey()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getPSetDescription

      public String getPSetDescription()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getRow

      public int getRow()
      DOCUMENT ME!
      Returns:
      DOCUMENT ME!
    • getValue

      public Vector<Object> 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

      public JPanelEdit makeAppropriateInputPanel(String oldVal, int edType)
      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 w
      edType - the editor panel to use
      Returns:
      the apropriate JPanelEdit.
    • setImageFileName

      public void setImageFileName(String file)
      DOCUMENT ME!
      Parameters:
      file - DOCUMENT ME!
    • setKey

      public void setKey(Object tag)
      DOCUMENT ME!
      Parameters:
      tag - DOCUMENT ME!
    • setPSetDescription

      public void setPSetDescription(String desc)
      DOCUMENT ME!
      Parameters:
      desc - DOCUMENT ME!
    • setRow

      public void setRow(int row)
      DOCUMENT ME!
      Parameters:
      row - DOCUMENT ME!
    • setTable

      public void setTable(Hashtable<?,?> ht, boolean isSet)
      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

      private JPanel 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.