當前位置: 首頁>>代碼示例>>Java>>正文


Java ApplicationFrame類代碼示例

本文整理匯總了Java中org.jfree.ui.ApplicationFrame的典型用法代碼示例。如果您正苦於以下問題:Java ApplicationFrame類的具體用法?Java ApplicationFrame怎麽用?Java ApplicationFrame使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


ApplicationFrame類屬於org.jfree.ui包,在下文中一共展示了ApplicationFrame類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: displayChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:ta4j,項目名稱:ta4j,代碼行數:18,代碼來源:CashFlowToChart.java

示例2: showGraph

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
private void showGraph() {
        final JFreeChart chart = ChartFactory.createScatterPlot(
                title,                  // chart title
                xValue,                      // x axis label
                yValue,                      // y axis label
                dataset,                  // data
                PlotOrientation.VERTICAL,
                true,                     // include legend
                true,                     // tooltips
                false                     // urls
        );
        XYPlot plot = (XYPlot) chart.getPlot();
        DemoRenderer renderer = new DemoRenderer();
//		renderer.setBasePaint(Color.blue);
//		renderer.setSeriesLinesVisible(0, true);
        plot.setRenderer(renderer);
        final ChartPanel chartPanel = new ChartPanel(chart);
        chartPanel.setPreferredSize(new java.awt.Dimension(640, 480));
        final ApplicationFrame frame = new ApplicationFrame(title);
        frame.setContentPane(chartPanel);
        frame.pack();
        frame.setVisible(true);
    }
 
開發者ID:fact-project,項目名稱:fact-tools,代碼行數:24,代碼來源:ScatterPlotter.java

示例3: showChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:udoprog,項目名稱:tiny-async-java,代碼行數:21,代碼來源:ChartUtils.java

示例4: run

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
@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);
}
 
開發者ID:EFTEMj,項目名稱:EFTEMj,代碼行數:21,代碼來源:CTF.java

示例5: getMenu

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
public static JMenuBar getMenu( JFreeChart chart,ApplicationFrame jg ){
Action SaveAs = new SaveAs_Action(chart,"Save as...",null,"Save as...");
Action Quit = new Quit_Action(jg,"Quit",null,"Quit");

    JMenuBar JMB = new JMenuBar();
                
    JMenu file = new JMenu("File");
    JMB.add(file);
    file.add(SaveAs);file.add(Quit);
    return JMB;
}
 
開發者ID:mathhobbit,項目名稱:EditCalculateAndChart,代碼行數:12,代碼來源:AbstractFramePlt.java

示例6: getMenu

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
public static JMenuBar getMenu( Chart3D chart,ApplicationFrame jg ){
         Action SaveAs = new SaveAs_Action3D(chart,"Save as...",null,"Save as...");
         Action Quit = new Quit_Action(jg,"Quit",null,"Quit");

    JMenuBar JMB = new JMenuBar();
                
    JMenu file = new JMenu("File");
    JMB.add(file);
    file.add(SaveAs);file.add(Quit);
    return JMB;
}
 
開發者ID:mathhobbit,項目名稱:EditCalculateAndChart,代碼行數:12,代碼來源:AbstractFramePlt3D.java

示例7: Quit_Action

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
public Quit_Action(ApplicationFrame ed, String text, ImageIcon icon,
               String desc) {
            //   String desc, Integer mnemonic) { like mnemomnic=KeyEvent.VK_AT
            //   will be updated after "escape" command mode is introduced
            // (like in "vi") 
        super(text, icon);
        TEdit = ed; 
        putValue(SHORT_DESCRIPTION, desc);
//        putValue(MNEMONIC_KEY, mnemonic); //change it after "escape" is done
    }
 
開發者ID:mathhobbit,項目名稱:EditCalculateAndChart,代碼行數:11,代碼來源:Quit_Action.java

示例8: displayChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:ta4j,項目名稱:ta4j,代碼行數:18,代碼來源:BuyAndSellSignalsToChart.java

示例9: displayChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:ta4j,項目名稱:ta4j,代碼行數:18,代碼來源:CandlestickChart.java

示例10: displayChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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(500, 270));
    // Application frame
    ApplicationFrame frame = new ApplicationFrame("Ta4j example - Indicators to chart");
    frame.setContentPane(panel);
    frame.pack();
    RefineryUtilities.centerFrameOnScreen(frame);
    frame.setVisible(true);
}
 
開發者ID:ta4j,項目名稱:ta4j,代碼行數:18,代碼來源:IndicatorsToChart.java

示例11: displayChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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);
}
 
開發者ID:jnidzwetzki,項目名稱:crypto-bot,代碼行數:20,代碼來源:Chart.java

