Examples of ExtendedConfiguration


Examples of org.jfree.util.ExtendedConfiguration

  public BaseFontSupport(final ITextFontRegistry registry, final String defaultEncoding)
  {
    this.baseFonts = new HashMap();
    this.registry = registry;
    this.defaultEncoding = defaultEncoding;
    final ExtendedConfiguration extendedConfig = LibFontBoot.getInstance().getExtendedConfig();
    this.useGlobalCache = extendedConfig.getBoolProperty("org.jfree.fonts.itext.UseGlobalFontCache");
  }
View Full Code Here

Examples of org.jfree.util.ExtendedConfiguration

    this.fontStorage = fontStorage;
    this.features = new HashSet();
    this.numericFeatures = new HashMap();

    final ExtendedConfiguration extendedConfig =
            LibLayoutBoot.getInstance().getExtendedConfig();
    final double defaultFontSize = extendedConfig.getIntProperty
        ("org.jfree.layouting.defaults.FontSize", 12);

    final int xxSmall = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.xx-small", 60);
    final int xSmall = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.x-small", 75);
    final int small = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.small", 89);
    final int medium = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.medium", 100);
    final int large = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.large", 120);
    final int xLarge = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.x-large", 150);
    final int xxLarge = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.xx-large", 200);

    fontSizes = new HashMap();
    fontSizes.put(FontSizeConstant.XX_SMALL,
            new Double(defaultFontSize * xxSmall / 100d));
    fontSizes.put(FontSizeConstant.X_SMALL,
            new Double(defaultFontSize * xSmall / 100d));
    fontSizes.put(FontSizeConstant.SMALL,
            new Double(defaultFontSize * small / 100d));
    fontSizes.put(FontSizeConstant.MEDIUM,
            new Double(defaultFontSize * medium / 100d));
    fontSizes.put(FontSizeConstant.LARGE,
            new Double(defaultFontSize * large / 100d));
    fontSizes.put(FontSizeConstant.X_LARGE,
            new Double(defaultFontSize * xLarge / 100d));
    fontSizes.put(FontSizeConstant.XX_LARGE,
            new Double(defaultFontSize * xxLarge / 100d));


    fontFamilies = new HashMap();

    setNumericFeatureValue(OutputProcessorFeature.DEFAULT_FONT_SIZE,
            defaultFontSize);

    final double fontSmoothThreshold =
        extendedConfig.getIntProperty("org.jfree.layouting.defaults.FontSmoothThreshold", 8);
    setNumericFeatureValue(OutputProcessorFeature.FONT_SMOOTH_THRESHOLD, fontSmoothThreshold);

  }
View Full Code Here

Examples of org.jfree.util.ExtendedConfiguration

    this.fontStorage = fontStorage;
    this.features = new HashSet();
    this.numericFeatures = new HashMap();

    final ExtendedConfiguration extendedConfig =
            LibLayoutBoot.getInstance().getExtendedConfig();
    final double defaultFontSize = extendedConfig.getIntProperty
        ("org.jfree.layouting.defaults.FontSize", 12);

    final int xxSmall = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.xx-small", 60);
    final int xSmall = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.x-small", 75);
    final int small = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.small", 89);
    final int medium = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.medium", 100);
    final int large = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.large", 120);
    final int xLarge = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.x-large", 150);
    final int xxLarge = extendedConfig.getIntProperty
            ("org.jfree.layouting.defaults.FontSizeFactor.xx-large", 200);

    fontSizes = new HashMap();
    fontSizes.put(FontSizeConstant.XX_SMALL,
            new Double(defaultFontSize * xxSmall / 100d));
    fontSizes.put(FontSizeConstant.X_SMALL,
            new Double(defaultFontSize * xSmall / 100d));
    fontSizes.put(FontSizeConstant.SMALL,
            new Double(defaultFontSize * small / 100d));
    fontSizes.put(FontSizeConstant.MEDIUM,
            new Double(defaultFontSize * medium / 100d));
    fontSizes.put(FontSizeConstant.LARGE,
            new Double(defaultFontSize * large / 100d));
    fontSizes.put(FontSizeConstant.X_LARGE,
            new Double(defaultFontSize * xLarge / 100d));
    fontSizes.put(FontSizeConstant.XX_LARGE,
            new Double(defaultFontSize * xxLarge / 100d));


    fontFamilies = new HashMap();

    setNumericFeatureValue(OutputProcessorFeature.DEFAULT_FONT_SIZE,
            defaultFontSize);

    final double fontSmoothThreshold =
        extendedConfig.getIntProperty("org.jfree.layouting.defaults.FontSmoothThreshold", 8);
    setNumericFeatureValue(OutputProcessorFeature.FONT_SMOOTH_THRESHOLD, fontSmoothThreshold);

  }
