Ejemplo n.º 1
1
 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);
   }
 }
Ejemplo n.º 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;
   }
 }
Ejemplo n.º 3
0
 public ChartProgressEvent(object source, JFreeChart chart, int type, int percent)
 {
   base.\u002Ector(source);
   ChartProgressEvent chartProgressEvent = this;
   this.chart = chart;
   this.type = type;
 }
Ejemplo n.º 4
0
 public ChartChangeEvent(object source, JFreeChart chart, ChartChangeEventType type)
 {
   base.\u002Ector(source);
   ChartChangeEvent chartChangeEvent = this;
   this.chart = chart;
   this.type = type;
 }
Ejemplo n.º 5
0
 public ChartMouseEvent(JFreeChart chart, MouseEvent trigger, ChartEntity entity)
 {
   base.\u002Ector((object) chart);
   ChartMouseEvent chartMouseEvent = this;
   this.chart = chart;
   this.trigger = trigger;
   this.entity = entity;
 }
Ejemplo n.º 6
0
 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);
 }
Ejemplo n.º 7
0
 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);
 }
Ejemplo n.º 8
0
 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;
 }
Ejemplo n.º 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());
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 11
0
    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;
    }
Ejemplo n.º 12
0
 public static ChartEditor getChartEditor(JFreeChart chart)
 {
   return ChartEditorManager.factory.createEditor(chart);
 }
 public virtual ChartEditor createEditor(JFreeChart chart)
 {
   return (ChartEditor) new DefaultChartEditor(chart);
 }
Ejemplo n.º 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();
     }
   }
 }
Ejemplo n.º 15
0
 public ChartPanel(JFreeChart chart)
   : this(chart, 680, 420, 300, 200, 1024, 768, true, true, true, true, true, true)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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();
 }
Ejemplo n.º 19
0
 public ChartChangeEvent(object source, JFreeChart chart)
   : this(source, chart, ChartChangeEventType.__\u003C\u003EGENERAL)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 21
0
 public static void applyCurrentTheme(JFreeChart chart)
 {
   ChartFactory.getChartTheme().apply(chart);
 }
Ejemplo n.º 22
0
 public override void setChart(JFreeChart chart)
 {
   this.checkChart(chart);
   base.setChart(chart);
 }
Ejemplo n.º 23
0
 public PolarChartPanel(JFreeChart chart)
   : this(chart, true)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 25
0
 public ChartTransferable(JFreeChart chart, int width, int height)
   : this(chart, width, height, true)
 {
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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));
   }
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 29
0
 public virtual void setChart(JFreeChart chart)
 {
   this.chart = chart;
 }
Ejemplo n.º 30
0
 public static void saveChartAsPNG(File file, JFreeChart chart, int width, int height)
 {
   ChartUtilities.saveChartAsPNG(file, chart, width, height, (ChartRenderingInfo) null);
 }