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); } }
public static string getImageMap(string name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) { StringBuffer stringBuffer = new StringBuffer(); stringBuffer.append(new StringBuffer().append("<map id=\"").append(ImageMapUtilities.htmlEscape(name)).append("\" name=\"").append(ImageMapUtilities.htmlEscape(name)).append("\">").toString()); stringBuffer.append(StringUtils.getLineSeparator()); EntityCollection entityCollection = info.getEntityCollection(); if (entityCollection != null) { int i = entityCollection.getEntityCount() - 1; while (i >= 0) { ChartEntity entity = entityCollection.getEntity(i); if (entity.getToolTipText() != null || entity.getURLText() != null) { string imageMapAreaTag = entity.getImageMapAreaTag(toolTipTagFragmentGenerator, urlTagFragmentGenerator); if (String.instancehelper_length(imageMapAreaTag) > 0) { stringBuffer.append(imageMapAreaTag); stringBuffer.append(StringUtils.getLineSeparator()); } } i += -1; } } stringBuffer.append("</map>"); return stringBuffer.toString(); }
public PlotRenderingInfo(ChartRenderingInfo owner) { base.\u002Ector(); PlotRenderingInfo plotRenderingInfo = this; this.owner = owner; this.dataArea = (Rectangle2D) new Rectangle2D.Double(); this.subplotInfo = (List) new ArrayList(); }
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 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(); } } }
public static string getImageMap(string name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) { return ImageMapUtilities.getImageMap(name, info, toolTipTagFragmentGenerator, urlTagFragmentGenerator); }
public static string getImageMap(string name, ChartRenderingInfo info) { return ImageMapUtilities.getImageMap(name, info, (ToolTipTagFragmentGenerator) new StandardToolTipTagFragmentGenerator(), (URLTagFragmentGenerator) new StandardURLTagFragmentGenerator()); }
public static void writeImageMap(PrintWriter writer, string name, ChartRenderingInfo info, ToolTipTagFragmentGenerator toolTipTagFragmentGenerator, URLTagFragmentGenerator urlTagFragmentGenerator) { writer.println(ImageMapUtilities.getImageMap(name, info, toolTipTagFragmentGenerator, urlTagFragmentGenerator)); }
public static void writeImageMap(PrintWriter writer, string name, ChartRenderingInfo info, bool useOverLibForToolTips) { object obj1 = (useOverLibForToolTips ? 1 : 0) == 0 ? (object) new StandardToolTipTagFragmentGenerator() : (object) new OverLIBToolTipTagFragmentGenerator(); PrintWriter writer1 = writer; string name1 = name; ChartRenderingInfo info1 = info; object obj2 = obj1; URLTagFragmentGenerator fragmentGenerator1 = (URLTagFragmentGenerator) new StandardURLTagFragmentGenerator(); ToolTipTagFragmentGenerator toolTipTagFragmentGenerator; if (obj2 != null) { ToolTipTagFragmentGenerator fragmentGenerator2 = obj2 as ToolTipTagFragmentGenerator; if (fragmentGenerator2 == null) throw new IncompatibleClassChangeError(); toolTipTagFragmentGenerator = fragmentGenerator2; } else toolTipTagFragmentGenerator = (ToolTipTagFragmentGenerator) null; URLTagFragmentGenerator urlTagFragmentGenerator = fragmentGenerator1; ImageMapUtilities.writeImageMap(writer1, name1, info1, toolTipTagFragmentGenerator, urlTagFragmentGenerator); }
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 static void writeImageMap(PrintWriter writer, string name, ChartRenderingInfo info) { ImageMapUtilities.writeImageMap(writer, name, info, (ToolTipTagFragmentGenerator) new StandardToolTipTagFragmentGenerator(), (URLTagFragmentGenerator) new StandardURLTagFragmentGenerator()); }