public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, ChartRenderingInfo info, bool encodeAlpha, int compression)
 {
   int num = encodeAlpha ? 1 : 0;
   if (@out == null)
   {
     string str = "Null 'out' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     BufferedImage bufferedImage = chart.createBufferedImage(width, height, 2, info);
     ChartUtilities.writeBufferedImageAsPNG(@out, bufferedImage, num != 0, compression);
   }
 }
示例#2
0
 public static JFreeChart createXYLineChart(string title, string xAxisLabel, string yAxisLabel, XYDataset dataset, PlotOrientation orientation, bool legend, bool tooltips, bool urls)
 {
   int num1 = tooltips ? 1 : 0;
   int num2 = urls ? 1 : 0;
   int num3 = legend ? 1 : 0;
   if (orientation == null)
   {
     string str = "Null 'orientation' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     NumberAxis numberAxis1 = new NumberAxis(xAxisLabel);
     numberAxis1.setAutoRangeIncludesZero(false);
     NumberAxis numberAxis2 = new NumberAxis(yAxisLabel);
     XYLineAndShapeRenderer andShapeRenderer = new XYLineAndShapeRenderer(true, false);
     XYPlot xyPlot = new XYPlot(dataset, (ValueAxis) numberAxis1, (ValueAxis) numberAxis2, (XYItemRenderer) andShapeRenderer);
     xyPlot.setOrientation(orientation);
     if (num1 != 0)
       andShapeRenderer.setBaseToolTipGenerator((XYToolTipGenerator) new StandardXYToolTipGenerator());
     if (num2 != 0)
       andShapeRenderer.setURLGenerator((XYURLGenerator) new StandardXYURLGenerator());
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
 public ChartProgressEvent(object source, JFreeChart chart, int type, int percent)
 {
   base.\u002Ector(source);
   ChartProgressEvent chartProgressEvent = this;
   this.chart = chart;
   this.type = type;
 }
 public ChartChangeEvent(object source, JFreeChart chart, ChartChangeEventType type)
 {
   base.\u002Ector(source);
   ChartChangeEvent chartChangeEvent = this;
   this.chart = chart;
   this.type = type;
 }
 public ChartMouseEvent(JFreeChart chart, MouseEvent trigger, ChartEntity entity)
 {
   base.\u002Ector((object) chart);
   ChartMouseEvent chartMouseEvent = this;
   this.chart = chart;
   this.trigger = trigger;
   this.entity = entity;
 }
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, ChartRenderingInfo info)
 {
   if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
     EncoderUtil.writeBufferedImage(chart.createBufferedImage(width, height, info), "png", @out);
 }
 public PolarChartPanel(JFreeChart chart, bool useBuffer)
 {
   int num = useBuffer ? 1 : 0;
   // ISSUE: explicit constructor call
   base.\u002Ector(chart, num != 0);
   PolarChartPanel polarChartPanel = this;
   this.checkChart(chart);
   this.setMinimumDrawWidth(200);
   this.setMinimumDrawHeight(200);
   this.setMaximumDrawWidth(2000);
   this.setMaximumDrawHeight(2000);
 }
 public JFreeChartEntity(Shape area, JFreeChart chart, string toolTipText, string urlText)
   : base(area, toolTipText, urlText)
 {
   JFreeChartEntity jfreeChartEntity = this;
   if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
     this.chart = chart;
 }
示例#9
0
 public JThermometer()
 {
   base.\u002Ector((LayoutManager) new CardLayout());
   JThermometer jthermometer = this;
   this.plot = new ThermometerPlot();
   this.plot.setInsets(new RectangleInsets(5.0, 5.0, 5.0, 5.0));
   this.data = new DefaultValueDataset();
   this.plot.setDataset((ValueDataset) this.data);
   JFreeChart.__\u003Cclinit\u003E();
   this.chart = new JFreeChart((string) null, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) this.plot, false);
   ChartPanel.__\u003Cclinit\u003E();
   this.panel = new ChartPanel(this.chart);
   ((Container) this).add((Component) this.panel, (object) "Panel");
   this.setBackground(((Component) this).getBackground());
 }