示例12: displayChart

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * 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(500, 270));
    // Application frame
    ApplicationFrame frame = new ApplicationFrame("BTC/USD with Chande " +
            "Moving Oscillator");
    frame.setContentPane(panel);
    frame.pack();
    RefineryUtilities.centerFrameOnScreen(frame);
    frame.setVisible(true);
}
 
開發者ID:KosherBacon,項目名稱:JavaBitcoinTrader,代碼行數:20,代碼來源:IndicatorsToChart.java

示例13: createStateTrans

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
/**
 * Create State Transition Matrix.
 *
 * @param eList
 *            list with possible events
 * @param seqList
 *            list with sequences
 * @return JTable
 */
public static Container createStateTrans(final EventList eList,
        final List<EventList> seqList) {
    // Create frame
    final Dimension frameDimension = new Dimension(
            (int) (PageSize.A4.getWidth()), (int) (PageSize.A4.getHeight()));

    ApplicationFrame frame = new ApplicationFrame("Vidney");
    frame.setSize(frameDimension);

    String[][] matrix = setUp(eList);
    String[][] matrixUse = fillMatrix(matrix, seqList);
    String[][] outputM = new String[matrixUse.length - 1][matrixUse.length];

    for (int i = 1; i < matrixUse[0].length; i++) {
        for (int j = 0; j < matrixUse[1].length; j++) {
            outputM[i - 1][j] = matrixUse[i][j];
        }
    }

    JTable table = new JTable(outputM, matrixUse[0]);

    JScrollPane scrollPane = new JScrollPane(table);
    scrollPane.setColumnHeaderView(table.getTableHeader());
    scrollPane.setPreferredSize(table.getPreferredSize());

    JPanel p = new JPanel(new BorderLayout());
    p.add(scrollPane, BorderLayout.CENTER);

    // Not a very clean way
    frame.setContentPane(p);
    frame.setVisible(true);
    frame.setVisible(false);

    return scrollPane;
}
 
開發者ID:adamIqbal,項目名稱:Health,代碼行數:45,代碼來源:StateTransitionMatrix.java

示例14: display

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
public static void display(JFreeChart plot) {		
    ApplicationFrame frame = new ApplicationFrame(plot.getTitle().getText());
    ChartPanel plotPanel = new ChartPanel(plot);
    
       plotPanel.setPreferredSize(new java.awt.Dimension(WIDTH, HEIGHT));
       
       frame.setContentPane(plotPanel);			
    frame.pack();
       RefineryUtilities.centerFrameOnScreen(frame);
       frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
       frame.setVisible(true);	        
}
 
開發者ID:gmarciani,項目名稱:opmap,代碼行數:13,代碼來源:Plotter.java

示例15: main

import org.jfree.ui.ApplicationFrame; //導入依賴的package包/類
public static void main(String[] args) throws IOException {
    final File inputcsv = new File("/Volumes/SSD/training_latlng");
    final List<double[]> data = new ArrayList<double[]>(10000000);

    // read in images
    final BufferedReader br = new BufferedReader(new FileReader(inputcsv));
    String line;
    int i = 0;
    br.readLine();
    while ((line = br.readLine()) != null) {
        final String[] parts = line.split(" ");

        final double longitude = Double.parseDouble(parts[2]);
        final double latitude = Double.parseDouble(parts[1]);

        data.add(new double[] { longitude, latitude });

        if (longitude >= -0.1 && longitude < 0 && latitude > 50 && latitude < 54)
            System.out.println(parts[0] + " " + latitude + " " + longitude);

        // if (i++ % 10000 == 0)
        // System.out.println(i);
    }
    br.close();

    System.out.println("Done reading");

    final float[][] dataArr = new float[2][data.size()];
    for (i = 0; i < data.size(); i++) {
        dataArr[0][i] = (float) data.get(i)[0];
        dataArr[1][i] = (float) data.get(i)[1];
    }

    final NumberAxis domainAxis = new NumberAxis("X");
    domainAxis.setRange(-180, 180);
    final NumberAxis rangeAxis = new NumberAxis("Y");
    rangeAxis.setRange(-90, 90);
    final FastScatterPlot plot = new FastScatterPlot(dataArr, domainAxis, rangeAxis);

    final JFreeChart chart = new JFreeChart("Fast Scatter Plot", plot);
    chart.getRenderingHints().put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);

    final ChartPanel chartPanel = new ChartPanel(chart);
    chartPanel.setPreferredSize(new java.awt.Dimension(500, 270));
    final ApplicationFrame frame = new ApplicationFrame("Title");
    frame.setContentPane(chartPanel);
    frame.pack();
    frame.setVisible(true);
}
 
開發者ID:openimaj,項目名稱:openimaj,代碼行數:50,代碼來源:PlotFlickrGeo.java


注:本文中的org.jfree.ui.ApplicationFrame類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。