fable.gui.dialog
Class NewFolderDialog

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

public class NewFolderDialog
extends Dialog

This class provides static method that shows dialog box with name, and folder tree structure to add a folder.

Author:
Weijie Yuan, Wonsik Kim

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

Method Detail

showNewFolderDialog

public static NewFolderDialogData showNewFolderDialog(Shell parent,
                                                      FableComponent root)
Show a dialog box for adding folders.

Parameters:
parent - parent shell of this dialog box.
root - root of the ADT.
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.

showNewFolderDialog

public static NewFolderDialogData showNewFolderDialog(Shell parent,
                                                      FableComponent root,
                                                      FableComponent currentPosition)
Show a dialog box for adding folders.

Parameters:
parent - parent shell of this dialog box.
root - root of the ADT.
currentPosition - currently selected fable component.
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.