org.jSyncManager.Client.GUIParts

Class RestoreDialog

Implemented Interfaces:
ActionListener, ListSelectionListener

public class RestoreDialog
extends JDialog
implements ActionListener, ListSelectionListener

The Restore Dialog class. This class extends JDialog to create a dialog that can detect available backup sets, and allow the user to select through them for one to use during a backup procedure.

Constructor Summary

RestoreDialog(Frame owner)
Constructs a new Restore Dialog instance.

Method Summary

void
actionPerformed(ActionEvent ae)
The action listener for the dialogs buttons.
File
getSelectedBackupSet()
Retreives the currently selected backup set element, if available.
void
setVisible(boolean b)
Overrides JDialog.setVisible in order to force the centering of the dialog.
void
valueChanged(ListSelectionEvent e)
This method is called whenever a registered JList is modified.

Constructor Details

RestoreDialog

public RestoreDialog(Frame owner)
Constructs a new Restore Dialog instance. Note that this dialog is automatically modal.
Parameters:
owner - the frame object that owns this dialog.

Method Details

actionPerformed

public void actionPerformed(ActionEvent ae)
The action listener for the dialogs buttons.
Parameters:
ae - the ActionEvent item to process.

getSelectedBackupSet

public File getSelectedBackupSet()
Retreives the currently selected backup set element, if available. If no backup set has been selected, this method returns null;
Returns:
the File object containing the path to the backup set.

setVisible

public void setVisible(boolean b)
Overrides JDialog.setVisible in order to force the centering of the dialog.
Parameters:
b - true if this dialog should be visible, false otherwise.

valueChanged

public void valueChanged(ListSelectionEvent e)
This method is called whenever a registered JList is modified.
Parameters:
e - the ListSelectionEvent item to process.