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

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


      final String encFile = getEncodingsDefinitionFile();
      final InputStream in = ObjectUtilities.getResourceAsStream
          (encFile, EncodingComboBoxModel.class);
      if (in == null)
      {
        final Messages messages = new Messages(locale, SwingCommonModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingCommonModule.class));
        logger.warn(messages.getString("EncodingComboBoxModel.WARN_ENCODING_FILE_NOT_FOUND", encFile)); //$NON-NLS-1$
      }
      else
      {
        try
        {
//          final Properties defaultEncodings = getDefaultEncodings();
          final Properties encDef = new Properties();
          final BufferedInputStream bin = new BufferedInputStream(in);
          try
          {
            encDef.load(bin);
          }
          finally
          {
            bin.close();
          }
          final Enumeration en = encDef.keys();
          while (en.hasMoreElements())
          {
            final String enc = (String) en.nextElement();
            // if not set to "true"
            if ("true".equalsIgnoreCase(encDef.getProperty(enc, "false"))) //$NON-NLS-1$ //$NON-NLS-2$
            {
              // if the encoding is disabled ...
              ecb.addEncoding(enc, ecb.getEncodingDescription(enc));
            }
          }
        }
        catch (IOException e)
        {
          final Messages messages = new Messages(locale, SwingCommonModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingCommonModule.class));
          logger.warn(messages.getString("EncodingComboBoxModel.WARN_ERROR_READING_ENCODING_FILE") + encFile,
              e); //$NON-NLS-1$
        }
      }
    }
    return ecb;
View Full Code Here


    this.job = job;
    this.progressListener = progressListener;
    if (swingGuiContext != null)
    {
      this.statusListener = swingGuiContext.getStatusListener();
      this.messages = new Messages(swingGuiContext.getLocale(), PrintingPlugin.BASE_RESOURCE_CLASS,
          ObjectUtilities.getClassLoader(PrintingPlugin.class));
    }
  }
View Full Code Here

    linesPerInch = StringUtil.parseFloat(report.getReportConfiguration().getConfigProperty
        (PlainTextPageableModule.LINES_PER_INCH), 6.0f);
    if (swingGuiContext != null)
    {
      this.statusListener = swingGuiContext.getStatusListener();
      this.messages = new Messages(swingGuiContext.getLocale(), PlainTextExportPlugin.BASE_RESOURCE_CLASS,
          ObjectUtilities.getClassLoader(PlainTextExportPlugin.class));
    }
  }
View Full Code Here

    this.report = report;
    if (swingGuiContext != null)
    {
      this.statusListener = swingGuiContext.getStatusListener();
      this.messages = new Messages(swingGuiContext.getLocale(), PdfExportPlugin.BASE_RESOURCE_CLASS,
          ObjectUtilities.getClassLoader(PdfExportPlugin.class));
    }
    else
    {
      this.messages = new Messages(Locale.getDefault(), PdfExportPlugin.BASE_RESOURCE_CLASS,
          ObjectUtilities.getClassLoader(PdfExportPlugin.class));
    }

    this.progressListener = progressListener;
    final Configuration config = report.getConfiguration();
View Full Code Here

      throw new NullPointerException();
    }

    if (lastMessages == null || ObjectUtilities.equal(locale, lastLocale) == false)
    {
      lastMessages = new Messages(locale, bundleLocation,
          ObjectUtilities.getClassLoader(AbstractMetaData.class));
      lastLocale = locale;
    }
    return lastMessages;
  }
View Full Code Here

      ed.pack();
      ed.setVisible(true);
    }
    catch (Exception e)
    {
      final Messages messages = new Messages
          (Locale.getDefault(), ConfigEditorBoot.BUNDLE_NAME, ObjectUtilities.getClassLoader(ConfigEditorBoot.class));
      final String message = messages.getString(
          "ConfigEditor.ERROR_0001_FAILED_TO_INITIALIZE"); //$NON-NLS-1$
      logger.debug(message, e);
      JOptionPane.showMessageDialog(null, message);
    }
  }
View Full Code Here

                                   final String resourceKey)
  {
    this.target = target;
    this.resourceBundleName = resourceBundleName;
    this.resourceKey = resourceKey;
    this.messages = new Messages(target.getLocale(), SwingCommonModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingCommonModule.class));
  }
View Full Code Here

    init();
  }

  private void init()
  {
    messages = new Messages(getLocale(), SwingCommonModule.BUNDLE_NAME,
        ObjectUtilities.getClassLoader(SwingCommonModule.class));
    setModal(true);
    detailsAction = new DetailsAction();

    messageLabel = new JLabel();
View Full Code Here

    {
      defaultDialog = new ExceptionDialog();
    }
    if (e != null)
    {
      final Messages messages = new Messages(Locale.getDefault(), SwingCommonModule.BUNDLE_NAME,
        ObjectUtilities.getClassLoader(SwingCommonModule.class));
      logger.error(messages.getErrorString("ExceptionDialog.ERROR_0001_USER_ERROR"), e); //$NON-NLS-1$
    }
    defaultDialog.setTitle(title);
    defaultDialog.setMessage(message);
    defaultDialog.setException(e);
    defaultDialog.adjustSize();
View Full Code Here

   * Initializes the dialog (Non-GUI stuff).
   */
  private void initConstructor()
  {
    updateRunnable = new ScreenUpdateRunnable();
    messages = new Messages(getLocale(), SwingCommonModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingCommonModule.class));
    initialize();
    addWindowListener(new ToFrontHandler());

    setOutputText(messages.getString("progress-dialog.perform-output")); //$NON-NLS-1$
View Full Code Here

TOP

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

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.