Examples of JRValueDisplay


Examples of net.sf.jasperreports.charts.JRValueDisplay

    {
      chartPlot.setNeedlePaint(color);
    }

    // Set how the value is displayed.
    JRValueDisplay display = jrPlot.getValueDisplay();
    if (display != null)
    {
      if (display.getColor() != null)
      {
        chartPlot.setValuePaint(display.getColor());
      }

      if (display.getMask() != null)
      {
        chartPlot.setTickLabelFormat(new DecimalFormat(display.getMask()));
      }
      if (display.getFont() != null)
      {
        chartPlot.setValueFont(JRFontUtil.getAwtFont(display.getFont(), getLocale()));
      }

    }

    color = jrPlot.getTickColor();
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

      chartPlot.setMercuryPaint(color);
      chartPlot.setUseSubrangePaint(false);
    }

    // Set the formatting of the value display
    JRValueDisplay display = jrPlot.getValueDisplay();
    if (display != null)
    {
      if (display.getColor() != null)
      {
        chartPlot.setValuePaint(display.getColor());
      }
      if (display.getMask() != null)
      {
        chartPlot.setValueFormat(new DecimalFormat(display.getMask()));
      }
      if (display.getFont() != null)
      {
        chartPlot.setValueFont(JRFontUtil.getAwtFont(display.getFont(), getLocale()));
      }
    }

    // Set the location of where the value is displayed
    switch (jrPlot.getValueLocationValue())
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

        dialRange.setOuterRadius(0.41);
        dialPlot.addLayer(dialRange);
      }
    }

    JRValueDisplay display = jrPlot.getValueDisplay();
    String displayVisibility = display != null && getChart().hasProperties()
      ? getChart().getPropertiesMap().getProperty(PROPERTY_DIAL_VALUE_DISPLAY_VISIBLE) : "false";
    if(Boolean.valueOf(displayVisibility).booleanValue())
    {
      DialValueIndicator dvi = new DialValueIndicator(0);
      dvi.setBackgroundPaint(TRANSPARENT_PAINT);
//      dvi.setFont(JRFontUtil.getAwtFont(jrFont).deriveFont(10f).deriveFont(Font.BOLD));
      dvi.setOutlinePaint(TRANSPARENT_PAINT);
      dvi.setPaint(Color.WHITE);

      String pattern = display.getMask() != null ? display.getMask() : "#,##0.####";
      if(pattern != null)
      {
        dvi.setNumberFormat( new DecimalFormat(pattern));
      }
      dvi.setRadius(0.15);
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

    JRFont tickLabelFont = jrPlot.getTickLabelFont();
    Integer defaultBaseFontSize = (Integer)getDefaultValue(defaultChartPropertiesMap, ChartThemesConstants.BASEFONT_SIZE);
    Font themeTickLabelFont = getFont((JRFont)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_TICK_LABEL_FONT), tickLabelFont, defaultBaseFontSize);
    chartPlot.setTickLabelFont(themeTickLabelFont);
   
    JRValueDisplay display = jrPlot.getValueDisplay();
    JRFont displayFont = display.getFont();
    Font themeDisplayFont = getFont((JRFont)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_DISPLAY_FONT), displayFont, defaultBaseFontSize);
    // Set how the value is displayed.
    if (display != null)
    {
      if (display.getColor() != null)
      {
        chartPlot.setValuePaint(display.getColor());
      }

      if (display.getMask() != null)
      {
        chartPlot.setTickLabelFormat(new DecimalFormat(display.getMask()));
      }
      if (display.getFont() != null)
      {
        chartPlot.setValueFont(themeDisplayFont);
      }

    }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

      chartPlot.setMercuryPaint(color);
      chartPlot.setUseSubrangePaint(false);
    }

    // Set the formatting of the value display
    JRValueDisplay display = jrPlot.getValueDisplay();
    if (display != null)
    {
      if (display.getColor() != null)
      {
        chartPlot.setValuePaint(display.getColor());
      }
      if (display.getMask() != null)
      {
        chartPlot.setValueFormat(new DecimalFormat(display.getMask()));
      }
      if (display.getFont() != null)
      {
//        chartPlot.setValueFont(JRFontUtil.getAwtFont(display.getFont()));
      }
    }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

        dialRange.setOuterRadius(0.41);
        dialPlot.addLayer(dialRange);
      }
    }

    JRValueDisplay display = jrPlot.getValueDisplay();
    String displayVisibility = display != null && getChart().hasProperties()
      ? getChart().getPropertiesMap().getProperty(DefaultChartTheme.PROPERTY_DIAL_VALUE_DISPLAY_VISIBLE) : "false";

    if(Boolean.parseBoolean(displayVisibility))
    {
      DialValueIndicator dvi = new DialValueIndicator(0);
      dvi.setBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT);
