static { div.setStyleName("valign-wrapper loader-wrapper"); preLoader.getElement().getStyle().setProperty("margin", "auto"); preLoader.add(new MaterialSpinner("blue")); preLoader.add(new MaterialSpinner("red")); preLoader.add(new MaterialSpinner("yellow")); preLoader.add(new MaterialSpinner("green")); }
public static void showLoading(boolean isShow, Panel con) { if (isShow) { if (!(con instanceof RootPanel)) { div.getElement().getStyle().setProperty("position", "absolute"); } div.setStyleName("valign-wrapper loader-wrapper"); div.add(preLoader); con.add(div); } else { div.removeFromParent(); preLoader.removeFromParent(); } }