示例#10
0
 public ChartFrame(string title, JFreeChart chart, bool scrollPane)
 {
   int num = scrollPane ? 1 : 0;
   base.\u002Ector(title);
   ChartFrame chartFrame = this;
   this.setDefaultCloseOperation(2);
   this.chartPanel = new ChartPanel(chart);
   if (num != 0)
   {
     JScrollPane.__\u003Cclinit\u003E();
     this.setContentPane((Container) new JScrollPane((Component) this.chartPanel));
   }
   else
     this.setContentPane((Container) this.chartPanel);
 }
    public ChartTransferable(JFreeChart chart, int width, int height, bool cloneData)
    {
      base.\u002Ector();
      ChartTransferable chartTransferable = this;
      this.imageFlavor = new DataFlavor("image/x-java-image; class=java.awt.Image", "Image");
      try
      {
        this.chart = (JFreeChart) chart.clone();
        goto label_4;
      }
      catch (CloneNotSupportedException ex)
      {
      }
      this.chart = chart;
label_4:
      this.width = width;
      this.height = height;
    }
 public static ChartEditor getChartEditor(JFreeChart chart)
 {
   return ChartEditorManager.factory.createEditor(chart);
 }
 public virtual ChartEditor createEditor(JFreeChart chart)
 {
   return (ChartEditor) new DefaultChartEditor(chart);
 }
示例#14
0
 public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height, ChartRenderingInfo info)
 {
   if (file == null)
   {
     string str = "Null 'file' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     BufferedOutputStream bufferedOutputStream = new BufferedOutputStream((OutputStream) new FileOutputStream(file));
     try
     {
       ChartUtilities.writeChartAsPNG((OutputStream) bufferedOutputStream, chart, width, height, info);
     }
     finally
     {
       ((OutputStream) bufferedOutputStream).close();
     }
   }
 }
示例#15
0
 public ChartPanel(JFreeChart chart)
   : this(chart, 680, 420, 300, 200, 1024, 768, true, true, true, true, true, true)
 {
 }
示例#16
0
 public ChartPanel(JFreeChart chart, bool useBuffer)
 {
   int num = useBuffer ? 1 : 0;
   // ISSUE: explicit constructor call
   this.\u002Ector(chart, 680, 420, 300, 200, 1024, 768, num != 0, true, true, true, true, true);
 }
示例#17
0
 public static void writeChartAsJPEG(OutputStream @out, float quality, JFreeChart chart, int width, int height)
 {
   ChartUtilities.writeChartAsJPEG(@out, quality, chart, width, height, (ChartRenderingInfo) null);
 }
示例#18
0
 public ChartPanel(JFreeChart chart, int width, int height, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, bool useBuffer, bool properties, bool copy, bool save, bool print, bool zoom, bool tooltips)
 {
   int num1 = useBuffer ? 1 : 0;
   int num2 = properties ? 1 : 0;
   int num3 = copy ? 1 : 0;
   int num4 = save ? 1 : 0;
   int num5 = print ? 1 : 0;
   int num6 = zoom ? 1 : 0;
   int num7 = tooltips ? 1 : 0;
   base.\u002Ector();
   ChartPanel chartPanel = this;
   this.orientation = PlotOrientation.__\u003C\u003EVERTICAL;
   this.domainZoomable = false;
   this.rangeZoomable = false;
   this.zoomPoint = (Point2D) null;
   this.zoomRectangle = (Rectangle2D) null;
   this.fillZoomRectangle = true;
   this.horizontalAxisTrace = false;
   this.verticalAxisTrace = false;
   this.zoomInFactor = 0.5;
   this.zoomOutFactor = 2.0;
   this.panMask = 2;
   this.setChart(chart);
   this.chartMouseListeners = new EventListenerList();
   this.info = new ChartRenderingInfo();
   ((JComponent) this).setPreferredSize(new Dimension(width, height));
   this.useBuffer = num1 != 0;
   this.refreshBuffer = false;
   this.minimumDrawWidth = minimumDrawWidth;
   this.minimumDrawHeight = minimumDrawHeight;
   this.maximumDrawWidth = maximumDrawWidth;
   this.maximumDrawHeight = maximumDrawHeight;
   this.zoomTriggerDistance = 10;
   this.popup = (JPopupMenu) null;
   if (num2 != 0 || num3 != 0 || (num4 != 0 || num5 != 0) || num6 != 0)
     this.popup = this.createPopupMenu(num2 != 0, num3 != 0, num4 != 0, num5 != 0, num6 != 0);
   ((Component) this).enableEvents(16L);
   ((Component) this).enableEvents(32L);
   this.setDisplayToolTips(num7 != 0);
   ((Component) this).addMouseListener((MouseListener) this);
   ((Component) this).addMouseMotionListener((MouseMotionListener) this);
   this.defaultDirectoryForSaveAs = (File) null;
   this.enforceFileExtensions = true;
   ToolTipManager toolTipManager = ToolTipManager.sharedInstance();
   this.ownToolTipInitialDelay = toolTipManager.getInitialDelay();
   this.ownToolTipDismissDelay = toolTipManager.getDismissDelay();
   this.ownToolTipReshowDelay = toolTipManager.getReshowDelay();
   this.zoomAroundAnchor = false;
   this.zoomOutlinePaint = (Paint) Color.blue;
   this.zoomFillPaint = (Paint) new Color(0, 0, (int) byte.MaxValue, 63);
   this.panMask = 2;
   if (String.instancehelper_startsWith(String.instancehelper_toLowerCase(System.getProperty("os.name")), "mac os x"))
     this.panMask = 8;
   this.overlays = (List) new ArrayList();
 }
 public ChartChangeEvent(object source, JFreeChart chart)
   : this(source, chart, ChartChangeEventType.__\u003C\u003EGENERAL)
 {
 }
