List of usage examples for org.jfree.chart ChartPanel setMouseZoomable
public void setMouseZoomable(boolean flag, boolean fillRectangle)
From source file:cv.mikusher.freechart.TimeSeries_AWT.java
public TimeSeries_AWT(final String title) { super(title); setDefaultCloseOperation(ApplicationFrame.EXIT_ON_CLOSE); final XYDataset dataset = createDataset(); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(560, 370)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel);/*ww w. j a v a 2s.c o m*/ }
From source file:org.jfree.chart.demo.MouseListenerDemo3.java
public MouseListenerDemo3(String s) { super(s);/*w w w. jav a 2s .co m*/ String s1 = "Legal & General Unit Trust Prices"; XYDataset xydataset = createDataset(); chart = ChartFactory.createTimeSeriesChart(s1, "Date", "Price Per Unit", xydataset, true, true, false); chart.addSubtitle(new TextTitle("Click on the legend to see series highlighted...")); XYPlot xyplot = (XYPlot) chart.getPlot(); DateAxis dateaxis = (DateAxis) xyplot.getDomainAxis(); dateaxis.setDateFormatOverride(new SimpleDateFormat("MMM-yyyy")); ChartPanel chartpanel = new ChartPanel(chart); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); chartpanel.addChartMouseListener(this); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.TimeSeriesDemo1.java
public TimeSeriesDemo1(String s) { super(s);//from w ww.j a v a2s . c o m XYDataset xydataset = createDataset(); JFreeChart jfreechart = createChart(xydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.CompareToPreviousYearDemo.java
public CompareToPreviousYearDemo(String s) { super(s);//from w ww . j a v a2 s .com ChartPanel chartpanel = (ChartPanel) createDemoPanel(); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, true); setContentPane(chartpanel); }
From source file:org.jfree.chart.demo.XYTitleAnnotationDemo1.java
public XYTitleAnnotationDemo1(String s) { super(s);//from w w w . j a va 2 s . co m ChartPanel chartpanel = (ChartPanel) createDemoPanel(); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); setContentPane(chartpanel); }
From source file:xdevs.lib.util.ScopeView.java
public ScopeView(String windowsTitle, String title, String xTitle, String yTitle) { super(windowsTitle); XYSeriesCollection dataSet = new XYSeriesCollection(); serie = new XYSeries(yTitle); dataSet.addSeries(serie);/*from w w w. ja v a 2 s .c om*/ JFreeChart chart = ChartFactory.createXYStepChart(title, xTitle, yTitle, dataSet, PlotOrientation.VERTICAL, true, false, false); chart.getXYPlot().setDomainAxis(new NumberAxis()); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { dispose(); } }); super.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
From source file:org.jfree.chart.demo.PeriodAxisDemo1.java
public PeriodAxisDemo1(String s) { super(s);//from w ww . j av a 2s . c om XYDataset xydataset = createDataset(); JFreeChart jfreechart = createChart(xydataset); ChartPanel chartpanel = new ChartPanel(jfreechart, false); chartpanel.setPreferredSize(new Dimension(500, 270)); chartpanel.setMouseZoomable(true, false); setContentPane(chartpanel); }
From source file:xdevs.lib.util.ScopeMultiView.java
public ScopeMultiView(String windowsTitle, String title, String xTitle, String yTitle) { super(windowsTitle); JFreeChart chart = ChartFactory.createXYStepChart(title, xTitle, yTitle, dataSet, PlotOrientation.VERTICAL, true, false, false);/*from w ww. j a v a 2 s.co m*/ chart.getXYPlot().setDomainAxis(new NumberAxis()); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent e) { dispose(); } }); super.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
From source file:org.jfree.chart.demo.TimeSeriesDemo8.java
/** * A demonstration application showing how to create a simple time series chart. * * @param title the frame title./*from w ww . j av a 2 s .c om*/ */ public TimeSeriesDemo8(final String title) { super(title); final XYDataset dataset = createDataset(); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); }
From source file:org.jfree.chart.demo.TimeSeriesDemo5.java
/** * Creates a new demo instance.// w ww . ja va2s .com * * @param title the frame title. */ public TimeSeriesDemo5(final String title) { super(title); final XYDataset dataset = createDataset(); final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); }