View Full Code Here

Examples of org.jfree.util.ExtendedConfiguration

  public BaseFontSupport (final String defaultEncoding)
  {
    this.baseFonts = new HashMap();
    this.defaultEncoding = defaultEncoding;
    final ExtendedConfiguration extendedConfig = LibLayoutBoot.getInstance()
            .getExtendedConfig();
    this.useGlobalCache = extendedConfig.getBoolProperty
            ("org.jfree.layouting.modules.output.pdf.itext.UseGlobalFontCache");

    this.baseFontFactory = new BaseFontFactory();
    this.baseFontFactory.registerDefaultFontPath(defaultEncoding);
  }
View Full Code Here

Examples of org.jfree.util.ExtendedConfiguration

    this.aliases = new HashMap();
  }

  private void registerDefaults()
  {
    ExtendedConfiguration config =
            LibFontBoot.getInstance().getExtendedConfig();

    Iterator encodings = config.findPropertyKeys
            ("org.jfree.fonts.encoding.manual.");
    while (encodings.hasNext())
    {
      final String key = (String) encodings.next();
      final String encodingClass = config.getConfigProperty(key);
      final Object maybeEncoding = ObjectUtilities.loadAndInstantiate
              (encodingClass, EncodingRegistry.class, Encoding.class);
      if (maybeEncoding != null)
      {
        // ok, loaded perfectly ..
        final Encoding encoding = (Encoding) maybeEncoding;
        final String name = encoding.getName();
        //Log.debug ("Manual mapping added. " + name);
        encodingsMapping.put(normalizeEncodingName(name), encodingClass);
      }
    }

    Iterator generateDirs = config.findPropertyKeys
            ("org.jfree.fonts.encoding.generated.");
    while (generateDirs.hasNext())
    {
      final String key = (String) generateDirs.next();
      final String dataLocation = config.getConfigProperty(key);
      try
      {
        final ResourceKey resKey = manager.createKey(dataLocation);
        final Resource res = manager.create(resKey, null, Properties.class);
        final Properties props = (Properties) res.getResource();
        final Iterator vals = props.entrySet().iterator();
        while (vals.hasNext())
        {
          final Map.Entry entry = (Map.Entry) vals.next();
          final String encName = (String) entry.getKey();
          final String encPath = (String) entry.getValue();
          final ResourceKey encKey = manager.deriveKey(resKey, encPath);
          //Log.debug ("Generated mapping added. " +  encName);
          generatedMapping.put(normalizeEncodingName(encName), encKey);
        }
      }
      catch (Exception e)
      {
        // ignore that key, it is behaving badly ..
        e.printStackTrace();
      }
    }

    final Iterator aliasesIt = config.findPropertyKeys
            (ENCODING_ALIAS_PREFIX);
    while (aliasesIt.hasNext())
    {
      final String key = (String) aliasesIt.next();
      final String alias = key.substring(ENCODING_ALIAS_PREFIX.length());
      final String target = config.getConfigProperty(key);
      aliases.put(normalizeEncodingName(alias), normalizeEncodingName(target));
    }
  }
View Full Code Here

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

        "org.pentaho.reporting.engine.classic.core.modules.output.table.html.TreatEllipseAsRectangle")))
    {
      addFeature(AbstractTableOutputProcessor.TREAT_ELLIPSE_AS_RECTANGLE);
    }

    final ExtendedConfiguration extendedConfig = new ExtendedConfigurationWrapper(configuration);
    final double deviceResolution = extendedConfig.getIntProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.table.html.DeviceResolution", 0);
    if (deviceResolution > 0)
    {
      setNumericFeatureValue(OutputProcessorFeature.DEVICE_RESOLUTION, deviceResolution);
    }
