public MultiLineChart(final String title, List<Users> tpaverficationUserList) { super(title); this.tpaverficationUserList = tpaverficationUserList; XYDataset dataset = null; try { dataset = createDataset(); } catch (Exception e) { System.out.println("MultiLineChart -- Constructor" + e); } final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(700, 470)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { // ****************************************************************** // More than 150 demo applications are included with the JFreeChart // Developer Guide...for more information, see: // // > http://www.object-refinery.com/jfreechart/guide.html // // ****************************************************************** PieChartDemo1 demo = new PieChartDemo1("JFreeChart: Pie Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
public void visualizarSerieChartAsignRescateVict(Color color,CategoryDataset dataset) { ChartPanel chartPanel = new ChartPanel(chartNotifAsigResc); chartNotifAsigResc.setBackgroundPaint(Color.white); CategoryPlot plot = (CategoryPlot) chartNotifAsigResc.getPlot(); plot.setBackgroundPaint(color); plot.setDataset(dataset); plot.setDomainGridlinePaint(Color.white); plot.setRangeGridlinePaint(Color.white); NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis(); rangeAxis.setUpperMargin(0.15); CategoryItemRenderer renderer = plot.getRenderer(); renderer.setItemLabelGenerator(new LabelGenerator(50.0)); renderer.setItemLabelFont(new Font("Serif", Font.PLAIN, 8)); renderer.setItemLabelsVisible(true); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); }
/** * Handles a 'mouse pressed' event. * <P> * This event is the popup trigger on Unix/Linux. For Windows, the popup * trigger is the 'mouse released' event. * * @param e The mouse event. */ public void mousePressed(MouseEvent e) { if (this.zoomRectangle == null) { this.zoomPoint = RefineryUtilities.getPointInRectangle( e.getX(), e.getY(), getScaledDataArea() ); LOGGER.debug("In mousePressed()"); LOGGER.debug("getScaledDataArea() = " + getScaledDataArea()); LOGGER.debug("this.zoomPoint = " + this.zoomPoint); // check for popup trigger... if (e.isPopupTrigger()) { if (this.popup != null) { displayPopupMenu(e.getX(), e.getY()); } } } }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(String[] args) { // ****************************************************************** // More than 150 demo applications are included with the JFreeChart // Developer Guide...for more information, see: // // > http://www.object-refinery.com/jfreechart/guide.html // // ****************************************************************** PieChartDemo1 demo = new PieChartDemo1("Pie Chart Demo 1"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
public KeySignatureGraph(String title, int one, int two) { super(title); XYDataset dataset = null; try { dataset = createDataset(one, two); } catch (Exception e) { System.out.println("MultiLineChart -- Constructor" + e); } final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 370)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); }
public KeyStorageGraph(String title, int one, int two) { super(title); XYDataset dataset = null; try { dataset = createDataset(); } catch (Exception e) { System.out.println("MultiLineChart -- Constructor" + e); } final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 370)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); }
public TimeandCostGraph(String title, int one, int two) { super(title); XYDataset dataset = null; try { dataset = createDataset(); } catch (Exception e) { System.out.println("MultiLineChart -- Constructor" + e); } final JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(700, 470)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); this.setVisible(true); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); }
/** * Starting point for the demonstration application. * * @param args */ public static void main(final String[] args) { ScatterPlotter sp = new ScatterPlotter(""); if(sp.getScatterPlot().isBatch()){ sp.pack(); RefineryUtilities.centerFrameOnScreen(sp); sp.setVisible(false); //try { // scatter.saveSVG(new File("out.svg"), 500, 500); //} catch (IOException e) { // e.printStackTrace(); //} }else{ sp.pack(); RefineryUtilities.centerFrameOnScreen(sp); sp.setVisible(true); } }
public static void showScheduleAndWait( List<Schedule> schedules, HashMap<VirtualCommodity,PriceSignal> ps, HashMap<VirtualCommodity,PowerLimitSignal> pls, long currentTime) { final Object sync = new Object(); ScheduleDrawer demo = new ScheduleDrawer(schedules, ps, pls, currentTime); JFrame frame = new JFrame("Schedule"); frame.setContentPane(demo); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); synchronized (sync) { try { sync.wait(); } catch (InterruptedException e) {} } frame.dispose(); }
/** * Main method * * @param args * NOT IN USE. */ public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { ExternalBasicChart demo = new ExternalBasicChart("Active learning process", "", "Number of labeled instances"); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); } }); }
public static void showScheduleAndWait( List<Schedule> schedules, EnumMap<AncillaryCommodity,PriceSignal> ps, EnumMap<AncillaryCommodity,PowerLimitSignal> pls, long currentTime) { final Object sync = new Object(); ScheduleDrawer demo = new ScheduleDrawer(schedules, ps, pls, currentTime); JFrame frame = new JFrame("Schedule"); frame.setContentPane(demo); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); synchronized (sync) { try { sync.wait(); } catch (InterruptedException e) {} } frame.dispose(); }
/** * Execute. */ public void execute() { IntervalXYDataset dataset = createDataset(); JFreeChart chart = createChart(dataset); final ChartPanel chartPanel = new ChartPanel(chart); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); exportFigure(chart); //this.setVisible(true); }
/** * Inits the. * * @param values the values * @param values_des the values_des * @param dates the dates * @param save the save * @param show the show */ private void init(double[] values, String values_des, List<Date> dates, boolean save, boolean show) { this.values1 = values; this.values1_des = values_des; this.dates = dates; ChartPanel chartPanel = (ChartPanel) createDemoPanel(); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); setContentPane(chartPanel); this.pack(); RefineryUtilities.centerFrameOnScreen(this); if(show) { this.setVisible(true); } }
public static void main(String[] args) throws IOException, InterruptedException, WriteException { //Paramètres SimulationParameters simulationParameters = new SimulationParameters(); RefineryUtilities.centerFrameOnScreen(simulationParameters); simulationParameters.setVisible(true); while (simulationParametersComplete == false) { sleep(1); // Get user selected time and file to open if (hDep == null || resultFile == null) { simulationParametersComplete = false; } else { simulationParametersComplete = true; } } //App Controller AppController ac = new AppController(hDep, resultFile); //Lancement des threads ac.launch(); }
public static AbstractObject getAbstractObject() { DialogFactory dialog = new DialogFactory(null,true); dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); //dialog.setBounds(350, 350, 200, 200); dialog.setTitle("Enter Abstract Object data ..."); dialog.jValue.setEditable(false); dialog.jValue.setEnabled(false); RefineryUtilities.centerFrameOnScreen(dialog); dialog.setVisible(true); dialog.dispose(); if (dialog.ok == true) { AbstractObject output = new AbstractObject(dialog.jName.getText()); return(output); } else return(null); }
public static Property getProperty() { DialogFactory dialog = new DialogFactory(null,true); dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); //dialog.setBounds(350, 350, 200, 200); dialog.setTitle("Enter Property data ..."); dialog.jValue.setEditable(false); dialog.jValue.setEnabled(false); RefineryUtilities.centerFrameOnScreen(dialog); dialog.setVisible(true); dialog.dispose(); if (dialog.ok == true) { Property output = new Property(dialog.jName.getText()); return(output); } else return(null); }
public static QualityDimension getQualityDimension() { DialogFactory dialog = new DialogFactory(null,true); dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); //dialog.setBounds(350, 350, 200, 200); dialog.setTitle("Enter Quality Dimension data ..."); dialog.jValue.setEditable(true); dialog.jValue.setEnabled(true); RefineryUtilities.centerFrameOnScreen(dialog); dialog.setVisible(true); dialog.dispose(); if (dialog.ok == true) { QualityDimension output = new QualityDimension(dialog.jName.getText(),dialog.jValue.getText()); return(output); } else return(null); }
public static void editQualityDimension(QualityDimension qd) { DialogFactory dialog = new DialogFactory(null,true); dialog.setModalityType(Dialog.ModalityType.APPLICATION_MODAL); //dialog.setBounds(350, 350, 200, 200); dialog.setTitle("Edit Quality Dimension data ..."); dialog.jValue.setEditable(true); dialog.jValue.setEnabled(true); dialog.jName.setText(qd.getName()); dialog.jValue.setText(qd.getValue().toString()); RefineryUtilities.centerFrameOnScreen(dialog); dialog.setVisible(true); dialog.dispose(); if (dialog.ok == true) { qd.setName(dialog.jName.getText()); qd.setValue(dialog.jValue.getText()); } }
/** * Create a new set of LogLineMatchers. * * @param owner * @param isNew * @param pasteAsRegExp */ public void displayLLMView(JFrame owner, boolean isNew, String pasteAsRegExp) { try { owner.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR)); mLLMView = new LLMView(owner, isNew, pasteAsRegExp, this); // Don't call mLLMView.pack() because then non-visible items // will disappear. RefineryUtilities.centerFrameOnScreen(mLLMView); } finally { owner.setCursor(Cursor.getDefaultCursor()); } if (mLLMView != null) { mLLMView.setVisible(true); } }
/** * Starting point for the demonstration application. */ public static void showChart( String name, String xAxis, String yAxis1, XYDataset dataset1, String yAxis2, XYDataset dataset2 ) { final JFreeChart chart = createChart(name, xAxis, yAxis1, dataset1, yAxis2, dataset2); final ChartPanel chartPanel = createPanel(chart); final ApplicationFrame app = new ApplicationFrame(name); chartPanel.setPreferredSize(new java.awt.Dimension(500, 270)); app.setContentPane(chartPanel); app.pack(); RefineryUtilities.centerFrameOnScreen(app); app.setVisible(true); }
@Override public void run(final String arg0) { // http://www.math.hu-berlin.de/~ccafm/lehre_BZQ_Numerik/allg/JAVA_Pakete/JFreeChart/JFreeChart-Tutorial.html final String title = "Contrast Transfer Function"; final XYSplineRenderer spline = new XYSplineRenderer(); spline.setSeriesPaint(0, Color.RED); spline.setSeriesPaint(1, Color.BLUE); spline.setSeriesShapesVisible(0, false); spline.setSeriesShapesVisible(1, false); final NumberAxis xax = new NumberAxis("q in 1/nm"); final NumberAxis yax = new NumberAxis("CTF"); final XYPlot plot = new XYPlot(createDataset(), xax, yax, spline); final JFreeChart chart = new JFreeChart(plot); final ChartPanel chartPanel = new ChartPanel(chart); final ApplicationFrame chartFrame = new ApplicationFrame(title); chartFrame.setContentPane(chartPanel); chartFrame.pack(); RefineryUtilities.centerFrameOnScreen(chartFrame); chartFrame.setVisible(true); }
/** * Starting point for the demonstration application. * * @param args ignored. */ public static void main(final String[] args) { if ( args.length < 1 ) { System.out.println("Model file expected"); return; } final BarChart demo = new BarChart("Bar Chart Demo"); Resource r = Util.load(args[0]); demo.perform(r, true); demo.pack(); RefineryUtilities.centerFrameOnScreen(demo); demo.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new Dimension(1024, 400)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Buy and sell signals to chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new Dimension(1024, 400)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Cash flow to chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }
/** * Displays a chart in a frame. * @param chart the chart to be displayed */ private static void displayChart(JFreeChart chart) { // Chart panel ChartPanel panel = new ChartPanel(chart); panel.setFillZoomRectangle(true); panel.setMouseWheelEnabled(true); panel.setPreferredSize(new java.awt.Dimension(740, 300)); // Application frame ApplicationFrame frame = new ApplicationFrame("Ta4j example - Candlestick chart"); frame.setContentPane(panel); frame.pack(); RefineryUtilities.centerFrameOnScreen(frame); frame.setVisible(true); }