org.purl.sword.client
Class ServiceDialog

java.lang.Object
  extended by org.purl.sword.client.ServiceDialog

public class ServiceDialog
extends Object

Dialog that prompts the user to enter the details for a service document location.

Author:
Neil Taylor

Constructor Summary
ServiceDialog(JFrame parentFrame)
          Create a new instance.
 
Method Summary
 void 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  JPanel createControls()
          Create the controls that are displayed in the dialog.
 String getLocation()
          The location from the dialog.
 String getOnBehalfOf()
          The onBehalfOf value from the dialog.
 String getPassword()
          Get the password from the dialog.
 String getUsername()
          Get the username from the controls on the dialog.
 int show()
          Show the dialog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ServiceDialog

public ServiceDialog(JFrame parentFrame)
Create a new instance.

Parameters:
parentFrame - The parent frame. The dialog will be shown over the centre of this frame.
Method Detail

show

public int show()
Show the dialog.

Returns:
The close option. This is one of the dialog options from JOptionPane.

createControls

protected final JPanel createControls()
Create the controls that are displayed in the dialog.

Returns:
The panel that contains the controls.

getUsername

public String getUsername()
Get the username from the controls on the dialog.

Returns:
The username.

getPassword

public String getPassword()
Get the password from the dialog.

Returns:
The password.

getLocation

public String getLocation()
The location from the dialog.

Returns:
The location.

getOnBehalfOf

public String getOnBehalfOf()
The onBehalfOf value from the dialog.

Returns:
The onBehalfOf value.

addUserIds

public void addUserIds(String[] users)
Add the list of user ids to the dialog.

Parameters:
users - The list of user ids.

addServiceUrls

public void addServiceUrls(String[] services)
Add the list of service URLs.

Parameters:
services - The service URLs.

addOnBehalfOf

public void addOnBehalfOf(String[] users)
Add a list of onBehalfOf names.

Parameters:
users - The list of onBehalfOf items.


Copyright © 2013 DuraSpace. All Rights Reserved.