Package org.purl.sword.client
Class ServiceDialog
java.lang.Object
org.purl.sword.client.ServiceDialog
Dialog that prompts the user to enter the details for a service
document location.
- Author:
- Neil Taylor
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOnBehalfOf
(String[] users) Add a list of onBehalfOf names.void
addServiceUrls
(String[] services) Add the list of service URLs.void
addUserIds
(String[] users) Add the list of user ids to the dialog.protected final JPanel
Create the controls that are displayed in the dialog.The location from the dialog.The onBehalfOf value from the dialog.Get the password from the dialog.Get the username from the controls on the dialog.int
show()
Show the dialog.
-
Constructor Details
-
ServiceDialog
Create a new instance.- Parameters:
parentFrame
- The parent frame. The dialog will be shown over the centre of this frame.
-
-
Method Details
-
show
public int show()Show the dialog.- Returns:
- The close option. This is one of the dialog options from JOptionPane.
-
createControls
Create the controls that are displayed in the dialog.- Returns:
- The panel that contains the controls.
-
getUsername
Get the username from the controls on the dialog.- Returns:
- The username.
-
getPassword
Get the password from the dialog.- Returns:
- The password.
-
getLocation
The location from the dialog.- Returns:
- The location.
-
getOnBehalfOf
The onBehalfOf value from the dialog.- Returns:
- The onBehalfOf value.
-
addUserIds
Add the list of user ids to the dialog.- Parameters:
users
- The list of user ids.
-
addServiceUrls
Add the list of service URLs.- Parameters:
services
- The service URLs.
-
addOnBehalfOf
Add a list of onBehalfOf names.- Parameters:
users
- The list of onBehalfOf items.
-