private void doSmartDraw() { if (Strings.isBlank(getType())) throw new UiException("chart must specify type (pie, bar, line, ...)"); if (_model == null) { _model = createDefaultModel(); } if (Strings.isBlank(getWidth())) throw new UiException("chart must specify width"); if (Strings.isBlank(getHeight())) throw new UiException("chart must specify height"); try { final AImage image = new AImage("chart" + new Date().getTime(), getEngine().drawChart(Chart.this)); setContent(image); } catch (java.io.IOException ex) { throw UiException.Aide.wrap(ex); } finally { _smartDrawChart = false; } }