/** * Override super class to prepare the int height. */ public void setHeight(String h) { if (Objects.equals(h, getHeight())) { return; } _intHeight = stringToInt(h); super.setHeight0(h); //ZK-2895: call the method which do not check hflex smartDrawChart(); }
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; } }