Package io.mateu.mdd.vaadin.util
Class VaadinHelper
- java.lang.Object
-
- io.mateu.mdd.vaadin.util.VaadinHelper
-
public class VaadinHelper extends Object
-
-
Constructor Summary
Constructors Constructor Description VaadinHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidchoose(String caption, Set possibleValues, Consumer onOk, Runnable onClose)static voidconfirm(String msg, Runnable onOk)static voidfill(EditorViewComponent evc, String caption, Constructor c, Consumer onOk, Runnable onClose)static voidfill(String caption, Constructor c, Consumer onOk, Runnable onClose)static <K,V>
voidgetPair(String caption, Class<K> keyType, Class<V> valueType, BiConsumer<K,V> f)static <T> voidgetValue(String caption, Class<T> type, Consumer<T> f)static URLlistToExcel(Collection list)static URLlistToExcel(Collection list, List<FieldInterfaced> colFields)static URLlistToPdf(String title, Collection list, List<FieldInterfaced> colFields)static URLlistToPdf(Collection list)static ObjectlistViewComponentToExcel(ListViewComponent listViewComponent, Object filters)static ObjectlistViewComponentToPdf(ListViewComponent listViewComponent, Object filters)static URLqueryToExcel(javax.persistence.Query query)static URLqueryToPdf(javax.persistence.Query query)static voidsaveOrDiscard(String msg, EditorViewComponent editor, Runnable afterSave)static URLviewToExcel(io.mateu.mdd.shared.interfaces.RpcView view, Object filters, List<com.vaadin.data.provider.QuerySortOrder> sortOrders)static URLviewToPdf(io.mateu.mdd.shared.interfaces.RpcView view, Object filters, List<com.vaadin.data.provider.QuerySortOrder> sortOrders)static FilewriteExcel(Collection data, List<FieldInterfaced> colFields)
-
-
-
Method Detail
-
choose
public static void choose(String caption, Set possibleValues, Consumer onOk, Runnable onClose)
-
getPair
public static <K,V> void getPair(String caption, Class<K> keyType, Class<V> valueType, BiConsumer<K,V> f)
-
fill
public static void fill(String caption, Constructor c, Consumer onOk, Runnable onClose)
-
fill
public static void fill(EditorViewComponent evc, String caption, Constructor c, Consumer onOk, Runnable onClose)
-
viewToExcel
public static URL viewToExcel(io.mateu.mdd.shared.interfaces.RpcView view, Object filters, List<com.vaadin.data.provider.QuerySortOrder> sortOrders) throws Throwable
- Throws:
Throwable
-
listViewComponentToExcel
public static Object listViewComponentToExcel(ListViewComponent listViewComponent, Object filters) throws Throwable
- Throws:
Throwable
-
viewToPdf
public static URL viewToPdf(io.mateu.mdd.shared.interfaces.RpcView view, Object filters, List<com.vaadin.data.provider.QuerySortOrder> sortOrders) throws Throwable
- Throws:
Throwable
-
listViewComponentToPdf
public static Object listViewComponentToPdf(ListViewComponent listViewComponent, Object filters) throws Throwable
- Throws:
Throwable
-
queryToPdf
public static URL queryToPdf(javax.persistence.Query query) throws Throwable
- Throws:
Throwable
-
listToPdf
public static URL listToPdf(Collection list) throws Throwable
- Throws:
Throwable
-
listToPdf
public static URL listToPdf(String title, Collection list, List<FieldInterfaced> colFields) throws Throwable
- Throws:
Throwable
-
queryToExcel
public static URL queryToExcel(javax.persistence.Query query) throws Throwable
- Throws:
Throwable
-
listToExcel
public static URL listToExcel(Collection list) throws Throwable
- Throws:
Throwable
-
listToExcel
public static URL listToExcel(Collection list, List<FieldInterfaced> colFields) throws Throwable
- Throws:
Throwable
-
writeExcel
public static File writeExcel(Collection data, List<FieldInterfaced> colFields) throws IOException, org.apache.poi.openxml4j.exceptions.InvalidFormatException
- Throws:
IOExceptionorg.apache.poi.openxml4j.exceptions.InvalidFormatException
-
saveOrDiscard
public static void saveOrDiscard(String msg, EditorViewComponent editor, Runnable afterSave)
-
-