Search in sources :

Example 1 with ApplicationFrame

use of org.jfree.ui.ApplicationFrame in project ta4j by ta4j.

the class CashFlowToChart method displayChart.

/**
 * 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);
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ApplicationFrame(org.jfree.ui.ApplicationFrame)

Example 2 with ApplicationFrame

use of org.jfree.ui.ApplicationFrame in project ta4j by ta4j.

the class CandlestickChart method displayChart.

/**
 * 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);
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ApplicationFrame(org.jfree.ui.ApplicationFrame) java.awt(java.awt)

Example 3 with ApplicationFrame

use of org.jfree.ui.ApplicationFrame in project ta4j by ta4j.

the class IndicatorsToChart method displayChart.

/**
 * 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);
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ApplicationFrame(org.jfree.ui.ApplicationFrame)

Example 4 with ApplicationFrame

use of org.jfree.ui.ApplicationFrame in project ta4j by ta4j.

the class BuyAndSellSignalsToChart method displayChart.

/**
 * 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);
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ApplicationFrame(org.jfree.ui.ApplicationFrame)

Example 5 with ApplicationFrame

use of org.jfree.ui.ApplicationFrame in project crypto-bot by jnidzwetzki.

the class Chart method displayChart.

/**
 * 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);
}
Also used : ChartPanel(org.jfree.chart.ChartPanel) ApplicationFrame(org.jfree.ui.ApplicationFrame) Dimension(java.awt.Dimension)

Aggregations

ChartPanel (org.jfree.chart.ChartPanel)5 ApplicationFrame (org.jfree.ui.ApplicationFrame)5 java.awt (java.awt)1 Dimension (java.awt.Dimension)1