fable.gui.dialog
Class NewFeedDialog

java.lang.Object
  extended by Dialog
      extended by fable.gui.dialog.NewFeedDialog

public class NewFeedDialog
extends Dialog

This class provides static method that shows dialog box with name, URL, and folder tree structure to add a feed. Also user can choose to search the web for feeds or browse file system of their own.

Author:
Weijie Yuan, Wonsik Kim, Christopher Moh

Method Summary
static NewFeedDialogData showNewFeedDialog(Shell parent, FableComponent root, FableComponent currentPosition, FableManager fbm)
          Show a dialog box for adding feeds.
static NewFeedDialogData showNewFeedDialog(Shell parent, FableComponent root, FableManager fbm)
          Show a dialog box for adding feeds.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

showNewFeedDialog

public static NewFeedDialogData showNewFeedDialog(Shell parent,
                                                  FableComponent root,
                                                  FableComponent currentPosition,
                                                  FableManager fbm)
Show a dialog box for adding feeds.

Parameters:
parent - parent shell of this dialog box.
root - root of the ADT.
currentPosition - currently selected fable component.
fbm - fable manager object.
Returns:
a NewFeedDialogData object which takes all information gathered in this dialog box, or null if cancelled.
Requires:
parent != null, root != null, currentPosition should be a descendant of root, and if it is a direct child of root, it should be a Folder, fbm != null.

showNewFeedDialog

public static NewFeedDialogData showNewFeedDialog(Shell parent,
                                                  FableComponent root,
                                                  FableManager fbm)
Show a dialog box for adding feeds.

Parameters:
parent - parent shell of this dialog box.
root - root of the ADT.
fbm - fable manager object.
Returns:
a NewFeedDialogData object which takes all information gathered in this dialog box, or null if cancelled.
Requires:
parent != null, root != null, ! root.getChildren().isEmpty(), root.getChildren().get( 0 ) instanceof Folder, fbm != null.