Class StyleDefinitionUtilities
- java.lang.Object
-
- org.pentaho.reporting.designer.core.editor.styles.styleeditor.StyleDefinitionUtilities
-
public class StyleDefinitionUtilities extends Object
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StyleDefinitionUtilities.OpenReportTask
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method 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 createdstatic 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.
-
-
-
Method Detail
-
promptReportFilename
public static File promptReportFilename(Component parent, File defaultFile)
Prompts the user for the name of the report file which should be created- Parameters:
parent
- the parent component of which the file chooser dialog will be a childdefaultFile
- the initially selected file.- Returns:
- The
File
which the report should be saved into, ornull
if the user does not want to continue with the save operation
-
saveStyleDefinitionAs
public static boolean saveStyleDefinitionAs(StyleDefinitionEditorContext activeContext, Component parent)
-
saveStyleDefinition
public static boolean saveStyleDefinition(StyleDefinitionEditorContext activeContext, Component parent)
-
validateFileExtension
public static File validateFileExtension(File proposedFile, Component parent)
Validates that the extension of the filename is prpt, and prompts the user if it is not.- Parameters:
proposedFile
- the target file to validateparent
- the parent component in case we need to display a dialog- Returns:
- the filename based on the validation and optional prompting, or
null
if the user decided to cancel the operaion
-
openStyleDefinition
public static void openStyleDefinition(StyleDefinitionEditorContext context)
Invoked when an action occurs.
-
-