All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.swm.commons.mobile.client.utils.SwmPopupUtilImpl Maven / Gradle / Ivy

There is a newer version: 3.1
Show newest version
package de.swm.commons.mobile.client.utils;

import com.google.gwt.core.client.GWT;
import com.google.gwt.dom.client.Style;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.google.gwt.user.client.ui.*;
import de.swm.commons.mobile.client.SWMMobile;
import de.swm.commons.mobile.client.base.PanelBase;
import de.swm.commons.mobile.client.constants.I18NConstants;
import de.swm.commons.mobile.client.event.FastClickHelper;
import de.swm.commons.mobile.client.theme.SWMMobileImageBundle;
import de.swm.commons.mobile.client.widgets.Button;
import de.swm.commons.mobile.client.widgets.*;
import de.swm.commons.mobile.client.widgets.HorizontalPanel;
import de.swm.commons.mobile.client.widgets.command.CommandPopup;
import de.swm.gwt.client.interfaces.ITypedAction;

import java.util.*;

/**
 * Hilfsklasse um ein popup fenser anzuzeigen.
 *
 * @author wiese.daniel 
* copyright (C) 2012, SWM Services GmbH */ public class SwmPopupUtilImpl implements ISwmPopupUtil { /** * Erstellt ein HTML-Widget, welches Freizeichen zwischen Komponenten erstellt. */ private final SWMMobileImageBundle images = SWMMobile.getTheme().getMGWTImageBundle(); private final I18NConstants appConstants = GWT.create(I18NConstants.class); @Override public void showPopup(String header, String text) { showPopup(false, header, text, null); } @Override public void showPopup(boolean hasCancelButton, String header, String text, final ClickHandler okClickHanlder) { List texts = new ArrayList(); texts.add(text); showPopup(hasCancelButton, header, texts, okClickHanlder, null); } @Override public void showPopup(boolean hasCancelButton, String header, List texts, final ClickHandler okClickHanlder) { showPopup(hasCancelButton, header, texts, okClickHanlder, null); } @Override public void showPopup(boolean hasCancelButton, String header, String text, final ClickHandler okClickHanlder, final ClickHandler cancelClickHanlder) { List texts = new ArrayList(); texts.add(text); showPopup(hasCancelButton, header, texts, appConstants.confirmButton(), appConstants.cancelButton(), okClickHanlder, cancelClickHanlder); } @Override public void showPopup(boolean hasCancelButton, String header, List texts, final ClickHandler okClickHanlder, final ClickHandler cancelClickHanlder) { showPopup(hasCancelButton, header, texts, appConstants.confirmButton(), appConstants.cancelButton(), okClickHanlder, cancelClickHanlder); } @Override public void showPopupYesNo(boolean hasCancelButton, String header, String text, final ClickHandler okClickHanlder, final ClickHandler cancelClickHanlder) { showPopup(hasCancelButton, header, text, appConstants.yesButton(), appConstants.noButton(), okClickHanlder, cancelClickHanlder); } @Override public void showPopup(boolean hasCancelButton, String header, String text, String popupOkText, String popupCancelText, final ClickHandler okClickHanlder, final ClickHandler cancelClickHanlder) { List texts = new ArrayList(); texts.add(text); showPopup(hasCancelButton, header, texts, popupOkText, popupCancelText, okClickHanlder, cancelClickHanlder); } @Override public void showMultiButtonPopup(String header, List texts, List> buttonDesciptors) { List




© 2015 - 2024 Weber Informatics LLC | Privacy Policy