Package cern.accsoft.steering.util.gui
Class SwingUserInteractor
- java.lang.Object
-
- cern.accsoft.steering.util.gui.SwingUserInteractor
-
- All Implemented Interfaces:
UserInteractor
public class SwingUserInteractor extends java.lang.Object implements UserInteractor
This class provides methods for user-interaction through swing-dialogs.
-
-
Constructor Summary
Constructors Constructor Description SwingUserInteractor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringaskForString(java.lang.String question)java.lang.StringaskForString(java.lang.String question, java.lang.String defaultInput)java.lang.StringaskForString(java.lang.String question, java.lang.String defaultInput, java.awt.Component parent)booleanshowPanelDialog(PanelProvider panelProvider, java.awt.Component parent)opens a dialog with the panel of the given panelProviderbooleanshowPanelDialog(javax.swing.JPanel panel, java.awt.Component parent)opens a dialog with the given panel
-
-
-
Method Detail
-
askForString
public java.lang.String askForString(java.lang.String question, java.lang.String defaultInput)- Specified by:
askForStringin interfaceUserInteractor- Parameters:
question- the the String, which describes to the user, what to enter.defaultInput- the string to display as default for the input- Returns:
- the answer. Null, if aborted
-
askForString
public java.lang.String askForString(java.lang.String question, java.lang.String defaultInput, java.awt.Component parent)
-
askForString
public java.lang.String askForString(java.lang.String question)
- Specified by:
askForStringin interfaceUserInteractor- Parameters:
question- the the String, which describes to the user, what to enter.- Returns:
- the answer. Null, if aborted
-
showPanelDialog
public boolean showPanelDialog(javax.swing.JPanel panel, java.awt.Component parent)Description copied from interface:UserInteractoropens a dialog with the given panel- Specified by:
showPanelDialogin interfaceUserInteractor- Parameters:
panel- the panel to show in the dialogparent- the parent of the dialog- Returns:
- true, if the ok-button was pressed, false if not
-
showPanelDialog
public boolean showPanelDialog(PanelProvider panelProvider, java.awt.Component parent)
Description copied from interface:UserInteractoropens a dialog with the panel of the given panelProvider- Specified by:
showPanelDialogin interfaceUserInteractor- Parameters:
panelProvider- the panelProvider which provides the panel to showparent- the parent of the dialog- Returns:
- true, if the ok button was pressed, false otherwise
-
-