當前位置: 首頁>>代碼示例>>Java>>正文


Java GWT.create方法代碼示例

本文整理匯總了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));
    }
}
 
開發者ID:YoungDigitalPlanet,項目名稱:empiria.player,代碼行數:19,代碼來源:DrawingModelProviderGWTTestCase.java

示例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);
}
 
開發者ID:proarc,項目名稱:proarc,代碼行數:27,代碼來源:DigitalObjectDataSource.java

示例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());
}
 
開發者ID:RISCOSS,項目名稱:riscoss-corporate,代碼行數:26,代碼來源:RiskAnalysisResults.java

示例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;
}
 
開發者ID:reinert,項目名稱:requestor,代碼行數:27,代碼來源:UriBuilderImpl.java

示例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 );
}
 
開發者ID:ltearno,項目名稱:hexa.tools,代碼行數:19,代碼來源:JQuery.java

示例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;
}
 
開發者ID:phansson,項目名稱:vaadin-clickabletextrenderer-v8,代碼行數:8,代碼來源:AbstractClickableTextRenderer.java

示例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);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:10,代碼來源:UniTimeFrameDialog.java

示例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());
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:8,代碼來源:PageLabel.java

示例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);
}
 
開發者ID:mvp4g,項目名稱:mvp4g2-examples,代碼行數:10,代碼來源:TextField.java

示例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;
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:8,代碼來源:CubaClickableTextRenderer.java

示例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;
}
 
開發者ID:cuba-platform,項目名稱:cuba,代碼行數:8,代碼來源:CubaProgressBarRenderer.java

示例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();
	}
 
開發者ID:ls1intum,項目名稱:MIBO-IDE,代碼行數:15,代碼來源:MainController.java

示例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;
}
 
開發者ID:proarc,項目名稱:proarc,代碼行數:14,代碼來源:DigitalObjectDataSource.java

示例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;
}
 
開發者ID:ManfredTremmel,項目名稱:gwt-bean-validators-example,代碼行數:40,代碼來源:MyNavigationStructure.java


注:本文中的com.google.gwt.core.shared.GWT.create方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。