|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.rice.cs.drjava.ui.JavadocDialog
public class JavadocDialog
Manages a dialog box that can select a destination directory for generating Javadoc. The getDirectory method should be called to show the dialog, using the suggested location for the Javadoc as the "start" file. If the user modifies the selection once, the user's choice will be remembered and no further suggestions will be used.
| Field Summary | |
|---|---|
private JCheckBox |
_checkBox
Whether to always prompt for destination. |
private JDialog |
_dialog
Dialog to show. |
private JFrame |
_frame
Parent frame of the dialog. |
private JOptionPane |
_optionPane
OptionPane from which to get the results. |
private DirectorySelectorComponent |
_selector
File field and button. |
private File |
_suggestedDir
Current suggestion for the destination directory, or null. |
private boolean |
_useSuggestion
Whether to use the suggested directory each time the dialog is shown. |
| Constructor Summary | |
|---|---|
JavadocDialog(JFrame frame)
Creates a new JavadocDialog to show from the given frame. |
|
| Method Summary | |
|---|---|
private boolean |
_isPositiveResult()
Returns whether the JOptionPane currently has the OK_OPTION result. |
boolean |
askUser(String message,
String title)
Asks the user a yes/no question. |
File |
getDirectory(File start)
Shows the dialog prompting the user for a destination directory in which to generate Javadoc. |
boolean |
isRecursive()
Returns true if the user wants the directory to include all subdirectories. |
void |
setSuggestedDir(File dir)
Sets the suggested destination directory for Javadoc generation. |
void |
setUseSuggestion(boolean use)
Sets whether the dialog should use the suggested directory provided to the getDirectory method as the default location. |
void |
warnUser(String message,
String title)
Warns the user about an error condition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private final JFrame _frame
private final DirectorySelectorComponent _selector
private final JCheckBox _checkBox
private final JOptionPane _optionPane
private final JDialog _dialog
private boolean _useSuggestion
private File _suggestedDir
| Constructor Detail |
|---|
public JavadocDialog(JFrame frame)
frame - Parent frame of this dialog| Method Detail |
|---|
public boolean isRecursive()
DirectorySelector
isRecursive in interface DirectorySelector
public File getDirectory(File start)
throws OperationCanceledException
getDirectory in interface DirectorySelectorstart - The directory to display in the text box. If null,
the most recent suggested directory (passed in via setSuggestedDir)
is displayed, unless the user has modified a previous suggestion.
OperationCanceledException - if the selection request is canceled
public boolean askUser(String message,
String title)
askUser in interface DirectorySelector
public void warnUser(String message,
String title)
warnUser in interface DirectorySelectorpublic void setSuggestedDir(File dir)
dir - Suggested destination directorypublic void setUseSuggestion(boolean use)
use - Whether to use the suggested directoryprivate boolean _isPositiveResult()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||