View Full Code Here

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

        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.EmbedFonts")))
    {
      addFeature(OutputProcessorFeature.EMBED_ALL_FONTS);
    }

    final ExtendedConfiguration extendedConfig = new ExtendedConfigurationWrapper(configuration);
    final double deviceResolution = extendedConfig.getIntProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.pdf.DeviceResolution", 0);
    if (deviceResolution > 0)
    {
      setNumericFeatureValue(OutputProcessorFeature.DEVICE_RESOLUTION, deviceResolution);
    }
View Full Code Here

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

    this.fontMetricsCache = new HashMap(); // needs to be a strong reference ..
    this.baselinesCache = new LFUMap(200);
    this.lookupKey = new FontMetricsKey();
    this.fontMetricsByStyleCache = new LFUMap(200);

    final ExtendedConfiguration extendedConfig = new ExtendedConfigurationWrapper(configuration);

    final double defaultFontSize = extendedConfig.getIntProperty(
        "org.pentaho.reporting.engine.classic.core.layout.defaults.FontSize", 12);

    fontFamilyMapping = new HashMap();

    setNumericFeatureValue(OutputProcessorFeature.DEFAULT_FONT_SIZE, defaultFontSize);

    final double fontSmoothThreshold =
        extendedConfig.getIntProperty("org.pentaho.reporting.engine.classic.core.layout.defaults.FontSmoothThreshold",
            8);
    setNumericFeatureValue(OutputProcessorFeature.FONT_SMOOTH_THRESHOLD, fontSmoothThreshold);

    if (extendedConfig.getBoolProperty("org.pentaho.reporting.engine.classic.core.layout.fontrenderer.UseMaxCharBounds",
        true) == false)
    {
      addFeature(OutputProcessorFeature.LEGACY_LINEHEIGHT_CALC);
    }
    if (extendedConfig.getBoolProperty("org.pentaho.reporting.engine.classic.core.FixImageResolutionMapping", true))
    {
      addFeature(OutputProcessorFeature.IMAGE_RESOLUTION_MAPPING);
    }
    if (extendedConfig.getBoolProperty("org.pentaho.reporting.engine.classic.core.UseNativeScaling", true))
    {
      addFeature(OutputProcessorFeature.PREFER_NATIVE_SCALING);
    }
    if (extendedConfig.getBoolProperty("org.pentaho.reporting.engine.classic.core.DetectExtraContent", true))
    {
      addFeature(OutputProcessorFeature.DETECT_EXTRA_CONTENT);
    }

    final double deviceResolution = extendedConfig.getIntProperty(
        "org.pentaho.reporting.engine.classic.core.layout.DeviceResolution", 72);
    if (deviceResolution > 0)
    {
      setNumericFeatureValue(OutputProcessorFeature.DEVICE_RESOLUTION, deviceResolution);
    }
View Full Code Here

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

    {
      addFeature(OutputProcessorFeature.ITERATIVE_RENDERING);
      addFeature(OutputProcessorFeature.UNALIGNED_PAGEBANDS);
    }

    final ExtendedConfiguration extendedConfig = new ExtendedConfigurationWrapper(configuration);
    final double deviceResolution = extendedConfig.getIntProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.table.rtf.DeviceResolution", 0);
    if (deviceResolution > 0)
    {
      setNumericFeatureValue(OutputProcessorFeature.DEVICE_RESOLUTION, deviceResolution);
    }
View Full Code Here

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

    if ("true".equals(configuration.getConfigProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.WatermarkPrinted")))
    {
      addFeature(OutputProcessorFeature.WATERMARK_SECTION);
    }
    final ExtendedConfiguration extendedConfig = new ExtendedConfigurationWrapper(configuration);
    final double deviceResolution = extendedConfig.getIntProperty
        ("org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.DeviceResolution", 0);
    if (deviceResolution > 0)
    {
      setNumericFeatureValue(OutputProcessorFeature.DEVICE_RESOLUTION, deviceResolution);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.