Class DialogManager

java.lang.Object
jspecview.dialog.DialogManager
Direct Known Subclasses:
AwtDialogManager, JsDialogManager

public abstract class DialogManager extends Object
Dialogs include Integration, PeakListing, Views, OverlayLegend, and Measurements These dialogs have been generalized for platform independence.' This manager is subclassed as AwtDialogManager and JsDialogManager, which apply their own interpretation of how to create the dialog and get its event callbacks. For any one session, there will be only one DialogManager, created in JSViewer. AwtDialogManager will create instances of AwtDialog extends javax.swing.JDialog; JsDialogManager will create instances of JsDialog extends jspecview.awtj2d.swing.JDialog.
Author:
hansonr
  • Field Details

  • Constructor Details

    • DialogManager

      public DialogManager()
  • Method Details

    • set

      public DialogManager set(JSViewer viewer)
    • getDialog

      public abstract PlatformDialog getDialog(JSVDialog jsvDialog)
    • getDialogInput

      public abstract String getDialogInput(Object parentComponent, String phrase, String title, int msgType, Object icon, Object[] objects, String defaultStr)
    • getLocationOnScreen

      public abstract int[] getLocationOnScreen(Object component)
    • getOptionFromDialog

      public abstract int getOptionFromDialog(Object frame, String[] items, JSVPanel jsvp, String dialogName, String labelName)
    • showMessageDialog

      public abstract void showMessageDialog(Object parentComponent, String msg, String title, int msgType)
    • showProperties

      public abstract void showProperties(Object frame, Spectrum spectrum)
    • showMessage

      public abstract void showMessage(Object frame, String text, String title)
    • registerDialog

      protected String registerDialog(JSVDialog jsvDialog)
      register the JSV dialog with a unique key to be used as an ID in callbacks optionKeys ending with "!" are one-of-a-kind, such as "views"
      Parameters:
      jsvDialog -
      Returns:
      id
    • registerSelector

      public void registerSelector(String selectorName, Object columnSelector)
    • getSelectorName

      protected String getSelectorName(Object selector)
    • showSourceErrors

      public void showSourceErrors(Object frame, JDXSource currentSource)
    • showSource

      public void showSource(Object frame, Spectrum spec)
    • processClick

      protected void processClick(String eventId)
      processing click event from platform DialogManager
      Parameters:
      eventId - dialogId/buttonId starting with "btn", "chk", "cmb", or "txt"
    • processTableEvent

      protected void processTableEvent(String eventId, int index1, int index2, boolean adjusting)
      processing table cell click event from platform DialogManager; takes two hits in AWT -- one a row, the other a column
      Parameters:
      eventId - dialogId/[ROW|COL] or just dialogId
      index1 - row if just dialogId or (row or col if AWT)
      index2 - column if just dialogId or -1 if AWT
      adjusting -
    • processWindowClosing

      protected void processWindowClosing(String dialogId)
      processing window closing event from platform DialogManager
      Parameters:
      dialogId -
    • fixTitle

      public static String fixTitle(String title)