当前位置: 首页>>代码示例>>Java>>正文


Java GWT.create方法代码示例

本文整理汇总了Java中com.google.gwt.core.client.GWT.create方法的典型用法代码示例。如果您正苦于以下问题:Java GWT.create方法的具体用法?Java GWT.create怎么用?Java GWT.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.google.gwt.core.client.GWT的用法示例。


在下文中一共展示了GWT.create方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: load

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
/**
 * TODO: query the programs by users
 * @param userEmail used to filter myPrograms
 */
public static ProgramTree load(final String userEmail) {
	final ProgramTree tree = new ProgramTree();
	ProgramServiceAsync svc = GWT.create(ProgramService.class);
	svc.load(new AsyncCallback<List<Program>>() {

		@Override
		public void onFailure(Throwable caught) {
			logger.info("Load programs failed");
		}

		@Override
		public void onSuccess(List<Program> result) {
			for (Program m : result) {
				if (!m.getDeprecated()) {
					ProgramLeaf node = new ProgramLeaf(m);
					addProgramLeaf(tree, node, userEmail);
					addContextMenu(tree,node);
				}
			}
		}
	});

	return tree;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:29,代码来源:ProgramTreeLoader.java

示例2: load

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
/**
 * TODO: query the programs by users
 *
 * @param userEmail used to filter myDatasets
 */
public static DatasetTree load(final String userEmail) {
	final DatasetTree tree = new DatasetTree();
	DatasetServiceAsync svc = GWT.create(DatasetService.class);
	svc.load(new AsyncCallback<List<Dataset>>() {

		@Override
		public void onFailure(Throwable caught) {
			logger.info("Failed to load data component:" + caught.getMessage());
		}

		@Override
		public void onSuccess(List<Dataset> result) {
			for (Dataset m : result) {
				if (!m.getDeprecated()) {
					DatasetLeaf node = new DatasetLeaf(m);
					addDatasetLeaf(tree, node, userEmail);
					addContextMenu(tree,node);
				}
			}
		}
	});
	return tree;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:29,代码来源:DatasetTreeLoader.java

示例3: initModule

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public void initModule(Element element) {
    uiBinder = GWT.create(MathModuleViewUiBinder.class);
    uiBinder.createAndBindUi(this);

    moduleElement = element;
    styles = styleSocket.getStyles(moduleElement);

    readAttributes(element);
    initStyles(styles);
    initializePanels();
    initializeMathPlayer();
    generateGaps(getBodyGenerator());
    setGapMathStyles();
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:16,代码来源:MathModule.java

示例4: getPlayerGinjector

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public static PlayerGinjector getPlayerGinjector() {
    if (playerGinjector == null) {
        playerGinjector = GWT.create(PlayerGinjector.class);
    }

    return playerGinjector;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:8,代码来源:PlayerGinjectorFactory.java

示例5: create

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public static MenuItem create(final JobLeaf node) {
	Command command = new MenuItemCommand(node) {

		@Override
		public void execute() {
			String id = node.getModule().getJobId();
			boolean y = Window.confirm("Are you sure you want to delete?");
			if (y) {
				JobServiceAsync srv = GWT.create(JobService.class);
				srv.deleteJob(id, new AsyncCallback<Void>() {

					@Override
					public void onFailure(Throwable caught) {
						Window.alert(caught.getMessage());
					}

					@Override
					public void onSuccess(Void result) {
						node.delete();
					}
				});
			}
			this.component.getContextMenu().hide();
		}
	};
	MenuItem item = new MenuItem("Delete", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:29,代码来源:JobDeleteMenu.java

示例6: getHtmlReport

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public HTML getHtmlReport() {
	VectorLayerTemplate template = GWT.create(VectorLayerTemplate.class);
	VectorFeature[] features = getSelectedVectorLayer().getFeatures();
	if (features == null) {
		features = new ArrayList<VectorFeature>()
				.toArray(new VectorFeature[0]);
	}
	return new HTML(template.renderTemplate(UIMessages.INSTANCE,
			getSelectedVectorLayer(), getAttributesValue(features),
			getAttributeNames()));
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:12,代码来源:HtmlReportLayerTool.java

示例7: initialize

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public void initialize() {
	final List<Layer> vectorLayers = new ArrayList<Layer>();

	final LayerTree vectorialLayerTree = GWT.create(LayerTree.class);
	vectorialLayerTree.createTree(vectorLayers, VECTOR_ROOT_NAME);
	vectorialLayerTree.setToolbar(vectorLayerToolBar);
	vectorialLayerTree.setMap(geoMap);
	vectorialLayerTree.setCell(layerManagerWidget.getTreeClickEvent());
	layerManagerWidget.add(LayerManagerWidget.VECTOR_TAB,
			vectorialLayerTree);		
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:12,代码来源:VectorLayerInitializer.java

示例8: create

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public static MenuItem create(final DatasetLeaf node) {

		Command command = new MenuItemCommand(node) {

			@Override
			public void execute() {
				String id = node.getModule().getId();
				boolean y = Window.confirm("Ready to delete " + node.getText() + "?");
				if (y) {
					DatasetServiceAsync svc = GWT.create(DatasetService.class);
					svc.delete(id, new AsyncCallback<Void>() {

						@Override
						public void onFailure(Throwable caught) {
							Window.alert(caught.getMessage());
						}

						@Override
						public void onSuccess(Void result) {
							node.delete();
						}
					});
				}

				this.component.getContextMenu().hide();
			}
		};

		MenuItem item = new MenuItem("Delete", command);
		return item;
	}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:32,代码来源:DatasetDeleteMenu.java

示例9: createPanel

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
private Widget createPanel() {
	final VerticalLayoutContainer vPanel = new VerticalLayoutContainer();
	vPanel.addStyleName(ThemeStyles.get().style().borderBottom());
	final GitHubRepositoryAttributeBeanProperties props = GWT
			.create(GitHubRepositoryAttributeBeanProperties.class);
	repositoryStore = new ListStore<GitHubRepositoryAttributeBean>(props.key());

	final ColumnConfig<GitHubRepositoryAttributeBean, Integer> idCol = new ColumnConfig<GitHubRepositoryAttributeBean, Integer>(
			props.attributeId(), 190, "Id");		
	final ColumnConfig<GitHubRepositoryAttributeBean, String> nameCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
			props.attributeName(), 190, UIMessages.INSTANCE.gitHubColumNameRepo());
	final ColumnConfig<GitHubRepositoryAttributeBean, String> descriptionCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
			props.description(), 200, UIMessages.INSTANCE.gitHubColumDescriptionRepo());
	
	final ColumnConfig<GitHubRepositoryAttributeBean, String> fullNameCol = new ColumnConfig<GitHubRepositoryAttributeBean, String>(
			props.attributeFullName(), 200, "Full Name");

	final List<ColumnConfig<GitHubRepositoryAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubRepositoryAttributeBean, ?>>();
	//columns.add(idCol);
	columns.add(nameCol);
	columns.add(descriptionCol);		
	//columns.add(fullNameCol);

	final ColumnModel<GitHubRepositoryAttributeBean> columModel = new ColumnModel<GitHubRepositoryAttributeBean>(
			columns);

	grid = new Grid<GitHubRepositoryAttributeBean>(
			repositoryStore, columModel);
	//grid.setSelectionModel(new CellSelectionModel<GitHubRepositoryAttributeBean>());
	grid.getColumnModel().getColumn(0).setHideable(false);
	grid.setAllowTextSelection(true);
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);		
	grid.setBorders(false);
	setGridDragable(grid);
	
	vPanel.add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));		

	return vPanel;
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:41,代码来源:GitHubRepositoryListDialog.java

示例10: create

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public static MenuItem create(final ProgramLeaf node) {

		Command command = new MenuItemCommand(node) {

			@Override
			public void execute() {
				String id = node.getModule().getId();
				boolean y = Window.confirm("Are you ready to delete " + node.getText() + "?");
				if (y) {
					ProgramServiceAsync svc = GWT.create(ProgramService.class);
					svc.delete(id, new AsyncCallback<Void>() {

						@Override
						public void onFailure(Throwable caught) {
							Window.alert(caught.getMessage());
						}

						@Override
						public void onSuccess(Void result) {
							node.delete();
						}

					});
				}
				this.component.getContextMenu().hide();
			}
		};

		MenuItem item = new MenuItem("delete", command);
		return item;
	}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:32,代码来源:ProgramDeleteMenu.java

示例11: create

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public static MenuItem create(final JobLeaf node) {
	Command command = new MenuItemCommand(node) {

		@Override
		public void execute() {
			String id = node.getModule().getJobId();
			boolean y = Window.confirm("Are you sure you want to join the example task?");
			if (y) {
				JobServiceAsync srv = GWT.create(JobService.class);
				srv.setExampleJobs(id, new AsyncCallback<Void>() {

					@Override
					public void onFailure(Throwable caught) {
						Window.alert(caught.getMessage());
					}

					@Override
					public void onSuccess(Void result) {
						node.delete();
					}
				});
			}
			this.component.getContextMenu().hide();
		}
	};
	MenuItem item = new MenuItem("Join example task", command);
	return item;
}
 
开发者ID:ICT-BDA,项目名称:EasyML,代码行数:29,代码来源:JobAddExampleMenu.java

示例12: initialize

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public void initialize(InlineBodyGeneratorSocket inlineBodyGeneratorSocket) {
    SelectionModuleUiBinder uiBinder = GWT.create(SelectionModuleUiBinder.class);
    uiBinder.createAndBindUi(this);
    gridElementGenerator.setInlineBodyGenerator(inlineBodyGeneratorSocket);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:7,代码来源:SelectionModuleViewImpl.java

示例13: GitHubImportTab

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
public GitHubImportTab() {
	super();
			
	setWidth(350);
	
	userNameField = new TextField();
	userNameField.setTitle(UIMessages.INSTANCE.gitHubUserNameField());
	userNameField.setEmptyText(UIMessages.INSTANCE.gitHubUserNameField());
	userNameField.setWidth(150);

	repositoryField = new TextField();
	repositoryField.setTitle("Repositorio");
	repositoryField.setEmptyText("Introduce repositorio");
	repositoryField.setWidth(150);

	pathField = new TextField();
	pathField.setTitle(UIMessages.INSTANCE.gitHubPathNameField());
	pathField.setEmptyText(UIMessages.INSTANCE.gitHubPathNameField());
	pathField.setWidth(FIELD_WIDTH);

	TextButton repositoryButton = new TextButton("...");		
	TextButton pathButton = new TextButton("...");
	TextButton loadFilesButton = new TextButton(
			UIMessages.INSTANCE.loadFiles());
	
	final HorizontalPanel repositoryPanel = new HorizontalPanel();
	repositoryPanel.add(userNameField);
	repositoryPanel.add(repositoryField);
	repositoryPanel.add(repositoryButton);
	add(repositoryPanel);

	final HorizontalPanel pathPanel = new HorizontalPanel();

	pathPanel.add(pathField);
	pathPanel.add(pathButton);		
	add(pathPanel);		
	add(loadFilesButton);
	
	repositoryButton.addSelectHandler(getRepository());
	pathButton.addSelectHandler(getPath());
	loadFilesButton.addSelectHandler(requestGetFiles());

	addStyleName(ThemeStyles.get().style().borderBottom());
	final GitHubFileListAttributeBeanProperties props = GWT
			.create(GitHubFileListAttributeBeanProperties.class);

	fileStore = new ListStore<GitHubFileListAttributeBean>(
			props.key());

	final ColumnConfig<GitHubFileListAttributeBean, String> nameCol = new ColumnConfig<GitHubFileListAttributeBean, String>(
			props.attributeName(), 330,
			UIMessages.INSTANCE.gitHubColumNameRepo());

	final List<ColumnConfig<GitHubFileListAttributeBean, ?>> columns = new ArrayList<ColumnConfig<GitHubFileListAttributeBean, ?>>();

	columns.add(nameCol);

	final ColumnModel<GitHubFileListAttributeBean> columModel = new ColumnModel<GitHubFileListAttributeBean>(
			columns);
	
	grid = new Grid<GitHubFileListAttributeBean>(fileStore,
			columModel);
	grid.getView().setAutoFill(false);
	grid.setWidth(260);
	grid.getColumnModel().getColumn(0).setHideable(false);
	grid.setAllowTextSelection(true);
	grid.getView().setStripeRows(true);
	grid.getView().setColumnLines(true);
	grid.setBorders(false);
	setGridDragable(grid);				
	add(grid, new VerticalLayoutData(1, 1, new Margins(5, 0, 0, 0)));
	
}
 
开发者ID:geowe,项目名称:sig-seguimiento-vehiculos,代码行数:74,代码来源:GitHubImportTab.java

示例14: gwtSetUp

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
protected void gwtSetUp() throws Exception {
    styleNameConstants = GWT.create(ReportStyleNameConstants.class);
    testObj = new RowStylesAppender(styleNameConstants);
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:6,代码来源:RowStylesAppenderGWTTestCase.java

示例15: parse

import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
private SlideshowPlayerBean parse(String xml) {
    SlideshowJAXBParser jaxbParserFactory = GWT.create(SlideshowJAXBParser.class);
    JAXBParser<SlideshowPlayerBean> jaxbParser = jaxbParserFactory.create();
    SlideshowPlayerBean slideshowPlayer = jaxbParser.parse(xml);
    return slideshowPlayer;
}
 
开发者ID:YoungDigitalPlanet,项目名称:empiria.player,代码行数:7,代码来源:SlideshowJAXBParserGWTTestCase.java


注:本文中的com.google.gwt.core.client.GWT.create方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。