Пример #1
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;
   }
 }
Пример #2
0
 public virtual void updateCrosshairPoint(double x, double y, int domainAxisIndex, int rangeAxisIndex, double transX, double transY, PlotOrientation orientation)
 {
   if (this.anchor == null)
     return;
   double num1;
   if (this.calculateDistanceInDataSpace)
   {
     num1 = (x - this.anchorX) * (x - this.anchorX) + (y - this.anchorY) * (y - this.anchorY);
   }
   else
   {
     double num2 = this.anchor.getX();
     double num3 = this.anchor.getY();
     if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL)
     {
       double num4 = num3;
       num3 = num2;
       num2 = num4;
     }
     num1 = (transX - num2) * (transX - num2) + (transY - num3) * (transY - num3);
   }
   if (num1 >= this.distance)
     return;
   this.crosshairX = x;
   this.crosshairY = y;
   this.domainAxisIndex = domainAxisIndex;
   this.rangeAxisIndex = rangeAxisIndex;
   this.distance = num1;
 }
Пример #3
0
 public CategoryPlot(CategoryDataset dataset, CategoryAxis domainAxis, ValueAxis rangeAxis, CategoryItemRenderer renderer)
 {
   CategoryPlot categoryPlot = this;
   this.renderingOrder = DatasetRenderingOrder.__\u003C\u003EREVERSE;
   this.columnRenderingOrder = SortOrder.__\u003C\u003EASCENDING;
   this.rowRenderingOrder = SortOrder.__\u003C\u003EASCENDING;
   this.rangeCrosshairLockedOnData = true;
   this.orientation = PlotOrientation.__\u003C\u003EVERTICAL;
   this.domainAxes = new ObjectList();
   this.domainAxisLocations = new ObjectList();
   this.rangeAxes = new ObjectList();
   this.rangeAxisLocations = new ObjectList();
   this.datasetToDomainAxesMap = new TreeMap();
   this.datasetToRangeAxesMap = new TreeMap();
   this.renderers = new ObjectList();
   this.datasets = new ObjectList();
   this.datasets.set(0, (object) dataset);
   if (dataset != null)
     dataset.addChangeListener((DatasetChangeListener) this);
   this.axisOffset = RectangleInsets.__\u003C\u003EZERO_INSETS;
   this.setDomainAxisLocation(AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT, false);
   this.setRangeAxisLocation(AxisLocation.__\u003C\u003ETOP_OR_LEFT, false);
   this.renderers.set(0, (object) renderer);
   if (renderer != null)
   {
     renderer.setPlot(this);
     renderer.addChangeListener((RendererChangeListener) this);
   }
   this.domainAxes.set(0, (object) domainAxis);
   this.mapDatasetToDomainAxis(0, 0);
   if (domainAxis != null)
   {
     domainAxis.setPlot((Plot) this);
     domainAxis.addChangeListener((AxisChangeListener) this);
   }
   this.drawSharedDomainAxis = false;
   this.rangeAxes.set(0, (object) rangeAxis);
   this.mapDatasetToRangeAxis(0, 0);
   if (rangeAxis != null)
   {
     rangeAxis.setPlot((Plot) this);
     rangeAxis.addChangeListener((AxisChangeListener) this);
   }
   this.configureDomainAxes();
   this.configureRangeAxes();
   this.domainGridlinesVisible = false;
   this.domainGridlinePosition = CategoryAnchor.__\u003C\u003EMIDDLE;
   this.domainGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.domainGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
   this.rangeZeroBaselineVisible = false;
   this.rangeZeroBaselinePaint = (Paint) Color.black;
   this.rangeZeroBaselineStroke = (Stroke) new BasicStroke(0.5f);
   this.rangeGridlinesVisible = true;
   this.rangeGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.rangeGridlinePaint = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
   this.rangeMinorGridlinesVisible = false;
   this.rangeMinorGridlineStroke = CategoryPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.rangeMinorGridlinePaint = (Paint) Color.white;
   this.foregroundDomainMarkers = (Map) new HashMap();
   this.backgroundDomainMarkers = (Map) new HashMap();
   this.foregroundRangeMarkers = (Map) new HashMap();
   this.backgroundRangeMarkers = (Map) new HashMap();
   this.anchorValue = 0.0;
   this.domainCrosshairVisible = false;
   this.domainCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE;
   this.domainCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT;
   this.rangeCrosshairVisible = false;
   this.rangeCrosshairValue = 0.0;
   this.rangeCrosshairStroke = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE;
   this.rangeCrosshairPaint = CategoryPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT;
   this.annotations = (List) new ArrayList();
   this.rangePannable = false;
 }
