本文整理匯總了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);
}