package org.gcube.portlets.user.geoportaldataentry.client.ui; import org.gcube.portlets.user.geoportaldataentry.client.ui.form.GeonaDataEntryMainForm; import org.gcube.portlets.user.geoportaldataentry.client.ui.utils.LoaderIcon; import com.google.gwt.core.client.GWT; import com.google.gwt.event.shared.HandlerManager; import com.google.gwt.uibinder.client.UiBinder; import com.google.gwt.uibinder.client.UiField; import com.google.gwt.user.client.ui.Composite; import com.google.gwt.user.client.ui.HTMLPanel; import com.google.gwt.user.client.ui.Widget; /** * The Class GeonaMainPanel. * * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) * * Oct 13, 2020 */ public class GeonaMainPanel extends Composite { /** The geona main form panel. */ @UiField HTMLPanel geonaMainFormPanel; /** The loader. */ @UiField LoaderIcon loader; @UiField GeonaNavigationBar geonaNavigationBar; private HandlerManager appManagerBus; /** The ui binder. */ private static GeonaMainPanelUiBinder uiBinder = GWT.create(GeonaMainPanelUiBinder.class); /** * The Interface GeonaMainPanelUiBinder. * * @author Francesco Mangiacrapa at ISTI-CNR (francesco.mangiacrapa@isti.cnr.it) * * Oct 13, 2020 */ interface GeonaMainPanelUiBinder extends UiBinder { } /** * Instantiates a new geona main panel. * @param appManagerBus */ public GeonaMainPanel(HandlerManager appManagerBus) { initWidget(uiBinder.createAndBindUi(this)); this.appManagerBus = appManagerBus; geonaNavigationBar.setAppManagerBus(appManagerBus); } /** * Adds the form panel. * * @param formPanel the form panel */ public void addFormPanel(GeonaDataEntryMainForm formPanel) { geonaMainFormPanel.add(formPanel); } /** * Sets the loader visible. * * @param txtHTML the txt HTML * @param visible the visible */ public void setLoaderVisible(String txtHTML, boolean visible){ loader.setText(txtHTML); loader.setVisible(visible); } }