Пример #4
0
 public XYPlot(XYDataset dataset, ValueAxis domainAxis, ValueAxis rangeAxis, XYItemRenderer renderer)
 {
   XYPlot xyPlot = this;
   this.quadrantOrigin = (Point2D) new Point2D.Double(0.0, 0.0);
   Paint[] paintArray = new Paint[4];
   int index1 = 0;
   // ISSUE: variable of the null type
   __Null local1 = null;
   paintArray[index1] = (Paint) local1;
   int index2 = 1;
   // ISSUE: variable of the null type
   __Null local2 = null;
   paintArray[index2] = (Paint) local2;
   int index3 = 2;
   // ISSUE: variable of the null type
   __Null local3 = null;
   paintArray[index3] = (Paint) local3;
   int index4 = 3;
   // ISSUE: variable of the null type
   __Null local4 = null;
   paintArray[index4] = (Paint) local4;
   this.quadrantPaint = paintArray;
   this.domainCrosshairLockedOnData = true;
   this.rangeCrosshairLockedOnData = true;
   this.datasetRenderingOrder = DatasetRenderingOrder.__\u003C\u003EREVERSE;
   this.seriesRenderingOrder = SeriesRenderingOrder.__\u003C\u003EREVERSE;
   this.orientation = PlotOrientation.__\u003C\u003EVERTICAL;
   this.weight = 1;
   this.axisOffset = RectangleInsets.__\u003C\u003EZERO_INSETS;
   this.domainAxes = new ObjectList();
   this.domainAxisLocations = new ObjectList();
   this.foregroundDomainMarkers = (Map) new HashMap();
   this.backgroundDomainMarkers = (Map) new HashMap();
   this.rangeAxes = new ObjectList();
   this.rangeAxisLocations = new ObjectList();
   this.foregroundRangeMarkers = (Map) new HashMap();
   this.backgroundRangeMarkers = (Map) new HashMap();
   this.datasets = new ObjectList();
   this.renderers = new ObjectList();
   this.datasetToDomainAxesMap = (Map) new TreeMap();
   this.datasetToRangeAxesMap = (Map) new TreeMap();
   this.annotations = (List) new ArrayList();
   this.datasets.set(0, (object) dataset);
   if (dataset != null)
     dataset.addChangeListener((DatasetChangeListener) this);
   this.renderers.set(0, (object) renderer);
   if (renderer != null)
   {
     renderer.setPlot(this);
     renderer.addChangeListener((RendererChangeListener) this);
   }
   this.domainAxes.set(0, (object) domainAxis);
   this.mapDatasetToDomainAxis(0, 0);
   if (domainAxis != null)
   {
     domainAxis.setPlot((Plot) this);
     domainAxis.addChangeListener((AxisChangeListener) this);
   }
   this.domainAxisLocations.set(0, (object) AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT);
   this.rangeAxes.set(0, (object) rangeAxis);
   this.mapDatasetToRangeAxis(0, 0);
   if (rangeAxis != null)
   {
     rangeAxis.setPlot((Plot) this);
     rangeAxis.addChangeListener((AxisChangeListener) this);
   }
   this.rangeAxisLocations.set(0, (object) AxisLocation.__\u003C\u003EBOTTOM_OR_LEFT);
   this.configureDomainAxes();
   this.configureRangeAxes();
   this.domainGridlinesVisible = true;
   this.domainGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.domainGridlinePaint = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
   this.domainMinorGridlinesVisible = false;
   this.domainMinorGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.domainMinorGridlinePaint = (Paint) Color.white;
   this.domainZeroBaselineVisible = false;
   this.domainZeroBaselinePaint = (Paint) Color.black;
   this.domainZeroBaselineStroke = (Stroke) new BasicStroke(0.5f);
   this.rangeGridlinesVisible = true;
   this.rangeGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.rangeGridlinePaint = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_PAINT;
   this.rangeMinorGridlinesVisible = false;
   this.rangeMinorGridlineStroke = XYPlot.__\u003C\u003EDEFAULT_GRIDLINE_STROKE;
   this.rangeMinorGridlinePaint = (Paint) Color.white;
   this.rangeZeroBaselineVisible = false;
   this.rangeZeroBaselinePaint = (Paint) Color.black;
   this.rangeZeroBaselineStroke = (Stroke) new BasicStroke(0.5f);
   this.domainCrosshairVisible = false;
   this.domainCrosshairValue = 0.0;
   this.domainCrosshairStroke = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE;
   this.domainCrosshairPaint = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT;
   this.rangeCrosshairVisible = false;
   this.rangeCrosshairValue = 0.0;
   this.rangeCrosshairStroke = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_STROKE;
   this.rangeCrosshairPaint = XYPlot.__\u003C\u003EDEFAULT_CROSSHAIR_PAINT;
 }
