Updated LoaderIcon

This commit is contained in:
Francesco Mangiacrapa 2024-02-16 10:15:52 +01:00
parent 16c2e98f90
commit 4829f5b959
1 changed files with 9 additions and 5 deletions

View File

@ -4,11 +4,11 @@
package org.gcube.portlets.widgets.mpformbuilder.client.ui.utils;
import org.gcube.portlets.widgets.mpformbuilder.client.ui.icons.Images;
import com.github.gwtbootstrap.client.ui.Icon;
import com.github.gwtbootstrap.client.ui.constants.IconType;
import com.google.gwt.dom.client.Style.Unit;
import com.google.gwt.user.client.ui.HTML;
import com.google.gwt.user.client.ui.HorizontalPanel;
import com.google.gwt.user.client.ui.Image;
/**
* The Class LoaderIcon.
@ -19,8 +19,10 @@ import com.google.gwt.user.client.ui.Image;
public class LoaderIcon extends HorizontalPanel{
private Image imgLoading = new Image(Images.ICONS.loading());
//private Image imgLoading = new Image(Images.ICONS.loading());
private HTML txtLoading = new HTML("");
private Icon iconSpinner = new Icon(IconType.SPINNER);
/**
* Instantiates a new loader icon.
@ -37,8 +39,10 @@ public class LoaderIcon extends HorizontalPanel{
*/
public LoaderIcon() {
setStyleName("marginTop20");
add(imgLoading);
add(txtLoading);
iconSpinner.setSpin(true);
iconSpinner.getElement().getStyle().setMarginLeft(5, Unit.PX);
add(iconSpinner);
}
/**