本文整理汇总了Java中com.ait.lienzo.charts.client.core.resizer.ChartResizeEventHandler类的典型用法代码示例。如果您正苦于以下问题:Java ChartResizeEventHandler类的具体用法?Java ChartResizeEventHandler怎么用?Java ChartResizeEventHandler使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ChartResizeEventHandler类属于com.ait.lienzo.charts.client.core.resizer包,在下文中一共展示了ChartResizeEventHandler类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: configureChart
import com.ait.lienzo.charts.client.core.resizer.ChartResizeEventHandler; //导入依赖的package包/类
protected void configureChart(C chart) {
chart.setWidth(width);
chart.setHeight(height);
chart.setMarginLeft(marginLeft);
chart.setMarginRight(marginRight);
chart.setMarginTop(marginTop);
chart.setMarginBottom(marginBottom);
chart.setFontFamily(fontFamily);
chart.setFontStyle(fontStyle);
chart.setFontSize(fontSize);
chart.setShowTitle(true); // TODO: Bug in Lienzo charting -> If title not visible -> javascript error (nullpointer)
chart.setResizable(resizeEnabled);
if (resizeEnabled) {
chart.addChartResizeEventHandler(new ChartResizeEventHandler() {
public void onChartResize(ChartResizeEvent event) {
resizePanel((int) event.getWidth(), (int) event.getHeight());
}
});
}
chart.draw();
// Create the Chart using animations.
chart.init(AnimationTweener.LINEAR, ANIMATION_DURATION);
}
示例2: addChartResizeEventHandler
import com.ait.lienzo.charts.client.core.resizer.ChartResizeEventHandler; //导入依赖的package包/类
public HandlerRegistration addChartResizeEventHandler(ChartResizeEventHandler handler)
{
return addEnsureHandler(ChartResizeEvent.TYPE, handler);
}