Пример #5
0
 public virtual void updateCrosshairPoint(double x, double y, double transX, double transY, PlotOrientation orientation)
 {
   this.updateCrosshairPoint(x, y, 0, 0, transX, transY, orientation);
 }
Пример #6
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();
 }
Пример #7
0
 public DefaultPlotEditor([In] Plot obj0)
 {
   base.\u002Ector();
   DefaultPlotEditor defaultPlotEditor = this;
   this.plotInsets = obj0.getInsets();
   PaintSample.__\u003Cclinit\u003E();
   this.backgroundPaintSample = new PaintSample(obj0.getBackgroundPaint());
   StrokeSample.__\u003Cclinit\u003E();
   this.outlineStrokeSample = new StrokeSample(obj0.getOutlineStroke());
   PaintSample.__\u003Cclinit\u003E();
   this.outlinePaintSample = new PaintSample(obj0.getOutlinePaint());
   if (obj0 is CategoryPlot)
     this.plotOrientation = ((CategoryPlot) obj0).getOrientation();
   else if (obj0 is XYPlot)
     this.plotOrientation = ((XYPlot) obj0).getOrientation();
   if (obj0 is CategoryPlot)
   {
     CategoryItemRenderer renderer = ((CategoryPlot) obj0).getRenderer();
     if (renderer is LineAndShapeRenderer)
     {
       LineAndShapeRenderer andShapeRenderer = (LineAndShapeRenderer) renderer;
       this.drawLines = BooleanUtilities.valueOf(andShapeRenderer.getBaseLinesVisible());
       this.drawShapes = BooleanUtilities.valueOf(andShapeRenderer.getBaseShapesVisible());
     }
   }
   else if (obj0 is XYPlot)
   {
     XYItemRenderer renderer = ((XYPlot) obj0).getRenderer();
     if (renderer is StandardXYItemRenderer)
     {
       StandardXYItemRenderer standardXyItemRenderer = (StandardXYItemRenderer) renderer;
       this.drawLines = BooleanUtilities.valueOf(standardXyItemRenderer.getPlotLines());
       this.drawShapes = BooleanUtilities.valueOf(standardXyItemRenderer.getBaseShapesVisible());
     }
   }
   ((Container) this).setLayout((LayoutManager) new BorderLayout());
   this.availableStrokeSamples = new StrokeSample[4];
   this.availableStrokeSamples[0] = new StrokeSample((Stroke) null);
   StrokeSample[] strokeSampleArray1 = this.availableStrokeSamples;
   int index1 = 1;
   StrokeSample.__\u003Cclinit\u003E();
   StrokeSample strokeSample1 = new StrokeSample((Stroke) new BasicStroke(1f));
   strokeSampleArray1[index1] = strokeSample1;
   StrokeSample[] strokeSampleArray2 = this.availableStrokeSamples;
   int index2 = 2;
   StrokeSample.__\u003Cclinit\u003E();
   StrokeSample strokeSample2 = new StrokeSample((Stroke) new BasicStroke(2f));
   strokeSampleArray2[index2] = strokeSample2;
   StrokeSample[] strokeSampleArray3 = this.availableStrokeSamples;
   int index3 = 3;
   StrokeSample.__\u003Cclinit\u003E();
   StrokeSample strokeSample3 = new StrokeSample((Stroke) new BasicStroke(3f));
   strokeSampleArray3[index3] = strokeSample3;
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel1 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel1).setBorder((Border) BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), new StringBuffer().append(obj0.getPlotType()).append(DefaultPlotEditor.localizationResources.getString(":")).toString()));
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel2 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel2).setBorder((Border) BorderFactory.createTitledBorder(DefaultPlotEditor.localizationResources.getString("General")));
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel3 = new JPanel((LayoutManager) new LCBLayout(7));
   ((JComponent) jpanel3).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
   JPanel jpanel4 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel1 = new JLabel(DefaultPlotEditor.localizationResources.getString("Outline_stroke"));
   ((Container) jpanel4).add((Component) jlabel1);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton1 = new JButton(DefaultPlotEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton1).setActionCommand("OutlineStroke");
   ((AbstractButton) jbutton1).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) this.outlineStrokeSample);
   ((Container) jpanel3).add((Component) jbutton1);
   JPanel jpanel5 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel2 = new JLabel(DefaultPlotEditor.localizationResources.getString("Outline_Paint"));
   ((Container) jpanel5).add((Component) jlabel2);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton2 = new JButton(DefaultPlotEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton2).setActionCommand("OutlinePaint");
   ((AbstractButton) jbutton2).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) this.outlinePaintSample);
   ((Container) jpanel3).add((Component) jbutton2);
   JPanel jpanel6 = jpanel3;
   JLabel.__\u003Cclinit\u003E();
   JLabel jlabel3 = new JLabel(DefaultPlotEditor.localizationResources.getString("Background_paint"));
   ((Container) jpanel6).add((Component) jlabel3);
   JButton.__\u003Cclinit\u003E();
   JButton jbutton3 = new JButton(DefaultPlotEditor.localizationResources.getString("Select..."));
   ((AbstractButton) jbutton3).setActionCommand("BackgroundPaint");
   ((AbstractButton) jbutton3).addActionListener((ActionListener) this);
   ((Container) jpanel3).add((Component) this.backgroundPaintSample);
   ((Container) jpanel3).add((Component) jbutton3);
   if (this.plotOrientation != null)
   {
     int num = !this.plotOrientation.equals((object) PlotOrientation.__\u003C\u003EVERTICAL) ? 1 : 0;
     JPanel jpanel7 = jpanel3;
     JLabel.__\u003Cclinit\u003E();
     JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Orientation"));
     ((Container) jpanel7).add((Component) jlabel4);
     JComboBox.__\u003Cclinit\u003E();
     this.orientationCombo = new JComboBox((object[]) DefaultPlotEditor.orientationNames);
     this.orientationCombo.setSelectedIndex(num);
     this.orientationCombo.setActionCommand("Orientation");
     this.orientationCombo.addActionListener((ActionListener) this);
     ((Container) jpanel3).add((Component) new JPanel());
     ((Container) jpanel3).add((Component) this.orientationCombo);
   }
   if (this.drawLines != null)
   {
     JPanel jpanel7 = jpanel3;
     JLabel.__\u003Cclinit\u003E();
     JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Draw_lines"));
     ((Container) jpanel7).add((Component) jlabel4);
     this.drawLinesCheckBox = new JCheckBox();
     ((AbstractButton) this.drawLinesCheckBox).setSelected(this.drawLines.booleanValue());
     ((AbstractButton) this.drawLinesCheckBox).setActionCommand("DrawLines");
     ((AbstractButton) this.drawLinesCheckBox).addActionListener((ActionListener) this);
     ((Container) jpanel3).add((Component) new JPanel());
     ((Container) jpanel3).add((Component) this.drawLinesCheckBox);
   }
   if (this.drawShapes != null)
   {
     JPanel jpanel7 = jpanel3;
     JLabel.__\u003Cclinit\u003E();
     JLabel jlabel4 = new JLabel(DefaultPlotEditor.localizationResources.getString("Draw_shapes"));
     ((Container) jpanel7).add((Component) jlabel4);
     this.drawShapesCheckBox = new JCheckBox();
     ((AbstractButton) this.drawShapesCheckBox).setSelected(this.drawShapes.booleanValue());
     ((AbstractButton) this.drawShapesCheckBox).setActionCommand("DrawShapes");
     ((AbstractButton) this.drawShapesCheckBox).addActionListener((ActionListener) this);
     ((Container) jpanel3).add((Component) new JPanel());
     ((Container) jpanel3).add((Component) this.drawShapesCheckBox);
   }
   ((Container) jpanel2).add((Component) jpanel3, (object) "North");
   JPanel.__\u003Cclinit\u003E();
   JPanel jpanel8 = new JPanel((LayoutManager) new BorderLayout());
   ((JComponent) jpanel8).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
   ((Container) jpanel8).add((Component) jpanel2, (object) "North");
   JTabbedPane jtabbedPane = new JTabbedPane();
   ((JComponent) jtabbedPane).setBorder(BorderFactory.createEmptyBorder(0, 5, 0, 5));
   Axis axis = (Axis) null;
   if (obj0 is CategoryPlot)
     axis = (Axis) ((CategoryPlot) obj0).getDomainAxis();
   else if (obj0 is XYPlot)
     axis = (Axis) ((XYPlot) obj0).getDomainAxis();
   this.domainAxisPropertyPanel = DefaultAxisEditor.getInstance(axis);
   if (this.domainAxisPropertyPanel != null)
   {
     ((JComponent) this.domainAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
     jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Domain_Axis"), (Component) this.domainAxisPropertyPanel);
   }
   ValueAxis valueAxis = (ValueAxis) null;
   if (obj0 is CategoryPlot)
     valueAxis = ((CategoryPlot) obj0).getRangeAxis();
   else if (obj0 is XYPlot)
     valueAxis = ((XYPlot) obj0).getRangeAxis();
   this.rangeAxisPropertyPanel = DefaultAxisEditor.getInstance((Axis) valueAxis);
   if (this.rangeAxisPropertyPanel != null)
   {
     ((JComponent) this.rangeAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
     jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Range_Axis"), (Component) this.rangeAxisPropertyPanel);
   }
   ColorBar colorBar = (ColorBar) null;
   if (obj0 is ContourPlot)
     colorBar = ((ContourPlot) obj0).getColorBar();
   this.colorBarAxisPropertyPanel = DefaultColorBarEditor.getInstance(colorBar);
   if (this.colorBarAxisPropertyPanel != null)
   {
     ((JComponent) this.colorBarAxisPropertyPanel).setBorder(BorderFactory.createEmptyBorder(2, 2, 2, 2));
     jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Color_Bar"), (Component) this.colorBarAxisPropertyPanel);
   }
   jtabbedPane.add(DefaultPlotEditor.localizationResources.getString("Appearance"), (Component) jpanel8);
   ((Container) jpanel1).add((Component) jtabbedPane);
   ((Container) this).add((Component) jpanel1);
 }
Пример #8
0
 public static JFreeChart createBarChart(string title, string categoryAxisLabel, string valueAxisLabel, CategoryDataset 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
   {
     CategoryAxis domainAxis = new CategoryAxis(categoryAxisLabel);
     NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
     BarRenderer barRenderer = new BarRenderer();
     if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL)
     {
       ItemLabelPosition position1 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE3, TextAnchor.__\u003C\u003ECENTER_LEFT);
       barRenderer.setBasePositiveItemLabelPosition(position1);
       ItemLabelPosition position2 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE9, TextAnchor.__\u003C\u003ECENTER_RIGHT);
       barRenderer.setBaseNegativeItemLabelPosition(position2);
     }
     else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
     {
       ItemLabelPosition position1 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE12, TextAnchor.__\u003C\u003EBOTTOM_CENTER);
       barRenderer.setBasePositiveItemLabelPosition(position1);
       ItemLabelPosition position2 = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003EOUTSIDE6, TextAnchor.__\u003C\u003ETOP_CENTER);
       barRenderer.setBaseNegativeItemLabelPosition(position2);
     }
     if (num1 != 0)
       barRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) new StandardCategoryToolTipGenerator());
     if (num2 != 0)
       barRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) barRenderer);
     categoryPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
Пример #9
0
 public static JFreeChart createXYStepChart(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
   {
     DateAxis dateAxis = new DateAxis(xAxisLabel);
     NumberAxis numberAxis = new NumberAxis(yAxisLabel);
     numberAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
     StandardXYToolTipGenerator toolTipGenerator = (StandardXYToolTipGenerator) null;
     if (num1 != 0)
       toolTipGenerator = new StandardXYToolTipGenerator();
     StandardXYURLGenerator standardXyurlGenerator = (StandardXYURLGenerator) null;
     if (num2 != 0)
       standardXyurlGenerator = new StandardXYURLGenerator();
     XYStepRenderer xyStepRenderer = new XYStepRenderer((XYToolTipGenerator) toolTipGenerator, (XYURLGenerator) standardXyurlGenerator);
     XYPlot xyPlot = new XYPlot(dataset, (ValueAxis) dateAxis, (ValueAxis) numberAxis, (XYItemRenderer) null);
     xyPlot.setRenderer((XYItemRenderer) xyStepRenderer);
     xyPlot.setOrientation(orientation);
     xyPlot.setDomainCrosshairVisible(false);
     xyPlot.setRangeCrosshairVisible(false);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
Пример #10
0
 public static JFreeChart createStackedXYAreaChart(string title, string xAxisLabel, string yAxisLabel, TableXYDataset 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);
     numberAxis1.setLowerMargin(0.0);
     numberAxis1.setUpperMargin(0.0);
     NumberAxis numberAxis2 = new NumberAxis(yAxisLabel);
     StandardXYToolTipGenerator toolTipGenerator = (StandardXYToolTipGenerator) null;
     if (num1 != 0)
       toolTipGenerator = new StandardXYToolTipGenerator();
     StandardXYURLGenerator standardXyurlGenerator = (StandardXYURLGenerator) null;
     if (num2 != 0)
       standardXyurlGenerator = new StandardXYURLGenerator();
     StackedXYAreaRenderer2 stackedXyAreaRenderer2 = new StackedXYAreaRenderer2((XYToolTipGenerator) toolTipGenerator, (XYURLGenerator) standardXyurlGenerator);
     stackedXyAreaRenderer2.setOutline(true);
     XYPlot xyPlot = new XYPlot((XYDataset) dataset, (ValueAxis) numberAxis1, (ValueAxis) numberAxis2, (XYItemRenderer) stackedXyAreaRenderer2);
     xyPlot.setOrientation(orientation);
     xyPlot.setRangeAxis((ValueAxis) numberAxis2);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
Пример #11
0
 public static JFreeChart createXYBarChart(string title, string xAxisLabel, bool dateAxis, string yAxisLabel, IntervalXYDataset dataset, PlotOrientation orientation, bool legend, bool tooltips, bool urls)
 {
   int num1 = dateAxis ? 1 : 0;
   int num2 = tooltips ? 1 : 0;
   int num3 = urls ? 1 : 0;
   int num4 = legend ? 1 : 0;
   if (orientation == null)
   {
     string str = "Null 'orientation' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     ValueAxis domainAxis;
     if (num1 != 0)
     {
       domainAxis = (ValueAxis) new DateAxis(xAxisLabel);
     }
     else
     {
       NumberAxis numberAxis = new NumberAxis(xAxisLabel);
       numberAxis.setAutoRangeIncludesZero(false);
       domainAxis = (ValueAxis) numberAxis;
     }
     NumberAxis numberAxis1 = new NumberAxis(yAxisLabel);
     XYBarRenderer xyBarRenderer = new XYBarRenderer();
     if (num2 != 0)
     {
       StandardXYToolTipGenerator toolTipGenerator = num1 == 0 ? new StandardXYToolTipGenerator() : StandardXYToolTipGenerator.getTimeSeriesInstance();
       xyBarRenderer.setBaseToolTipGenerator((XYToolTipGenerator) toolTipGenerator);
     }
     if (num3 != 0)
       xyBarRenderer.setURLGenerator((XYURLGenerator) new StandardXYURLGenerator());
     XYPlot xyPlot = new XYPlot((XYDataset) dataset, domainAxis, (ValueAxis) numberAxis1, (XYItemRenderer) xyBarRenderer);
     xyPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) xyPlot, num4 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
Пример #12
0
 public static JFreeChart createWaterfallChart(string title, string categoryAxisLabel, string valueAxisLabel, CategoryDataset 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
   {
     CategoryAxis domainAxis = new CategoryAxis(categoryAxisLabel);
     domainAxis.setCategoryMargin(0.0);
     NumberAxis numberAxis = new NumberAxis(valueAxisLabel);
     WaterfallBarRenderer waterfallBarRenderer = new WaterfallBarRenderer();
     if (orientation == PlotOrientation.__\u003C\u003EHORIZONTAL)
     {
       ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, Math.PI / 2.0);
       waterfallBarRenderer.setBasePositiveItemLabelPosition(position);
       waterfallBarRenderer.setBaseNegativeItemLabelPosition(position);
     }
     else if (orientation == PlotOrientation.__\u003C\u003EVERTICAL)
     {
       ItemLabelPosition position = new ItemLabelPosition(ItemLabelAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, TextAnchor.__\u003C\u003ECENTER, 0.0);
       waterfallBarRenderer.setBasePositiveItemLabelPosition(position);
       waterfallBarRenderer.setBaseNegativeItemLabelPosition(position);
     }
     if (num1 != 0)
     {
       StandardCategoryToolTipGenerator toolTipGenerator = new StandardCategoryToolTipGenerator();
       waterfallBarRenderer.setBaseToolTipGenerator((CategoryToolTipGenerator) toolTipGenerator);
     }
     if (num2 != 0)
       waterfallBarRenderer.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, domainAxis, (ValueAxis) numberAxis, (CategoryItemRenderer) waterfallBarRenderer);
     categoryPlot.clearRangeMarkers();
     ValueMarker valueMarker = new ValueMarker(0.0);
     valueMarker.setPaint((Paint) Color.black);
     categoryPlot.addRangeMarker((Marker) valueMarker, Layer.__\u003C\u003EFOREGROUND);
     categoryPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
Пример #13
0
 public static JFreeChart createLineChart3D(string title, string categoryAxisLabel, string valueAxisLabel, CategoryDataset 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
   {
     CategoryAxis3D categoryAxis3D = new CategoryAxis3D(categoryAxisLabel);
     NumberAxis3D numberAxis3D = new NumberAxis3D(valueAxisLabel);
     LineRenderer3D lineRenderer3D = new LineRenderer3D();
     if (num1 != 0)
       lineRenderer3D.setBaseToolTipGenerator((CategoryToolTipGenerator) new StandardCategoryToolTipGenerator());
     if (num2 != 0)
       lineRenderer3D.setBaseItemURLGenerator((CategoryURLGenerator) new StandardCategoryURLGenerator());
     CategoryPlot categoryPlot = new CategoryPlot(dataset, (CategoryAxis) categoryAxis3D, (ValueAxis) numberAxis3D, (CategoryItemRenderer) lineRenderer3D);
     categoryPlot.setOrientation(orientation);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) categoryPlot, num3 != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }
 public override void setOrientation(PlotOrientation orientation)
 {
   base.setOrientation(orientation);
   Iterator iterator = this.subplots.iterator();
   while (iterator.hasNext())
     ((XYPlot) iterator.next()).setOrientation(orientation);
 }
Пример #15
0
 private void attemptOrientationSelection()
 {
   if (this.orientationCombo.getSelectedIndex() == 0)
     this.plotOrientation = PlotOrientation.__\u003C\u003EVERTICAL;
   else
     this.plotOrientation = PlotOrientation.__\u003C\u003EHORIZONTAL;
 }
Пример #16
0
 public WaferMapPlot(WaferMapDataset dataset, WaferMapRenderer renderer)
 {
   WaferMapPlot waferMapPlot = this;
   this.orientation = PlotOrientation.__\u003C\u003EVERTICAL;
   this.dataset = dataset;
   if (dataset != null)
     dataset.addChangeListener((DatasetChangeListener) this);
   this.renderer = renderer;
   if (renderer == null)
     return;
   renderer.setPlot(this);
   renderer.addChangeListener((RendererChangeListener) this);
 }
Пример #17
0
 public static JFreeChart createWaferMapChart(string title, WaferMapDataset dataset, PlotOrientation orientation, bool legend, bool tooltips, bool urls)
 {
   int num = legend ? 1 : 0;
   if (orientation == null)
   {
     string str = "Null 'orientation' argument.";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
   else
   {
     WaferMapPlot waferMapPlot = new WaferMapPlot(dataset);
     WaferMapRenderer renderer = new WaferMapRenderer();
     waferMapPlot.setRenderer(renderer);
     JFreeChart.__\u003Cclinit\u003E();
     JFreeChart jfc = new JFreeChart(title, JFreeChart.__\u003C\u003EDEFAULT_TITLE_FONT, (Plot) waferMapPlot, num != 0);
     ChartFactory.currentTheme.apply(jfc);
     return jfc;
   }
 }