• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java ChartChangeListener类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.jfree.chart.event.ChartChangeListener的典型用法代码示例。如果您正苦于以下问题:Java ChartChangeListener类的具体用法?Java ChartChangeListener怎么用?Java ChartChangeListener使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ChartChangeListener类属于org.jfree.chart.event包,在下文中一共展示了ChartChangeListener类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: getChartChangeListner

import org.jfree.chart.event.ChartChangeListener; //导入依赖的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();
            }
        }
    };
}
 
开发者ID:lead4good,项目名称:open-java-trade-manager,代码行数:19,代码来源:ChartJDialog.java


示例2: addChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Registers an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted).
 */
public void addChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }
    this.changeListeners.add(ChartChangeListener.class, listener);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:JFreeChart.java


示例3: removeChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Deregisters an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted)
 */
public void removeChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }
    this.changeListeners.remove(ChartChangeListener.class, listener);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:12,代码来源:JFreeChart.java


示例4: notifyListeners

import org.jfree.chart.event.ChartChangeListener; //导入依赖的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);
            }
        }
    }

}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:18,代码来源:JFreeChart.java


示例5: notifyListeners

import org.jfree.chart.event.ChartChangeListener; //导入依赖的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);
            }
        }
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:18,代码来源:JFreeChart.java


示例6: notifyListeners

import org.jfree.chart.event.ChartChangeListener; //导入依赖的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);
            }
        }
    }
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:18,代码来源:JFreeChart.java


示例7: removeChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Deregisters an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted)
 *
 * @see #addChangeListener(ChartChangeListener)
 */
public void removeChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }

    this.changeListeners.remove(ChartChangeListener.class, listener);
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:15,代码来源:MotionChart.java


示例8: notifyListeners

import org.jfree.chart.event.ChartChangeListener; //导入依赖的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);
			}
		}
	}
}
 
开发者ID:hongliangpan,项目名称:manydesigns.cn,代码行数:16,代码来源:JFreeChart.java


示例9: createCompositeChart

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
Control createCompositeChart(final Composite parent, EventLogParser logParser,
        String title) {
    mChart = ChartFactory.createTimeSeriesChart(
            null,
            null /* timeAxisLabel */,
            null /* valueAxisLabel */,
            null, /* dataset. set below */
            true /* legend */,
            false /* tooltips */,
            false /* urls */);

    // get the font to make a proper title. We need to convert the swt font,
    // into an awt font.
    Font f = parent.getFont();
    FontData[] fData = f.getFontData();

    // event though on Mac OS there could be more than one fontData, we'll only use
    // the first one.
    FontData firstFontData = fData[0];

    java.awt.Font awtFont = SWTUtils.toAwtFont(parent.getDisplay(),
            firstFontData, true /* ensureSameSize */);


    mChart.setTitle(new TextTitle(title, awtFont));

    final XYPlot xyPlot = mChart.getXYPlot();
    xyPlot.setRangeCrosshairVisible(true);
    xyPlot.setRangeCrosshairLockedOnData(true);
    xyPlot.setDomainCrosshairVisible(true);
    xyPlot.setDomainCrosshairLockedOnData(true);

    mChart.addChangeListener(new ChartChangeListener() {
        @Override
        public void chartChanged(ChartChangeEvent event) {
            ChartChangeEventType type = event.getType();
            if (type == ChartChangeEventType.GENERAL) {
                // because the value we need (rangeCrosshair and domainCrosshair) are
                // updated on the draw, but the notification happens before the draw,
                // we process the click in a future runnable!
                parent.getDisplay().asyncExec(new Runnable() {
                    @Override
                    public void run() {
                        processClick(xyPlot);
                    }
                });
            }
        }
    });

    mChartComposite = new ChartComposite(parent, SWT.BORDER, mChart,
            ChartComposite.DEFAULT_WIDTH,
            ChartComposite.DEFAULT_HEIGHT,
            ChartComposite.DEFAULT_MINIMUM_DRAW_WIDTH,
            ChartComposite.DEFAULT_MINIMUM_DRAW_HEIGHT,
            3000, // max draw width. We don't want it to zoom, so we put a big number
            3000, // max draw height. We don't want it to zoom, so we put a big number
            true,  // off-screen buffer
            true,  // properties
            true,  // save
            true,  // print
            true,  // zoom
            true);   // tooltips

    mChartComposite.addDisposeListener(new DisposeListener() {
        @Override
        public void widgetDisposed(DisposeEvent e) {
            mValueTypeDataSetMap.clear();
            mDataSetCount = 0;
            mOccurrenceDataSet = null;
            mChart = null;
            mChartComposite = null;
            mValueDescriptorSeriesMap.clear();
            mOcurrenceDescriptorSeriesMap.clear();
        }
    });

    return mChartComposite;

}
 
开发者ID:utds3lab,项目名称:SMVHunter,代码行数:81,代码来源:EventDisplay.java


示例10: addChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Registers an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted).
 * 
 * @see #removeChangeListener(ChartChangeListener)
 */
public void addChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }
    this.changeListeners.add(ChartChangeListener.class, listener);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:JFreeChart.java


示例11: removeChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Deregisters an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted)
 * 
 * @see #addChangeListener(ChartChangeListener)
 */
public void removeChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }
    this.changeListeners.remove(ChartChangeListener.class, listener);
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:JFreeChart.java


示例12: addChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Registers an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted).
 *
 * @see #removeChangeListener(ChartChangeListener)
 */
public void addChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }
    this.changeListeners.add(ChartChangeListener.class, listener);
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:14,代码来源:MotionChart.java


示例13: removeChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Deregisters an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted)
 *
 * @see #addChangeListener(ChartChangeListener)
 */
public void removeChangeListener(ChartChangeListener listener) {
    if (listener == null) {
        throw new IllegalArgumentException("Null 'listener' argument.");
    }
    this.changeListeners.remove(ChartChangeListener.class, listener);
}
 
开发者ID:SOCR,项目名称:HTML5_WebSite,代码行数:14,代码来源:JFreeChart.java


示例14: addChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Registers an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted).
 *
 * @see #removeChangeListener(ChartChangeListener)
 */
public void addChangeListener(ChartChangeListener listener) {
    ParamChecks.nullNotPermitted(listener, "listener");
    this.changeListeners.add(ChartChangeListener.class, listener);
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:12,代码来源:JFreeChart.java


示例15: removeChangeListener

import org.jfree.chart.event.ChartChangeListener; //导入依赖的package包/类
/**
 * Deregisters an object for notification of changes to the chart.
 *
 * @param listener  the listener (<code>null</code> not permitted)
 *
 * @see #addChangeListener(ChartChangeListener)
 */
public void removeChangeListener(ChartChangeListener listener) {
    ParamChecks.nullNotPermitted(listener, "listener");
    this.changeListeners.remove(ChartChangeListener.class, listener);
}
 
开发者ID:mdzio,项目名称:ccu-historian,代码行数:12,代码来源:JFreeChart.java



注:本文中的org.jfree.chart.event.ChartChangeListener类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java DefaultMapperFactory类代码示例发布时间:2022-05-21
下一篇:
Java SPacketSoundEffect类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap