本文整理汇总了Java中org.jfree.chart.event.ChartChangeEvent类的典型用法代码示例。如果您正苦于以下问题:Java ChartChangeEvent类的具体用法?Java ChartChangeEvent怎么用?Java ChartChangeEvent使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ChartChangeEvent类属于org.jfree.chart.event包,在下文中一共展示了ChartChangeEvent类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getChartChangeListner
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
private ChartChangeListener getChartChangeListner() {
return new ChartChangeListener() {
@Override
public void chartChanged(ChartChangeEvent event) {
// Is weird. This works well for zoom-in. When we add new CCI or
// RIS. This event function will be triggered too. However, the
// returned draw area will always be the old draw area, unless
// you move your move over.
// Even I try to capture event.getType() == ChartChangeEventType.NEW_DATASET
// also doesn't work.
if (event.getType() == ChartChangeEventType.GENERAL) {
ChartJDialog.this.chartLayerUI.updateTraceInfos();
// Re-calculating high low value.
ChartJDialog.this.updateHighLowJLabels();
}
}
};
}
示例2: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart (or any of its components),
* and redraws the chart.
*
* @param event
*/
public void chartChanged( ChartChangeEvent event ) {
/*
* Do not look at event.getSource(), since the source of the event is
* likely to be one of the chart's components rather than the chart itself.
*/
if ( event.getType() == ChartChangeEventType.DATASET_UPDATED ) {
repaint();
}
else if ( event.getType() == ChartChangeEventType.NEW_DATASET ) {
repaint();
}
else {
updateAll();
}
}
示例3: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart, and redraws the chart.
*
* @param event
* details of the chart change event.
*/
@Override
public void chartChanged(ChartChangeEvent event) {
Plot plot = this.chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable z = (Zoomable) plot;
this.orientation = z.getOrientation();
}
repaint();
}
示例4: setNotify
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Sets a flag that controls whether or not listeners receive {@link ChartChangeEvent}
* notifications.
*
* @param notify a boolean.
*/
public void setNotify(boolean notify) {
this.notify = notify;
// if the flag is being set to true, there may be queued up changes...
if (notify) {
notifyListeners(new ChartChangeEvent(this));
}
}
示例5: notifyListeners
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Sends a {@link ChartChangeEvent} to all registered listeners.
*
* @param event information about the event that triggered the notification.
*/
protected void notifyListeners(ChartChangeEvent event) {
if (this.notify) {
Object[] listeners = this.changeListeners.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChartChangeListener.class) {
((ChartChangeListener) listeners[i + 1]).chartChanged(event);
}
}
}
}
示例6: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart, and redraws the chart.
*
* @param event details of the chart change event.
*/
public void chartChanged(ChartChangeEvent event) {
this.refreshBuffer = true;
Plot plot = chart.getPlot();
if (plot instanceof Zoomable)
{
Zoomable z = (Zoomable) plot;
this.orientation = z.getOrientation();
}
this.redraw();
}
示例7: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart, and redraws the chart.
*
* @param event details of the chart change event.
*/
public void chartChanged(ChartChangeEvent event) {
this.refreshBuffer = true;
Plot plot = this.chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable z = (Zoomable) plot;
this.orientation = z.getOrientation();
}
repaint();
}
示例8: notifyListeners
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Sends a {@link ChartChangeEvent} to all registered listeners.
*
* @param event information about the event that triggered the
* notification.
*/
protected void notifyListeners(ChartChangeEvent event) {
if (this.notify) {
Object[] listeners = this.changeListeners.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChartChangeListener.class) {
((ChartChangeListener) listeners[i + 1]).chartChanged(
event);
}
}
}
}
示例9: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart, and redraws the chart.
*
* @param event details of the chart change event.
*/
public void chartChanged(ChartChangeEvent event) {
this.refreshBuffer = true;
Plot plot = this.chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable z = (Zoomable) plot;
this.orientation = z.getOrientation();
}
this.canvas.redraw();
}
示例10: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart, and redraws the chart.
*
* @param event details of the chart change event.
*/
@Override
public void chartChanged(ChartChangeEvent event) {
this.refreshBuffer = true;
Plot plot = this.chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable z = (Zoomable) plot;
this.orientation = z.getOrientation();
}
repaint();
}
示例11: notifyListeners
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Sends a {@link ChartChangeEvent} to all registered listeners.
*
* @param event information about the event that triggered the
* notification.
*/
protected void notifyListeners(ChartChangeEvent event) {
if (this.notify) {
Object[] listeners = this.changeListeners.getListenerList();
for (int i = listeners.length - 2; i >= 0; i -= 2) {
if (listeners[i] == ChartChangeListener.class) {
((ChartChangeListener) listeners[i + 1]).chartChanged(
event);
}
}
}
}
示例12: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
@Override
public void chartChanged(ChartChangeEvent e) {
try {
zoomRangeBounds = e.getChart().getXYPlot().getRangeAxis().getRange();
zoomDomainBounds = e.getChart().getXYPlot().getDomainAxis().getRange();
useZoomBounds.setSelected(true);
} catch (Exception e1) {
e1.printStackTrace();
}
}
示例13: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
@Override
public void chartChanged(ChartChangeEvent event) {
JFreeChart chart = event.getChart();
if (chart != null) {
renderToSvg(chart);
}
}
示例14: chartChanged
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Receives notification of changes to the chart, and redraws the chart.
*
* @param event details of the chart change event.
*/
public void chartChanged(ChartChangeEvent event) {
this.refreshBuffer = true;
Plot plot = chart.getPlot();
if (plot instanceof Zoomable) {
Zoomable z = (Zoomable) plot;
this.orientation = z.getOrientation();
}
repaint();
}
示例15: setPadding
import org.jfree.chart.event.ChartChangeEvent; //导入依赖的package包/类
/**
* Sets the padding between the chart border and the chart drawing area,
* and sends a {@link ChartChangeEvent} to all registered listeners.
*
* @param padding the padding (<code>null</code> not permitted).
*/
public void setPadding(RectangleInsets padding) {
if (padding == null) {
throw new IllegalArgumentException("Null 'padding' argument.");
}
this.padding = padding;
notifyListeners(new ChartChangeEvent(this));
}