本文整理汇总了Java中com.google.gwt.core.client.GWT.getModuleBaseURL方法的典型用法代码示例。如果您正苦于以下问题:Java GWT.getModuleBaseURL方法的具体用法?Java GWT.getModuleBaseURL怎么用?Java GWT.getModuleBaseURL使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.core.client.GWT
的用法示例。
在下文中一共展示了GWT.getModuleBaseURL方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPreloaderCallback
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public PreloaderCallback getPreloaderCallback () {
final Panel preloaderPanel = new VerticalPanel();
preloaderPanel.setStyleName("gdx-preloader");
final Image logo = new Image(GWT.getModuleBaseURL() + "logo.png");
logo.setStyleName("logo");
preloaderPanel.add(logo);
final Panel meterPanel = new SimplePanel();
meterPanel.setStyleName("gdx-meter");
meterPanel.addStyleName("red");
final InlineHTML meter = new InlineHTML();
final Style meterStyle = meter.getElement().getStyle();
meterStyle.setWidth(0, Unit.PCT);
meterPanel.add(meter);
preloaderPanel.add(meterPanel);
getRootPanel().add(preloaderPanel);
return new PreloaderCallback() {
@Override
public void error (String file) {
System.out.println("error: " + file);
}
@Override
public void update (PreloaderState state) {
meterStyle.setWidth(100f * state.getProgress(), Unit.PCT);
}
};
}
示例2: onLoad
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public void onLoad() {
String swfSrc = getSwfSrc();
String installSrc = GWT.getModuleBaseURL() + "swfobject/expressInstall.swf";
String srcNormalized = PathUtil.normalizePath(src);
loadFlvPlayerThroughSwfobject(elementId, swfSrc, installSrc, srcNormalized, getWidth(), getHeight());
}
示例3: playFromSource
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
private void playFromSource(String src) {
panelMain.clear();
FlowPanel panelEmbed = new FlowPanel();
String htmlId = Document.get().createUniqueId();
panelEmbed.getElement().setId(htmlId);
panelMain.add(panelEmbed);
String installSrc = GWT.getModuleBaseURL() + "swfobject/expressInstall.swf";
String swfSrc = GWT.getModuleBaseURL() + "flashAudioExecutorSimple/flashAudioExecutorSimple.swf";
embedSwf(htmlId, swfSrc, installSrc, src);
}
示例4: getPreloaderCallback
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
public Preloader.PreloaderCallback getPreloaderCallback() {
final VerticalPanel preloaderPanel = new VerticalPanel();
preloaderPanel.setStyleName("gdx-preloader");
preloaderPanel.setHorizontalAlignment(HasHorizontalAlignment.ALIGN_CENTER);
final Image logo = new Image(GWT.getModuleBaseURL() + "logo.gif");
logo.setStyleName("logo");
preloaderPanel.add(logo);
final Panel meterPanel = new SimplePanel();
meterPanel.setStyleName("gdx-meter");
meterPanel.addStyleName("red");
final InlineHTML meter = new InlineHTML();
final Style meterStyle = meter.getElement().getStyle();
meterStyle.setWidth(0, Style.Unit.PCT);
meterPanel.add(meter);
preloaderPanel.add(meterPanel);
getRootPanel().add(preloaderPanel);
return new Preloader.PreloaderCallback() {
@Override
public void error(String file) {
System.out.println("error: " + file);
}
@Override
public void update(Preloader.PreloaderState state) {
meterStyle.setWidth(100f * state.getProgress(), Style.Unit.PCT);
}
};
}
示例5: uploadImage
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
/**
* Main method to validify and upload the app image
*/
private void uploadImage() {
String uploadFilename = imageUpload.getFilename();
if (!uploadFilename.isEmpty()) {
String filename = makeValidFilename(uploadFilename);
// Forge the request URL for gallery servlet
String uploadUrl = GWT.getModuleBaseURL() + ServerLayout.GALLERY_SERVLET +
"/user/" + userId + "/" + filename;
Uploader.getInstance().upload(imageUpload, uploadUrl,
new OdeAsyncCallback<UploadResponse>(MESSAGES.fileUploadError()) {
@Override
public void onSuccess(UploadResponse uploadResponse) {
switch (uploadResponse.getStatus()) {
case SUCCESS:
ErrorReporter.hide();
imageUploadBoxInner.clear();
updateUserImage(gallery.getUserImageURL(userId), imageUploadBoxInner);
break;
case FILE_TOO_LARGE:
// The user can resolve the problem by uploading a smaller file.
ErrorReporter.reportInfo(MESSAGES.fileTooLargeError());
break;
default:
ErrorReporter.reportError(MESSAGES.fileUploadError());
break;
}
}
});
}
}
示例6: getSwfSrc
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
protected String getSwfSrc() {
return GWT.getModuleBaseURL() + "wpaudioplayer/wpaudioplayer.swf";
}
示例7: getSwfSrc
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
@Override
protected String getSwfSrc() {
return GWT.getModuleBaseURL() + "flvplayer/flvplayer.swf";
}
示例8: getFileUrl
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
/**
* Returns the URL for the given project file.
*/
public static String getFileUrl(long projectId, String fileId) {
return GWT.getModuleBaseURL() + getFilePath(projectId, fileId);
}
示例9: uploadImage
import com.google.gwt.core.client.GWT; //导入方法依赖的package包/类
/**
* Main method to validify and upload the app image
*/
private void uploadImage() {
String uploadFilename = upload.getFilename();
if (!uploadFilename.isEmpty()) {
// Grab and validify the filename
final String filename = makeValidFilename(uploadFilename);
// Forge the request URL for gallery servlet
// we used to send the gallery id to the servlet, now the project id as
// the servlet just stores image temporarily before publish
/* String uploadUrl = GWT.getModuleBaseURL() + ServerLayout.GALLERY_SERVLET +
"/apps/" + String.valueOf(app.getGalleryAppId()) + "/"+ filename; */
// send the project id as the id, to store image temporarily until published
String uploadUrl = GWT.getModuleBaseURL() + ServerLayout.GALLERY_SERVLET +
"/apps/" + String.valueOf(app.getProjectId()) + "/"+ filename;
Uploader.getInstance().upload(upload, uploadUrl,
new OdeAsyncCallback<UploadResponse>(MESSAGES.fileUploadError()) {
@Override
public void onSuccess(UploadResponse uploadResponse) {
switch (uploadResponse.getStatus()) {
case SUCCESS:
// Update the app image preview after a success upload
imageUploadBoxInner.clear();
// updateAppImage(app.getCloudImageURL(), imageUploadBoxInner);
updateAppImage(gallery.getProjectImageURL(app.getProjectId()),imageUploadBoxInner);
imageUploaded=true;
ErrorReporter.hide();
break;
case FILE_TOO_LARGE:
// The user can resolve the problem by uploading a smaller file.
ErrorReporter.reportInfo(MESSAGES.fileTooLargeError());
break;
default:
ErrorReporter.reportError(MESSAGES.fileUploadError());
break;
}
}
});
} else {
if (editStatus == NEWAPP) {
Window.alert(MESSAGES.noFileSelected());
}
}
}