Class DialogManager
java.lang.Object
jspecview.dialog.DialogManager
- Direct Known Subclasses:
AwtDialogManager, JsDialogManager
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 Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intprotected JSViewerstatic final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringabstract PlatformDialogabstract StringgetDialogInput(Object parentComponent, String phrase, String title, int msgType, Object icon, Object[] objects, String defaultStr) abstract int[]getLocationOnScreen(Object component) abstract intgetOptionFromDialog(Object frame, String[] items, JSVPanel jsvp, String dialogName, String labelName) protected StringgetSelectorName(Object selector) protected voidprocessClick(String eventId) processing click event from platform DialogManagerprotected voidprocessTableEvent(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 columnprotected voidprocessWindowClosing(String dialogId) processing window closing event from platform DialogManagerprotected StringregisterDialog(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"voidregisterSelector(String selectorName, Object columnSelector) abstract voidshowMessage(Object frame, String text, String title) abstract voidshowMessageDialog(Object parentComponent, String msg, String title, int msgType) abstract voidshowProperties(Object frame, Spectrum spectrum) voidshowSource(Object frame, Spectrum spec) voidshowSourceErrors(Object frame, JDXSource currentSource)
-
Field Details
-
vwr
-
htDialogs
-
PLAIN_MESSAGE
public static final int PLAIN_MESSAGE- See Also:
-
ERROR_MESSAGE
public static final int ERROR_MESSAGE- See Also:
-
INFORMATION_MESSAGE
public static final int INFORMATION_MESSAGE- See Also:
-
WARNING_MESSAGE
public static final int WARNING_MESSAGE- See Also:
-
QUESTION_MESSAGE
public static final int QUESTION_MESSAGE- See Also:
-
-
Constructor Details
-
DialogManager
public DialogManager()
-
-
Method Details
-
set
-
getDialog
-
getDialogInput
-
getLocationOnScreen
-
getOptionFromDialog
-
showMessageDialog
-
showProperties
-
showMessage
-
registerDialog
-
registerSelector
-
getSelectorName
-
showSourceErrors
-
showSource
-
processClick
processing click event from platform DialogManager- Parameters:
eventId- dialogId/buttonId starting with "btn", "chk", "cmb", or "txt"
-
processTableEvent
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 dialogIdindex1- row if just dialogId or (row or col if AWT)index2- column if just dialogId or -1 if AWTadjusting-
-
processWindowClosing
processing window closing event from platform DialogManager- Parameters:
dialogId-
-
fixTitle
-