本文整理汇总了Java中com.google.gwt.core.shared.GWT.create方法的典型用法代码示例。如果您正苦于以下问题:Java GWT.create方法的具体用法?Java GWT.create怎么用?Java GWT.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.shared.GWT
的用法示例。
在下文中一共展示了GWT.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testJAXB
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public void testJAXB() {
DrawingModuleJAXBParserFactory jaxbFactory = GWT.create(DrawingModuleJAXBParserFactory.class);
JAXBParser<DrawingBean> jaxbParser = jaxbFactory.create();
DrawingBean drawingBean = jaxbParser.parse(xml);
assertEquals(drawingBean.getId(), ID);
ImageBean imageBean = drawingBean.getImage();
assertEquals(imageBean.getWidth(), WIDTH);
assertEquals(imageBean.getHeight(), HEIGHT);
assertEquals(imageBean.getSrc(), SRC);
List<ColorBean> colorBeans = drawingBean.getPalette().getColors();
int size = colorBeans.size();
assertEquals(3, size);
for (int x = 0; x < size; ++x) {
ColorBean colorBean = colorBeans.get(x);
assertEquals(colorBean.getDescription(), colorNames.get(x));
assertEquals(colorBean.getRgb(), colors.get(x));
}
}
示例2: delete
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public void delete(String[] pids, Map<?,?> options) {
final ClientMessages i18n = GWT.create(ClientMessages.class);
HashMap<String, String> deleteParams = new HashMap<String, String>();
deleteParams.put(DigitalObjectResourceApi.DELETE_PURGE_PARAM,
option(options.get(DigitalObjectResourceApi.DELETE_PURGE_PARAM), Boolean.FALSE.toString()));
deleteParams.put(DigitalObjectResourceApi.DELETE_HIERARCHY_PARAM,
option(options.get(DigitalObjectResourceApi.DELETE_HIERARCHY_PARAM), Boolean.TRUE.toString()));
DSRequest dsRequest = new DSRequest();
dsRequest.setPromptStyle(PromptStyle.DIALOG);
dsRequest.setPrompt(i18n.DeleteAction_Deleting_Msg());
dsRequest.setParams(deleteParams);
Record query = new Record();
query.setAttribute(FIELD_PID, pids);
DigitalObjectDataSource.getInstance().removeData(query, new DSCallback() {
@Override
public void execute(DSResponse response, Object rawData, DSRequest request) {
if (RestConfig.isStatusOk(response)) {
StatusView.getInstance().show(i18n.DeleteAction_Done_Msg());
DigitalObjectDataSource.this.updateCaches(response, request);
SearchDataSource.getInstance().updateCaches(response, request);
RelationDataSource.getInstance().updateCaches(response, request);
}
}
}, dsRequest);
}
示例3: showResults
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public void showResults(JsonRiskAnalysis summary, JSONObject response) {
risksLabel = new Label("Risks");
risksLabel.setStyleName("smallTitle");
goalsLabel = new Label("Goals");
goalsLabel.setStyleName("smallTitle");
this.response = response;
this.summary = summary;
this.jsonArgumentation = response.get("argumentation");
Codec codec = GWT.create( Codec.class );
if( jsonArgumentation != null ) {
argumentation = codec.decode( jsonArgumentation );
}
results = new HashMap<>();
tree.clear();
if (response.get("hresults") != null ) generateTree(tree, response.get("hresults"));
else {
leftPanel.setWidth("0px");
results.put(summary.getTarget(), response.get("results").isArray());
}
setSelectedEntity(summary.getTarget());
}
示例4: matrixParam
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public UriBuilder matrixParam(String name, Object... values) throws IllegalArgumentException {
assertNotNullOrEmpty(name, "Parameter name cannot be null or empty.", false);
assertNotNull(values, "Parameter values cannot be null.");
if (matrixParams == null) {
matrixParams = new HashMap<String, Buckets>();
}
// At least one segment must exist
assertNotNull(segments, "There is no segment added to the URI. " +
"There must be at least one segment added in order to bind matrix parameters");
String segment = segments.get(segments.size() - 1);
Buckets segmentParams = matrixParams.get(segment);
if (segmentParams == null) {
segmentParams = GWT.create(Buckets.class);
matrixParams.put(segment, segmentParams);
}
for (Object value : values) {
segmentParams.add(name, value != null ? value.toString() : null);
}
return this;
}
示例5: ensureScriptsLoaded
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public static void ensureScriptsLoaded()
{
if( bundle != null )
return;
bundle = GWT.create( JQueryBundle.class );
Document doc = Document.get();
ScriptElement sqljs = doc.createScriptElement();
sqljs.setAttribute( "type", "text/javascript" );
sqljs.setInnerText( bundle.JQueryJS().getText() );
doc.getDocumentElement().getFirstChildElement().appendChild( sqljs );
sqljs = doc.createScriptElement();
sqljs.setAttribute( "type", "text/javascript" );
sqljs.setInnerText( bundle.JQueryUIJS().getText() );
doc.getDocumentElement().getFirstChildElement().appendChild( sqljs );
}
示例6: testExtractIdentifiersFromExpression
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
private void testExtractIdentifiersFromExpression(String expression, String... expectedIdentifiers) {
IdentifiersFromExpressionExtractor extractor = GWT.create(IdentifiersFromExpressionExtractor.class);
List<String> identifiers = extractor.extractResponseIdentifiersFromTemplate(expression);
assertEquals(expectedIdentifiers.length, identifiers.size());
for (String expectedIdentifier : expectedIdentifiers) {
assertTrue(identifiers.contains(expectedIdentifier));
}
}
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:11,代码来源:IdentifiersFromExpressionTemplateExtractorGWTTestCase.java
示例7: createWidget
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public InlineHTML createWidget() {
InlineHTML a = GWT.create(InlineHTML.class);
a.addClickHandler(this);
a.setStylePrimaryName("v-link");
return a;
}
示例8: openDialog
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public static void openDialog(String title, String source, String width, String height, boolean noCacheTS) {
if (sDialog == null) {
if (Window.getClientWidth() <= 800)
sDialog = GWT.create(UniTimeFrameDialogDisplay.Mobile.class);
else
sDialog = GWT.create(UniTimeFrameDialogDisplay.class);
}
sDialog.openDialog(title, source, width, height, noCacheTS);
}
示例9: PageLabel
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public PageLabel() {
if (Window.getClientWidth() <= 800)
iDisplay = GWT.create(PageLabelDisplay.Mobile.class);
else
iDisplay = GWT.create(PageLabelDisplay.class);
initWidget(iDisplay.asWidget());
}
示例10: TextField
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public TextField(String label) {
Resources resources = GWT.create(Resources.class);
this.style = resources.style();
this.style.ensureInjected();
createWidget();
setLabel(label);
}
示例11: createWidget
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public InlineHTML createWidget() {
InlineHTML inlineHTML = GWT.create(InlineHTML.class);
inlineHTML.addClickHandler(this);
inlineHTML.setStyleName("v-link");
return inlineHTML;
}
示例12: createWidget
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
public CubaProgressBarWidget createWidget() {
CubaProgressBarWidget progressBar = GWT.create(CubaProgressBarWidget.class);
progressBar.addStyleDependentName("static");
progressBar.setClickThroughEnabled(true);
return progressBar;
}
示例13: MainController
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public MainController(String baseURL) {
// Set up base URL
this.baseURL = baseURL;
// Setup server service
this.miboService = (MiboServiceAsync) GWT.create(MiboService.class);
// Setup view elements
this.initalizeView();
// Initiate the loading process of models and structure
this.loadFactory();
}
示例14: createDeleteOptionsForm
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
public static DynamicForm createDeleteOptionsForm() {
if (!Editor.getInstance().hasPermission("proarc.permission.admin")) {
return null;
}
ClientMessages i18n = GWT.create(ClientMessages.class);
DynamicForm f = new DynamicForm();
BooleanItem opPermanently = new BooleanItem(DigitalObjectResourceApi.DELETE_PURGE_PARAM,
i18n.DigitalObjectDeleteAction_OptionPermanently_Title());
opPermanently.setTooltip(i18n.DigitalObjectDeleteAction_OptionPermanently_Hint());
f.setFields(opPermanently);
f.setAutoHeight();
return f;
}
示例15: buildNavigation
import com.google.gwt.core.shared.GWT; //导入方法依赖的package包/类
@Override
protected final List<NavigationEntryInterface> buildNavigation() {
final List<NavigationEntryInterface> navigationEntries = new ArrayList<>();
final NavigationConstants navigationConstants = GWT.create(NavigationConstants.class);
navigationEntries
.add(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuPostalAddress()),
NameTokens.ADDRESS, null));
navigationEntries.add(new NavigationEntry(
SafeHtmlUtils.fromString(navigationConstants.menuSepa()), NameTokens.SEPA, null));
navigationEntries
.add(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuPhoneNumber()),
NameTokens.PHONE_NUMBER, null));
navigationEntries
.add(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuEmailList()),
NameTokens.EMAIL_LIST, null));
navigationEntries.add(new NavigationEntry(
SafeHtmlUtils.fromString(navigationConstants.menuSettings()), NameTokens.SETTINGS, null));
navigationEntries
.add(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuLogin()),
NameTokens.SECRET, this.loggedOutGatekeeper));
navigationEntries
.add(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuLogout()),
NameTokens.LOGOUT, this.loggedInGatekeeper));
final NavigationEntryFolder testFolder = new NavigationEntryFolder(
SafeHtmlUtils.fromString(navigationConstants.menuTestFolder()), true);
testFolder
.addSubEntry(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuSecret()),
NameTokens.SECRET, this.loggedInGatekeeper));
testFolder
.addSubEntry(new NavigationEntry(SafeHtmlUtils.fromString(navigationConstants.menuPerson()),
NameTokens.PERSON, this.loggedInGatekeeper));
navigationEntries.add(testFolder);
return navigationEntries;
}