List of usage examples for com.google.gwt.gdata.client.atom Text newInstance
public static native Text newInstance() ;
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsUpdateMapDemo.java
License:Apache License
/** * Update a map by making use of the updateEntry * method of the Entry class./*from w w w .j a v a2s.com*/ * Set the map's title to an arbitrary string. Here * we prefix the title with 'GWT-Maps-Client' so that * we can identify which maps were updated by this demo. * On success and failure, display a status message. * * @param targetMap The map entry which to update */ private void updateMap(MapEntry targetMap) { showStatus("Updating map...", false); targetMap.setTitle(Text.newInstance()); targetMap.getTitle().setText("GWT-Maps-Client - updated map"); targetMap.updateEntry(new MapEntryCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while updating a map: " + caught.getMessage(), true); } public void onSuccess(MapEntry result) { showStatus("Updated a map.", false); } }); }
From source file:com.google.gwt.gdata.sample.hellogdata.client.MapsUpdateMapFeatureDemo.java
License:Apache License
/** * Update a map feature by making use of the updateEntry * method of the Entry class.//from w w w. j a v a 2 s . c om * Set the feature's title to an arbitrary string. Here * we prefix the title with 'GWT-Maps-Client' so that * we can identify which features were updated by this demo. * On success and failure, display a status message. * * @param targetFeature The feature entry which to update */ private void updateFeature(FeatureEntry targetFeature) { showStatus("Updating map feature...", false); targetFeature.setTitle(Text.newInstance()); targetFeature.getTitle().setText("GWT-Maps-Client - updated feature"); targetFeature.updateEntry(new FeatureEntryCallback() { public void onFailure(CallErrorException caught) { showStatus("An error occurred while updating a map feature: " + caught.getMessage(), true); } public void onSuccess(FeatureEntry result) { showStatus("Updated a map feature.", false); } }); }