/** * A convenience method that switches on mouse-based zooming. * * @param flag {@code true} enables zooming and rectangle fill on * zoom. */ public void setMouseZoomable(boolean flag) { setMouseZoomable(flag, true); }
/** * A convenience method that switches on mouse-based zooming. * * @param flag <code>true</code> enables zooming and rectangle fill on * zoom. */ public void setMouseZoomable(boolean flag) { setMouseZoomable(flag, true); }
XYDataset dataset = createDataset(); JFreeChart chart = createChart(dataset); ChartPanel TopECGPanel = new ChartPanel(chart); TopECGPanel.setPreferredSize(new java.awt.Dimension(500, 270)); TopECGPanel.setMouseZoomable(true); //setContentPane(chartPanel); TopECGPanel.setBounds(10, 41, 917,209); ECGPanel.add(TopECGPanel); XYDataset dataset2 = createDataset(); JFreeChart chart2 = createChart(dataset2); ChartPanel BottomECGPanel = new ChartPanel(chart2); BottomECGPanel.setPreferredSize(new java.awt.Dimension(500, 270)); BottomECGPanel.setMouseZoomable(true); //setContentPane(chartPanel); BottomECGPanel.setBounds(10, 275, 917,226); ECGPanel.add(BottomECGPanel);
public void install() { chartPanel.addMouseListener(this); chartPanel.addMouseMotionListener(this); chartPanel.setMouseZoomable(false); }
public void install() { chartPanel.addMouseListener(this); chartPanel.addMouseMotionListener(this); chartPanel.setMouseZoomable(false); }
public static ApplicationFrame createChartFrame(String title, JFreeChart... charts) { ApplicationFrame chartFrame = new ApplicationFrame(title); final JPanel panel = new JPanel(); panel.setLayout(new GridLayout(0, 1)); for (JFreeChart chart : charts) { final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new Dimension(800, 300)); chartPanel.setMouseZoomable(true, false); panel.add(chartPanel); } chartFrame.setContentPane(panel); return chartFrame; }
public void uninstall() { chartPanel.removeMouseListener(this); chartPanel.removeMouseMotionListener(this); chartPanel.setMouseZoomable(true); }
public void uninstall() { chartPanel.removeMouseListener(this); chartPanel.removeMouseMotionListener(this); chartPanel.setMouseZoomable(true); }
/** * A demonstration application showing how to create a simple time series * chart. This example uses monthly data. * * @param title the frame title. */ public TimeCategoryPlot(String title) { super(title); ChartPanel chartPanel = (ChartPanel) createDemoPanel(); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); }
/** * A demonstration application showing how to create a simple time series * chart. This example uses monthly data. * * @param title the frame title. */ public XYTitleAnnotationDemo1(String title) { super(title); ChartPanel chartPanel = (ChartPanel) createDemoPanel(); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); }
chartPanel.setMouseZoomable(true, false); chartPanel.setBorder(BorderFactory.createLineBorder(Color.BLACK)); add(chartPanel, BorderLayout.CENTER);
/** * Constructor: creates the graph frame. * * @param title Graph title. * @param names Series' names. */ protected GraphDisplay(final String title, final String[] names) { super(title); for (int i = 0; i < names.length; i++) { series.put(names[i], new TimeSeries(names[i], Millisecond.class)); } TimeSeriesCollection dataset = new TimeSeriesCollection(); for (int i = 0; i < names.length; i++) { dataset.addSeries((TimeSeries) series.get(names[i])); } JFreeChart chart = ChartFactory.createTimeSeriesChart( title, null, //"Time", null, //"Value", dataset, true, true, false ); ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 250)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel); }
public CB4JMonitor(String host, String port) { super("CB4J Monitor @ " + host + ":" + port); arrayOfPaint = createPaint(); dataset = new DefaultCategoryDataset(); chart = createChart(dataset); chartPanel = new ChartPanel(chart); chartPanel.setPopupMenu(null); chartPanel.setMouseZoomable(false); chartPanel.setOpaque(true); chartPanel.setFocusable(false); initComponents(); progressBar.setStringPainted(true); statsPanel.setLayout(new java.awt.BorderLayout()); statsPanel.add(chartPanel); statsPanel.validate(); setResizable(false); pack(); }
pannel.setPreferredSize(new Dimension(600, 800)); pannel.setDomainZoomable(false); pannel.setMouseZoomable(false); pannel.setRangeZoomable(false); pannel.setZoomAroundAnchor(false);
/** * Constructor for the container. * * @param tooltab The tooltab. */ public ChartCanvas(ToolTab tool) { super(tool); this.showLabels = true; this.forceLabels = false; this.showLegend = true; this.chartType = CHARTTYPE_PIECHART; this.paintMode = PaintMaps.PAINTMODE_CONVERSATION; this.visible_messages = new ArrayList(); this.visible_components = new ArrayList(); this.dataset_sent = new CategoryPieDataset(); this.dataset_received = new CategoryPieDataset(); this.dataset_total = new CategoryPieDataset(); chart = chartType == CHARTTYPE_PIECHART ? createPieChart() : createBarChart(); chartPanel = new org.jfree.chart.ChartPanel(chart); chartPanel.setMouseZoomable(true, true); chartPanel.setPopupMenu(null); // deactivate standard popup this.setLayout(new BorderLayout()); this.add(BorderLayout.CENTER, chartPanel); chartPanel.addMouseListener(new ChartMouseListener()); }
pannel.setPreferredSize(new Dimension(600, 800)); pannel.setDomainZoomable(false); pannel.setMouseZoomable(false); pannel.setRangeZoomable(false); pannel.setZoomAroundAnchor(false);
ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 250)); chartPanel.setMouseZoomable(true, false); setContentPane(chartPanel);
/** * Set up GUI components. */ private void initialize() { hoursByProjectDataset = new DefaultPieDataset(); initChartData(); final JFreeChart chart = ChartFactory.createPieChart3D(null, hoursByProjectDataset, false, true, false); chart.setBorderVisible(false); chart.setAntiAlias(true); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setMouseZoomable(false); chartPanel.setEnabled(false); chartPanel.setPopupMenu(null); this.add(chartPanel, BorderLayout.CENTER); }
scatterPlotDisplay.setMouseZoomable(true);
scatterPlotDisplay.setMouseZoomable(true);