本文整理汇总了Java中com.google.gwt.user.client.ui.Frame.setUrl方法的典型用法代码示例。如果您正苦于以下问题:Java Frame.setUrl方法的具体用法?Java Frame.setUrl怎么用?Java Frame.setUrl使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.google.gwt.user.client.ui.Frame
的用法示例。
在下文中一共展示了Frame.setUrl方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: Administration
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
* Administration
*/
public Administration() {
iframe = new Frame("about:blank");
DOM.setElementProperty(iframe.getElement(), "frameborder", "0");
DOM.setElementProperty(iframe.getElement(), "marginwidth", "0");
DOM.setElementProperty(iframe.getElement(), "marginheight", "0");
DOM.setElementProperty(iframe.getElement(), "scrolling", "no");
// Commented because on IE show clear if allowtransparency=true
DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");
iframe.setUrl(Main.CONTEXT + "/admin/index.jsp");
iframe.setStyleName("okm-Iframe");
initWidget(iframe);
}
示例2: submitDownloadUrl
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
*
* @param url
* @param checkIntvlInMsec check interval in milliseconds
* @param maxTries
* @param confirmationCallback
*/
public static void submitDownloadUrl(String url, int checkIntvlInMsec, final int maxTries, final Command confirmationCallback) {
if (checkIntvlInMsec > 0 && maxTries > 0 && confirmationCallback != null) {
Frame f = Application.getInstance().getNullFrame();
final String codId = String.valueOf(System.currentTimeMillis());
url += (url.contains("?") ? "&" : "?") + COD_ID + "="+ codId;
f.setUrl(url);
Scheduler.get().scheduleFixedDelay(new Scheduler.RepeatingCommand() {
int tries = 0;
public boolean execute() {
String c = Cookies.getCookie(COD_ID);
tries++;
if ((c != null && c.equals(codId)) || tries > maxTries) {
Cookies.removeCookie(COD_ID, "/");
confirmationCallback.execute();
return false;
} else {
return true;
}
}
}, checkIntvlInMsec);
} else {
showDebugMsg("InvalidArgumentException: submitDownloadUrl");
}
}
示例3: startDownloadRequest
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void startDownloadRequest(String aUrlPrefix, final int aRequestType, Map<String, String> aParams, RequestBuilder.Method aMethod) throws Exception {
final Frame frame = new Frame();
frame.setVisible(false);
frame.addLoadHandler(new LoadHandler() {
@Override
public void onLoad(LoadEvent event) {
Timer timer = new Timer() {
@Override
public void run() {
frame.removeFromParent();
}
};
timer.schedule(2000);
}
});
String query = "";
for (Map.Entry<String, String> ent : aParams.entrySet()) {
query += param(ent.getKey(), ent.getValue()) + "&";
}
query += param(PlatypusHttpRequestParams.TYPE, String.valueOf(aRequestType));
frame.setUrl(apiUrl + aUrlPrefix + "?" + query);
RootPanel.get().add(frame);
}
示例4: createHiddenFrame
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private void createHiddenFrame(PrintFinishedInfo info) {
final Frame frame = new Frame();
frame.setVisible(false);
UrlBuilder builder = new UrlBuilder(info.getUrl());
for (String name : info.getParams().keySet()) {
builder.addParameter(name, info.getParams().get(name));
}
frame.setUrl(builder.toString());
frame.setPixelSize(0, 0);
frame.getElement().getStyle().setPosition(Style.Position.ABSOLUTE);
frame.getElement().getStyle().setBorderWidth(0, Style.Unit.PX);
frame.addLoadHandler(new LoadHandler() {
@Override
public void onLoad(LoadEvent event) {
frame.removeFromParent();
}
});
RootPanel.get().add(frame);
}
示例5: getAdditionalProposalInfo
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override
public void getAdditionalProposalInfo(AsyncCallback<Widget> callback) {
Frame frame = new Frame();
frame.setSize("100%", "100%");
frame.getElement().getStyle().setBorderStyle(Style.BorderStyle.NONE);
frame.getElement().setAttribute("sandbox", ""); // empty value, not null
frame.setUrl(client.getProposalDocUrl(id, sessionId));
callback.onSuccess(frame);
}
示例6: doStart
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void doStart() {
for (TabItem item : advanced.getItems()) {
CIModel model = (CIModel)item.getData("model");
item.removeAll();
Frame f = new Frame();
item.add(f);
f.setUrl(getStartURL(model));
item.layout();
}
}
示例7: onSuccess
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public void onSuccess(String url) {
if (!StringUtils.isEmpty(url)) {
url= GWT.getModuleBaseURL()+url;
Frame f= Application.getInstance().getNullFrame();
f.setUrl(url);
}
}
示例8: inputComplete
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
@Override
protected void inputComplete() {
Frame f= Application.getInstance().getNullFrame();
WebPlot plot= _pv.getPrimaryPlot();
PlotState state= plot.getPlotState();
String url;
if (_dType.getValue().equals("fits")) {
Band band= Band.NO_BAND;
if (_bandSelect!=null) {
band= Band.parse(_bandSelect.getValue());
}
String fitsFile= state.getOriginalFitsFileStr(band)==null || _whichOp.getValue().equals("modified")?
state.getWorkingFitsFileStr(band) :
state.getOriginalFitsFileStr(band);
url= WebUtil.encodeUrl(GWT.getModuleBaseURL()+ "servlet/Download",
new Param("file", fitsFile),
new Param("return", makeFileName(state,band)),
new Param("log", "true"));
if (url!=null) f.setUrl(url);
}
else if (_dType.getValue().equals("region")) {
retrieveRegion(plot);
}
else {
retrievePng(plot);
}
}
示例9: TabWorkspace
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
/**
* TabWorkspace
*/
public TabWorkspace() {
vPanel = new VerticalPanel();
iframe = new Frame("about:blank");
DOM.setElementProperty(iframe.getElement(), "frameborder", "0");
DOM.setElementProperty(iframe.getElement(), "marginwidth", "0");
DOM.setElementProperty(iframe.getElement(), "marginheight", "0");
// Commented because on IE show clear if allowtransparency=true
DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");
DOM.setElementProperty(iframe.getElement(), "scrolling", "auto");
iframe.setUrl(Main.CONTEXT + "/extra/index.jsp");
iframe.setStyleName("okm-Iframe");
vPanel.add(iframe);
vPanel.setCellHorizontalAlignment(iframe, HasAlignment.ALIGN_CENTER);
vPanel.setWidth("100%");
vPanel.setHeight("100%");
// User workspace values
if (GeneralComunicator.getWorkspace() == null) {
timer = new Timer() {
@Override
public void run() {
if (GeneralComunicator.getWorkspace() == null) {
firstTimeLoadingWorkspace();
} else {
init();
}
}
};
firstTimeLoadingWorkspace();
} else {
init();
}
initWidget(vPanel);
}
示例10: onRender
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
@Override
protected void onRender(Element parent, int index) {
super.onRender(parent, index);
// Handle parameters...
BaseModel param = item.getParams();
String url = (String)param.get("url");
String replacedURL = ExpressionHandler.replace(url);
String newWindow = param.get("newWindow");
if ("true".equalsIgnoreCase(newWindow)) {
String newWindowName = param.get("newWindowName");
if (newWindowName == null) {
newWindowName = "OneCMDB_Window";
}
String newWindowFeatures = param.get("newWindowFeatures");
if (newWindowFeatures == null) {
newWindowFeatures = "";
}
newWindowName = newWindowName.replace(" ", "_");
com.google.gwt.user.client.Window.open(replacedURL, newWindowName, "");
if (getParent() instanceof Window) {
((Window)getParent()).close();
}
return;
}
Frame f = new Frame();
f.setUrl(replacedURL);
f.setSize("100%", "100%");
ContentPanel cp = new ContentPanel();
cp.setHeaderVisible(false);
cp.setLayout(new FitLayout());
cp.add(f);
ToolBar bottom = new ToolBar();
bottom.add(new FillToolItem());
bottom.add(new CloseTextToolItem(this));
cp.setBottomComponent(bottom);
add(cp);
layout();
}
示例11: getZipFile
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
public static void getZipFile(String url) {
Frame f= Application.getInstance().getNullFrame();
f.setUrl(url);
}
示例12: sendSignal
import com.google.gwt.user.client.ui.Frame; //导入方法依赖的package包/类
private static void sendSignal(String url) {
Frame frame = new Frame();
frame.setVisible(false);
Document.get().getBody().appendChild(frame.getElement());
frame.setUrl(url);
}