Package org.pentaho.reporting.libraries.base.config

Examples of org.pentaho.reporting.libraries.base.config.Configuration


    final FormValidator formValidator = getFormValidator();
    formValidator.setEnabled(false);
    final ModifiableConfiguration repConf = reportJob.getReportConfiguration();
    final boolean inputStorageEnabled = isInputStorageEnabled(repConf);

    final Configuration loadedConfiguration;
    if (inputStorageEnabled)
    {
      loadedConfiguration = loadFromConfigStore(reportJob, repConf);
    }
    else
    {
      loadedConfiguration = repConf;
    }

    setDialogContents(loadedConfiguration);

    formValidator.setEnabled(true);
    formValidator.handleValidate();
    setModal(true);
    SwingUtil.centerDialogInParent(this);
    setVisible(true);
    if (isConfirmed() == false)
    {
      this.guiContext = defaultContext;
      return false;
    }

    formValidator.setEnabled(false);

    final Configuration fullDialogContents = grabDialogContents(true);
    final Enumeration configProperties =
        fullDialogContents.getConfigProperties();
    while (configProperties.hasMoreElements())
    {
      final String key = (String) configProperties.nextElement();
      repConf.setConfigProperty(key, fullDialogContents.getConfigProperty(key));
    }

    if (inputStorageEnabled)
    {
      saveToConfigStore(reportJob, repConf);
View Full Code Here


        reportJob.getTitle() + getConfigurationSuffix());

    try
    {
      final boolean fullStorageEnabled = isFullInputStorageEnabled(reportConfiguration);
      final Configuration dialogContents = grabDialogContents(fullStorageEnabled);
      final ConfigStorage storage = ConfigFactory.getInstance().getUserStorage();
      storage.store(configPath, dialogContents);
    }
    catch (ConfigStoreException cse)
    {
View Full Code Here

    return button;
  }

  private static boolean isLargeButtonsEnabled(final SwingGuiContext swingGuiContext)
  {
    final Configuration configuration = swingGuiContext.getConfiguration();
    if ("true".equals(configuration.getConfigProperty //$NON-NLS-1$
        ("org.pentaho.reporting.engine.classic.core.modules.gui.base.LargeIcons"))) //$NON-NLS-1$
    {
      return true;
    }
    return false;
View Full Code Here

  public static HashMap loadActions(final SwingGuiContext swingGuiContext)
  {
    final HashMap actions = new HashMap();

    final Configuration configuration = swingGuiContext.getConfiguration();
    final ActionCategory[] categories = loadCategories(swingGuiContext);
    final ActionFactory factory = PreviewPaneUtilities.createActionFactory(configuration);

    for (int i = 0; i < categories.length; i++)
    {
View Full Code Here


  public static ActionCategory[] loadCategories(final SwingGuiContext swingGuiContext)
  {
    final ArrayList categories = new ArrayList();
    final Configuration configuration = swingGuiContext.getConfiguration();
    final Iterator keys = configuration.findPropertyKeys(CATEGORY_PREFIX);
    while (keys.hasNext())
    {
      final String enableKey = (String) keys.next();
      if (enableKey.endsWith(".enabled") == false) //$NON-NLS-1$
      {
        continue;
      }

      if ("true".equals(configuration.getConfigProperty(enableKey)) == false) //$NON-NLS-1$
      {
        continue;
      }

      final String base = enableKey.substring(0, enableKey.length() - ".enabled".length()); //$NON-NLS-1$
      if (base.length() == 0)
      {
        continue;
      }

      final String categoryKey = base.substring(CATEGORY_PREFIX.length());
      final String className = configuration.getConfigProperty(base + ".class"); //$NON-NLS-1$
      ActionCategory actionCategory;
      if (className == null)
      {
        actionCategory = new ActionCategory();
      }
      else
      {
        actionCategory = (ActionCategory) ObjectUtilities.loadAndInstantiate
            (className, PreviewPane.class, ActionCategory.class);
        if (actionCategory == null)
        {
          actionCategory = new ActionCategory();
        }
      }

      final String positionText = configuration.getConfigProperty(base + ".position"); //$NON-NLS-1$
      actionCategory.setPosition(StringUtil.parseInt(positionText, 0));
      actionCategory.setName(categoryKey);
      actionCategory.setResourceBase(configuration.getConfigProperty(base + ".resource-base")); //$NON-NLS-1$
      actionCategory.setResourcePrefix(configuration.getConfigProperty(base + ".resource-prefix")); //$NON-NLS-1$
      actionCategory.initialize(swingGuiContext);
      categories.add(actionCategory);
    }

    return (ActionCategory[]) categories.toArray
View Full Code Here

    statusBar = new JStatusBar(previewPane.getIconTheme());

    pageLabel = new JLabel();

    final Configuration configuration = ClassicEngineBoot.getInstance().getGlobalConfig();
    final boolean progressBarEnabled = "true".equals(configuration //$NON-NLS-1$
        .getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.base.ProgressBarEnabled")); //$NON-NLS-1$
    final boolean progressDialogEnabled = "true".equals(configuration //$NON-NLS-1$
        .getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.base.ProgressDialogEnabled")); //$NON-NLS-1$

    if (progressBarEnabled)
    {
View Full Code Here

   */
  public boolean performShowExportDialog(final MasterReport job, final String configKey)
  {
    try
    {
      final Configuration configuration = job.getConfiguration();
      final String dialogClassName = configuration.getConfigProperty(configKey);
      final ExportDialog dialog = createExportDialog(dialogClassName);

      return dialog.performQueryForExport(job, getContext());
    }
    catch (InstantiationException e)
View Full Code Here

  }

  public static DataFactoryWriteHandler lookupWriteHandler(final DataFactory dataFactory)
  {
    final String configKey = PREFIX + dataFactory.getClass().getName();
    final Configuration globalConfig = ClassicEngineBoot.getInstance().getGlobalConfig();
    final String value = globalConfig.getConfigProperty(configKey);
    if (value != null)
    {
      return (DataFactoryWriteHandler) ObjectUtilities.loadAndInstantiate
          (value, DataFactoryWriter.class, DataFactoryWriteHandler.class);
    }
View Full Code Here

    final JPanel exportPane = createExportPane();

    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(getResources().getString("csvexportdialog.export-settings"), exportPane); //$NON-NLS-1$
    tabbedPane.add(getResources().getString("csvexportdialog.parameters"), getParametersPanel()); //$NON-NLS-1$
    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    if ("true".equals(config.getConfigProperty(
        "org.pentaho.reporting.engine.classic.core.modules.gui.csv.data.AdvancedSettingsAvailable")))
    {
      tabbedPane.add(getResources().getString("csvexportdialog.advanced-settings"),
          createAdvancedOptionsPanel()); //$NON-NLS-1$
    }
View Full Code Here

    getFormValidator().registerTextField(txDataFilename);
    getFormValidator().registerComboBox(cbEncoding);

    final JPanel exportPane = createExportPanel();

    final Configuration config = ClassicEngineBoot.getInstance().getGlobalConfig();
    final boolean advancedSettingsTabAvail =
        "true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.modules.gui.html.zip.AdvancedSettingsAvailable"));
    final boolean metaDataSettingsTabAvail =
        "true".equals(config.getConfigProperty(
            "org.pentaho.reporting.engine.classic.core.modules.gui.html.zip.MetaDataSettingsAvailable"));
    final JTabbedPane tabbedPane = new JTabbedPane();
    tabbedPane.add(getResources().getString("htmlexportdialog.export-settings"), exportPane); //$NON-NLS-1$
    tabbedPane.add(getResources().getString("htmlexportdialog.parameters"), getParametersPanel()); //$NON-NLS-1$
View Full Code Here

TOP

Related Classes of org.pentaho.reporting.libraries.base.config.Configuration

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.