gpt4 book ai didi

org.knowm.xchart.XChartPanel.revalidate()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-18 14:58:40 27 4
gpt4 key购买 nike

本文整理了Java中org.knowm.xchart.XChartPanel.revalidate()方法的一些代码示例,展示了XChartPanel.revalidate()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XChartPanel.revalidate()方法的具体详情如下:
包路径:org.knowm.xchart.XChartPanel
类名称:XChartPanel
方法名:revalidate

XChartPanel.revalidate介绍

暂无

代码示例

代码示例来源:origin: knowm/XChange

@Override
 public void run() {
  try {
   updateData();
   // update chart
   chart.updateXYSeries(BIDS_SERIES_NAME, xAxisBidData, yAxisBidData, null);
   chart.updateXYSeries(ASKS_SERIES_NAME, xAxisAskData, yAxisAskData, null);
   chartPanel.revalidate();
   chartPanel.repaint();
  } catch (IOException e) {
   e.printStackTrace();
  }
 }
};

代码示例来源:origin: knowm/XChange

@Override
 public void run() {
  try {
   BitcoiniumTicker bitcoiniumTicker =
     bitcoiniumMarketDataService.getBitcoiniumTicker("BTC", "BITSTAMP_USD");
   System.out.println(bitcoiniumTicker.toString());
   Date timestamp = new Date(bitcoiniumTicker.getTimestamp());
   float price = bitcoiniumTicker.getLast().floatValue();
   if (xAxisData.get(xAxisData.size() - 1).getTime() != timestamp.getTime()) {
    xAxisData.add(timestamp);
    yAxisData.add(price);
    XYSeries series = chart.updateXYSeries(SERIES_NAME, xAxisData, yAxisData, null);
    chartPanel.revalidate();
    chartPanel.repaint();
    System.out.println(series.getXData());
    System.out.println(series.getYData());
   } else {
    System.out.println("No new data.");
   }
  } catch (IOException e) {
   e.printStackTrace();
  }
 }
};

代码示例来源:origin: knowm/XChart

/**
  * Repaint the XChartPanel given the provided index.
  *
  * @param index
  */
 public void repaintChart(int index) {

  chartPanels.get(index).revalidate();
  chartPanels.get(index).repaint();
 }
}

代码示例来源:origin: knowm/XChart

@Override
 public void run() {
  realtimeChart02.updateData();
  chartPanel.revalidate();
  chartPanel.repaint();
 }
};

代码示例来源:origin: knowm/XChart

@Override
 public void run() {
  realtimeChart05.updateData();
  chartPanel.revalidate();
  chartPanel.repaint();
 }
};

代码示例来源:origin: knowm/XChart

@Override
 public void run() {
  realtimeChart03.updateData();
  chartPanel.revalidate();
  chartPanel.repaint();
 }
};

代码示例来源:origin: knowm/XChart

@Override
 public void run() {
  realtimeChart06.updateData();
  chartPanel.revalidate();
  chartPanel.repaint();
 }
};

代码示例来源:origin: knowm/XChart

@Override
 public void run() {
  realtimeChart01.updateData();
  chartPanel.revalidate();
  chartPanel.repaint();
 }
};

代码示例来源:origin: knowm/XChart

@Override
 public void run() {
  realtimeChart04.updateData();
  chartPanel.revalidate();
  chartPanel.repaint();
 }
};

代码示例来源:origin: org.knowm.xchart/xchart

/**
  * Repaint the XChartPanel given the provided index.
  *
  * @param index
  */
 public void repaintChart(int index) {

  chartPanels.get(index).revalidate();
  chartPanels.get(index).repaint();
 }
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com