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

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


  private ReportJobListener reportJobUpdateHandler;

  protected AbstractExportActionPlugin()
  {
    reportJobUpdateHandler = new ReportJobListener();
    messages = new Messages(Locale.getDefault(), SwingCommonModule.BUNDLE_NAME,
        ObjectUtilities.getClassLoader(SwingCommonModule.class));
  }
View Full Code Here


      eventSource.removePropertyChangeListener(ReportEventSource.REPORT_JOB_PROPERTY, reportJobUpdateHandler); // NON-NLS
    }

    if (oldContext != context)
    {
      messages = new Messages(context.getLocale(), SwingCommonModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingCommonModule.class));
      eventSource = context.getEventSource();
      eventSource.addPropertyChangeListener(ReportEventSource.REPORT_JOB_PROPERTY, reportJobUpdateHandler); //$NON-NLS-1$
      setEnabled(eventSource.getReportJob() != null);
    }
View Full Code Here

   * @param locale
   */
  public EncodingComboBoxModel(final Locale locale)
  {
    bundle = ResourceBundle.getBundle(EncodingComboBoxModel.BUNDLE_NAME, locale);
    messages = new Messages(locale, SwingCommonModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingCommonModule.class));
    ENCODING_DEFAULT_DESCRIPTION = messages.getString(
        "EncodingComboBoxModel.USER_ENCODING_DEFAULT_DESCRIPTION"); //$NON-NLS-1$
    encodings = new ArrayList();
    listDataListeners = null;
View Full Code Here

      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

      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

    this(true);
  }

  public PreviewPane(final boolean init)
  {
    messages = new Messages(getLocale(), SwingPreviewModule.BUNDLE_NAME,
        ObjectUtilities.getClassLoader(SwingPreviewModule.class));
    sizeLimiter = new WindowSizeLimiter();
    zoomActions = new HashMap<ActionCategory, ZoomAction[]>();

    this.menus = PreviewPane.EMPTY_MENU;
View Full Code Here

  protected void init()
  {
    setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);

    addComponentListener(new RequestFocusHandler());
    messages = new Messages(getLocale(), SwingPreviewModule.BUNDLE_NAME,
          ObjectUtilities.getClassLoader(SwingPreviewModule.class));

    previewPane = new PreviewPane();
    previewPane.setDeferredRepagination(true);
    addComponentListener(new TriggerPaginationListener(previewPane));
View Full Code Here

    this.progressDialog = dialog;
    this.report = report;
    if (swingGuiContext != null)
    {
      this.statusListener = swingGuiContext.getStatusListener();
      this.messages = new Messages(swingGuiContext.getLocale(), ExcelExportPlugin.BASE_RESOURCE_CLASS,
          ObjectUtilities.getClassLoader(ExcelExportPlugin.class));
    }
  }
View Full Code Here

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

    this.progressDialog = dialog;
    this.report = report;
    if (swingGuiContext != null)
    {
      this.statusListener = swingGuiContext.getStatusListener();
      this.messages = new Messages(swingGuiContext.getLocale(), ExcelExportPlugin.BASE_RESOURCE_CLASS,
          ObjectUtilities.getClassLoader(ExcelExportPlugin.class));
    }
  }
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.