Package jspecview.dialog
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 int
static final int
static final int
static final int
protected JSViewer
static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
abstract PlatformDialog
abstract String
getDialogInput
(Object parentComponent, String phrase, String title, int msgType, Object icon, Object[] objects, String defaultStr) abstract int[]
getLocationOnScreen
(Object component) abstract int
getOptionFromDialog
(Object frame, String[] items, JSVPanel jsvp, String dialogName, String labelName) protected String
getSelectorName
(Object selector) protected void
processClick
(String eventId) processing click event from platform DialogManagerprotected 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 columnprotected void
processWindowClosing
(String dialogId) processing window closing event from platform DialogManagerprotected 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"void
registerSelector
(String selectorName, Object columnSelector) abstract void
showMessage
(Object frame, String text, String title) abstract void
showMessageDialog
(Object parentComponent, String msg, String title, int msgType) abstract void
showProperties
(Object frame, Spectrum spectrum) void
showSource
(Object frame, Spectrum spec) void
showSourceErrors
(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
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
-
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
-