//      dvi.setFont(JRFontUtil.getAwtFont(jrFont).deriveFont(10f).deriveFont(Font.BOLD));
      dvi.setOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT);
      dvi.setPaint(Color.WHITE);

      String pattern = display.getMask() != null ? display.getMask() : "#,##0.####";
      if(pattern != null)
        dvi.setNumberFormat( new DecimalFormat(pattern));
      dvi.setRadius(0.15);
      dvi.setValueAnchor(RectangleAnchor.CENTER);
      dvi.setTextAnchor(TextAnchor.CENTER);
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

    }
    //chartPlot.setForegroundAlpha(1f);
    Paint needlePaint = jrPlot.getNeedleColor() == null ? new Color(191, 48, 0) : jrPlot.getNeedleColor();
    chartPlot.setNeedlePaint(needlePaint);

    JRValueDisplay display = jrPlot.getValueDisplay();
    if(display != null)
    {
      Color valueColor = display.getColor() == null ? Color.BLACK : display.getColor();
      chartPlot.setValuePaint(valueColor);
      String pattern = display.getMask() != null ? display.getMask() : "#,##0.####";
      if(pattern != null)
        chartPlot.setTickLabelFormat( new DecimalFormat(pattern));
      JRFont displayFont = display.getFont();
      Font themeDisplayFont = getFont((JRFont)getDefaultValue(defaultPlotPropertiesMap, ChartThemesConstants.PLOT_DISPLAY_FONT), displayFont, defaultBaseFontSize);
 
      if (themeDisplayFont != null)
      {
        chartPlot.setValueFont(themeDisplayFont);
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

    chartPlot.setThermometerStroke(new BasicStroke(2f));
    chartPlot.setOutlineVisible(false);
    chartPlot.setValueFont(chartPlot.getValueFont().deriveFont(Font.BOLD));

    // Set the formatting of the value display
    JRValueDisplay display = jrPlot.getValueDisplay();
    if (display != null)
    {
      if (display.getColor() != null)
      {
        chartPlot.setValuePaint(display.getColor());
      }
      if (display.getMask() != null)
      {
        chartPlot.setValueFormat(new DecimalFormat(display.getMask()));
      }
      if (display.getFont() != null)
      {
//        chartPlot.setValueFont(JRFontUtil.getAwtFont(display.getFont()).deriveFont(Font.BOLD));
      }
    }
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

        dialRange.setOuterRadius(0.5);
        dialPlot.addLayer(dialRange);
      }
     
    }
    JRValueDisplay display = jrPlot.getValueDisplay();

    String displayVisibility = display != null && getChart().hasProperties() ?
        getChart().getPropertiesMap().getProperty(DefaultChartTheme.PROPERTY_DIAL_VALUE_DISPLAY_VISIBLE) : "false";

    if(Boolean.valueOf(displayVisibility).booleanValue())
    {
      ScaledDialValueIndicator dvi = new ScaledDialValueIndicator(0, dialUnitScale);
      dvi.setBackgroundPaint(ChartThemesConstants.TRANSPARENT_PAINT);
//      dvi.setFont(JRFontUtil.getAwtFont(jrFont).deriveFont(10f).deriveFont(Font.BOLD));
      dvi.setOutlinePaint(ChartThemesConstants.TRANSPARENT_PAINT);
      dvi.setPaint(Color.WHITE);

      String pattern = display.getMask() != null ? display.getMask() : "#,##0.####";
      if(pattern != null)
        dvi.setNumberFormat( new DecimalFormat(pattern));
      dvi.setRadius(0.15);
      dvi.setValueAnchor(RectangleAnchor.CENTER);
      dvi.setTextAnchor(TextAnchor.CENTER);
View Full Code Here

Examples of net.sf.jasperreports.charts.JRValueDisplay

    JRFontUtil.copyNonNullOwnProperties(jrPlot.getTickLabelFont(), font);
    font = new JRBaseFont(getChart(), font);
    chartPlot.setTickLabelFont(JRFontUtil.getAwtFont(font, getLocale()));

    // Set how the value is displayed.
    JRValueDisplay display = jrPlot.getValueDisplay();
    if (display != null)
    {
      if (display.getColor() != null)
      {
        chartPlot.setValuePaint(display.getColor());
      }

      if (display.getMask() != null)
      {
        chartPlot.setTickLabelFormat(new DecimalFormat(display.getMask()));
      }
     
      font = new JRBaseFont();
      JRFontUtil.copyNonNullOwnProperties(getPlotSettings().getDisplayFont(), font);
      JRFontUtil.copyNonNullOwnProperties(jrPlot.getValueDisplay().getFont(), font);
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.