本文整理匯總了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;
}
示例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;
}
示例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();
}
示例4: getPlayerGinjector
import com.google.gwt.core.client.GWT; //導入方法依賴的package包/類
public static PlayerGinjector getPlayerGinjector() {
if (playerGinjector == null) {
playerGinjector = GWT.create(PlayerGinjector.class);
}
return playerGinjector;
}
示例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;
}
示例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()));
}
示例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);
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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);
}
示例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)));
}
示例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);
}
示例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;
}