示例#20
0
 public static void writeChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, bool encodeAlpha, int compression)
 {
   int num = encodeAlpha ? 1 : 0;
   ChartUtilities.writeChartAsPNG(@out, chart, width, height, (ChartRenderingInfo) null, num != 0, compression);
 }
示例#21
0
 public static void applyCurrentTheme(JFreeChart chart)
 {
   ChartFactory.getChartTheme().apply(chart);
 }
示例#22
0
 public override void setChart(JFreeChart chart)
 {
   this.checkChart(chart);
   base.setChart(chart);
 }
示例#23
0
 public PolarChartPanel(JFreeChart chart)
   : this(chart, true)
 {
 }
示例#24
0
 public static void saveChartAsJPEG(File file, float quality, JFreeChart chart, int width, int height)
 {
   ChartUtilities.saveChartAsJPEG(file, quality, chart, width, height, (ChartRenderingInfo) null);
 }
 public ChartTransferable(JFreeChart chart, int width, int height)
   : this(chart, width, height, true)
 {
 }
示例#26
0
 public ChartPanel(JFreeChart chart, int width, int height, int minimumDrawWidth, int minimumDrawHeight, int maximumDrawWidth, int maximumDrawHeight, bool useBuffer, bool properties, bool save, bool print, bool zoom, bool tooltips)
 {
   int num1 = useBuffer ? 1 : 0;
   int num2 = properties ? 1 : 0;
   int num3 = save ? 1 : 0;
   int num4 = print ? 1 : 0;
   int num5 = zoom ? 1 : 0;
   int num6 = tooltips ? 1 : 0;
   // ISSUE: explicit constructor call
   this.\u002Ector(chart, width, height, minimumDrawWidth, minimumDrawHeight, maximumDrawWidth, maximumDrawHeight, num1 != 0, num2 != 0, true, num3 != 0, num4 != 0, num5 != 0, num6 != 0);
 }
示例#27
0
 public static void writeScaledChartAsPNG(OutputStream @out, JFreeChart chart, int width, int height, int widthScaleFactor, int heightScaleFactor)
 {
   if (@out == null)
   {
     string str = "Null 'out' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else if (chart == null)
   {
     string str = "Null 'chart' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     double num1 = (double) (width * widthScaleFactor);
     double num2 = (double) (height * heightScaleFactor);
     double num3 = (double) width;
     double num4 = (double) height;
     int num5 = 0;
     if (widthScaleFactor != 1 || heightScaleFactor != 1)
       num5 = 1;
     double num6 = num1 / num3;
     double num7 = num2 / num4;
     BufferedImage image = new BufferedImage(ByteCodeHelper.d2i(num1), ByteCodeHelper.d2i(num2), 2);
     Graphics2D graphics = image.createGraphics();
     if (num5 != 0)
     {
       AffineTransform transform = graphics.getTransform();
       graphics.transform(AffineTransform.getScaleInstance(num6, num7));
       chart.draw(graphics, (Rectangle2D) new Rectangle2D.Double(0.0, 0.0, num3, num4), (Point2D) null, (ChartRenderingInfo) null);
       graphics.setTransform(transform);
       ((Graphics) graphics).dispose();
     }
     else
       chart.draw(graphics, (Rectangle2D) new Rectangle2D.Double(0.0, 0.0, num3, num4), (Point2D) null, (ChartRenderingInfo) null);
     @out.write(ChartUtilities.encodeAsPNG(image));
   }
 }
示例#28
0
 public ChartPanel(JFreeChart chart, bool properties, bool save, bool print, bool zoom, bool tooltips)
 {
   int num1 = properties ? 1 : 0;
   int num2 = save ? 1 : 0;
   int num3 = print ? 1 : 0;
   int num4 = zoom ? 1 : 0;
   int num5 = tooltips ? 1 : 0;
   // ISSUE: explicit constructor call
   this.\u002Ector(chart, 680, 420, 300, 200, 1024, 768, true, num1 != 0, num2 != 0, num3 != 0, num4 != 0, num5 != 0);
 }
 public virtual void setChart(JFreeChart chart)
 {
   this.chart = chart;
 }
示例#30
0
 public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height)
 {
   ChartUtilities.saveChartAsPNG(file, chart, width, height, (ChartRenderingInfo) null);
 }