xapi.ui.html.X_Html Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xapi-gwt Show documentation
Show all versions of xapi-gwt Show documentation
This module exists solely to package all other gwt modules into a single
uber jar. This makes deploying to non-mavenized targets much easier.
Of course, you would be wise to inherit your dependencies individually;
the uber jar is intended for projects like collide,
which have complex configuration, and adding many jars would be a pain.
The newest version!
package xapi.ui.html;
import xapi.inject.X_Inject;
import xapi.ui.api.StyleService;
import xapi.ui.html.api.HtmlService;
import xapi.ui.html.api.HtmlSnippet;
public class X_Html {
private X_Html() {}
@SuppressWarnings({ "unchecked", "rawtypes" })
public static String toHtml(Class> template, Class extends T> cls, T o, StyleService> context) {
return toSnippet(template, (Class)cls, context).convert(o);
}
public static String toHtml(Class extends T> cls, T o, StyleService> context) {
return toHtml(cls, cls, o, context);
}
public static HtmlSnippet toSnippet(Class extends T> cls, StyleService> context) {
return toSnippet(cls, cls, context);
}
public static HtmlSnippet toSnippet(Class> templateClass, Class extends T> cls, StyleService> context) {
return X_Inject.singleton(HtmlService.class).toSnippet(templateClass, cls, context);
}
public static void injectCss(final Class> cls, StyleService> context) {
X_Inject.singleton(HtmlService.class).injectStyle(cls, context);
}
}