Package org.pentaho.reporting.libraries.base.util

Examples of org.pentaho.reporting.libraries.base.util.FilesystemFilter


     */
    public void actionPerformed(final ActionEvent e)
    {
      final String entryName = getSelectedEntry();
      final FileFilter[] filters = {
          new FilesystemFilter(".properties", // NON-NLS
              Messages.getString("BundledResourceEditor.PropertiesTranslations")),
          new FilesystemFilter(new String[]{".xml", ".report", ".prpt", ".prpti", ".prptstyle"}, // NON-NLS
              Messages.getString("BundledResourceEditor.Resources"), true),
          new FilesystemFilter(new String[]{".gif", ".jpg", ".jpeg", ".png", ".svg", ".wmf"}, // NON-NLS
              Messages.getString("BundledResourceEditor.Images"), true),
      };

      final CommonFileChooser fileChooser = FileChooserService.getInstance().getFileChooser("resources");//NON-NLS
      fileChooser.setFilters(filters);
View Full Code Here


      final String valueRole = getValueRole();
      final JComboBox comboBox = getComboBox();
      if (RESOURCE_VALUE_ROLE.equals(valueRole))
      {
        final FileFilter[] filters = {
            new FilesystemFilter(".properties", // NON-NLS
                Messages.getString("BundledResourceEditor.PropertiesTranslations")),
            new FilesystemFilter(new String[]{".xml", ".report", ".prpt", ".prpti", ".prptstyle"}, // NON-NLS
                Messages.getString("BundledResourceEditor.Resources"), true),
            new FilesystemFilter(new String[]{".gif", ".jpg", ".jpeg", ".png", ".svg", ".wmf"}, // NON-NLS
                Messages.getString("BundledResourceEditor.Images"), true),
        };

        final CommonFileChooser chooser = FileChooserService.getInstance().getFileChooser("resources");
        chooser.setFilters(filters);
View Full Code Here

   * @return The <code>File</code> which the report should be saved into, or <code>null</code> if the user
   *         does not want to continue with the save operation
   */
  public static File promptReportFilename(final Component parent, final File defaultFile)
  {
    final FileFilter filter = new FilesystemFilter
        (new String[]{DEFAULT_EXTENSION},
            ActionMessages.getString("ReportBundleFileExtension.Description"), true);

    final CommonFileChooser fileChooser = FileChooserService.getInstance().getFileChooser("report");
    fileChooser.setSelectedFile(defaultFile);
View Full Code Here

   * @return The <code>File</code> which the report should be saved into, or <code>null</code> if the user
   *         does not want to continue with the save operation
   */
  public static File promptReportFilename(final Component parent, final File defaultFile)
  {
    final FileFilter filter = new FilesystemFilter
        (new String[]{DEFAULT_EXTENSION},
            Messages.getString("StyleDefinitionUtilities.FileDescription"), true);

    final CommonFileChooser fileChooser = FileChooserService.getInstance().getFileChooser(FILE_CHOOSER_TYPE);
    fileChooser.setSelectedFile(defaultFile);
View Full Code Here

  /**
   * Invoked when an action occurs.
   */
  public static void openStyleDefinition(final StyleDefinitionEditorContext context)
  {
    final FileFilter filter = new FilesystemFilter
        (new String[]{DEFAULT_EXTENSION},
            Messages.getString("StyleDefinitionUtilities.FileDescription"), true);

    final CommonFileChooser fileChooser = FileChooserService.getInstance().getFileChooser(FILE_CHOOSER_TYPE);
    fileChooser.setFilters(new FileFilter[]{filter});
View Full Code Here

      }

      return;
    }

    final FileFilter filter = new FilesystemFilter
        (new String[]{".xml", ".report", ".prpt", ".prpti"}, // NON-NLS
            ActionMessages.getString("OpenReportAction.FileTypeDescriptor"), true);

    final CommonFileChooser fileChooser = FileChooserService.getInstance().getFileChooser("report");//NON-NLS
    fileChooser.setFilters(new FileFilter[]{filter});
View Full Code Here

   * @return the initialized file chooser.
   */
  protected JFileChooser createFileChooser()
  {
    final JFileChooser fc = new JFileChooser();
    fc.addChoosableFileFilter(new FilesystemFilter(getFileExtension(), getFileDescription()));
    fc.setMultiSelectionEnabled(false);
    fc.setCurrentDirectory(getCurrentDirectory());
    return fc;
  }
View Full Code Here

     */
    public void actionPerformed(final ActionEvent e)
    {
      if (fileChooser == null)
      {
        final FileFilter filter = new FilesystemFilter
            (new String[]{".xml", ".report", ".prpt", ".prpti"}, "Report Definitions (*.xml, *.report, *.prpt)", true);
        fileChooser = new JFileChooser();
        fileChooser.setAcceptAllFileFilterUsed(true);
        fileChooser.addChoosableFileFilter(filter);
        fileChooser.setMultiSelectionEnabled(false);
View Full Code Here

  protected void performLoadFile()
  {
    if (fileChooser == null)
    {
      fileChooser = new JFileChooser();
      fileChooser.addChoosableFileFilter(new FilesystemFilter
          (CSV_FILE_EXTENSION, resources.getString("csvdemodialog.csv-file-description")));
      fileChooser.setMultiSelectionEnabled(false);
    }

    final int option = fileChooser.showOpenDialog(this);
View Full Code Here

    setContentPane(cPaneStatus);
    setEntryType(ConfigDescriptionEditor.TYPE_TEXT);
    setSelectedEntry(null);

    fileChooser = new JFileChooser();
    fileChooser.addChoosableFileFilter(new FilesystemFilter
        (".xml", resources.getString("config-description-editor.xml-files"))); //$NON-NLS-1$ //$NON-NLS-2$
    fileChooser.setMultiSelectionEnabled(false);

    setStatusText(resources.getString("config-description-editor.welcome")); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.util.FilesystemFilter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.