public class StyleDefinitionUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static class |
StyleDefinitionUtilities.OpenReportTask |
Modifier and Type | Method and Description |
---|---|
static void |
openStyleDefinition(StyleDefinitionEditorContext context)
Invoked when an action occurs.
|
static File |
promptReportFilename(Component parent,
File defaultFile)
Prompts the user for the name of the report file which should be created
|
static boolean |
saveStyleDefinition(StyleDefinitionEditorContext activeContext,
Component parent) |
static boolean |
saveStyleDefinitionAs(StyleDefinitionEditorContext activeContext,
Component parent) |
static File |
validateFileExtension(File proposedFile,
Component parent)
Validates that the extension of the filename is prpt, and prompts the user if it is not.
|
public static File promptReportFilename(Component parent, File defaultFile)
parent
- the parent component of which the file chooser dialog will be a childdefaultFile
- the initially selected file.File
which the report should be saved into, or null
if the user does not want
to continue with the save operationpublic static boolean saveStyleDefinitionAs(StyleDefinitionEditorContext activeContext, Component parent)
public static boolean saveStyleDefinition(StyleDefinitionEditorContext activeContext, Component parent)
public static File validateFileExtension(File proposedFile, Component parent)
proposedFile
- the target file to validateparent
- the parent component in case we need to display a dialognull
if the user decided to
cancel the operaionpublic static void openStyleDefinition(StyleDefinitionEditorContext context)