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


Java Frame类代码示例

本文整理汇总了Java中com.google.gwt.user.client.ui.Frame的典型用法代码示例。如果您正苦于以下问题:Java Frame类的具体用法?Java Frame怎么用?Java Frame使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: createFrame

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
private Frame createFrame() {
	final Frame frame = new Frame(DEFAULT_TEMPLATE_PATH);
	frame.getElement().setId(DEFAULT_FRAME_NAME);
	frame.setTitle(UIMessages.INSTANCE.previewTitle());
	frame.setWidth("500px");
	frame.setHeight("500px");
	frame.getElement().getStyle().setBackgroundColor("gray");

	frame.setVisible(true);
	RootPanel.get().add(frame);

	frame.addLoadHandler(new LoadHandler() {

		@Override
		public void onLoad(LoadEvent event) {
			frame.getElement().getStyle().setBackgroundColor("white");
			zoomPageComboBox.setValue(75);
		}

	});

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

示例2: initUI

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
protected void initUI() {
	BaseModel param = item.getParams();
	String url = (String)param.get("url");
	Frame f = new Frame();
	f.setSize("100%", "100%");
	ContentPanel cp = new ContentPanel();
	cp.setHeaderVisible(false);
	cp.setLayout(new FitLayout());
	cp.add(f);
	ToolBar bottom = new ToolBar();
	CheckBox checkBox = new CheckBox();
	checkBox.setBoxLabel("Don't show this again");
	bottom.add(new AdapterToolItem(checkBox));
	bottom.add(new FillToolItem());
	bottom.add(new CloseTextToolItem(this));
	cp.setBottomComponent(bottom);
	add(cp);
	layout();
}
 
开发者ID:afbytes,项目名称:OneCMDBwithMaven,代码行数:20,代码来源:RegistrationWindow.java

示例3: 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);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:Administration.java

示例4: HTMLPreview

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
/**
 * HTMLPreview
 */
public HTMLPreview() {
	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", "yes");

	// Commented because on IE show clear if allowtransparency=true
	DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");

	iframe.setStyleName("okm-Iframe");
	iframe.addStyleName("okm-EnableSelect");

	initWidget(iframe);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:HTMLPreview.java

示例5: MailPreview

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
/**
 * MailPreview
 */
public MailPreview() {
	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", "yes");

	// Commented because on IE show clear if allowtransparency=true
	DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");

	iframe.setStyleName("okm-Iframe");
	iframe.addStyleName("okm-EnableSelect");

	initWidget(iframe);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:MailPreview.java

示例6: SyntaxHighlighterPreview

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
/**
 * HTMLPreview
 */
public SyntaxHighlighterPreview() {
	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", "yes");

	// Commented because on IE show clear if allowtransparency=true
	DOM.setElementProperty(iframe.getElement(), "allowtransparency", "false");

	iframe.setStyleName("okm-Iframe");
	iframe.addStyleName("okm-EnableSelect");

	initWidget(iframe);
}
 
开发者ID:openkm,项目名称:document-management-system,代码行数:20,代码来源:SyntaxHighlighterPreview.java

示例7: DefaultPanel

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
public DefaultPanel(final String id){
		setModal(true);
		setSize("800", "800");
//		setBorders(hidden);
//		setBodyStyle("border:none");
		setHeadingText("datax配置工具");
		
		FramedPanel fp=new FramedPanel();
		fp.setHeaderVisible(false);
		fp.setButtonAlign(BoxLayoutPack.CENTER);
		
		Date d = new Date();
		Frame frame = new Frame("lingoes.html?="+d.getTime());
		frame.setStylePrimaryName("lingoes");
		frame.getElement().getStyle().setProperty("border", "none");
		fp.add(frame);
		
		add(fp,new MarginData(5));
	}
 
开发者ID:ctripcorp,项目名称:dataworks-zeus,代码行数:20,代码来源:DefaultPanel.java

示例8: ViewServletPopup

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
public ViewServletPopup(String title, String url) {
  super();
  setTitle(title);
  
  // so we can play with the dimensions...
  int innerWidth = Window.getClientWidth()*2 / 3;
  int innerHeight = Window.getClientHeight()*2 /3;
  
  Frame frame = new Frame(url);
  frame.addStyleName("uploadFrame");
  frame.setPixelSize(innerWidth - 30,innerHeight);

  FlowPanel panel = new FlowPanel();
  panel.setPixelSize(innerWidth+6,innerHeight+30);
  
  ClosePopupButton closeButton = new ClosePopupButton(this);
  closeButton.addStyleName("uploadCloseButton");
  panel.add(closeButton);
  panel.add(frame);
  setWidget(panel);
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:22,代码来源:ViewServletPopup.java

示例9: BinaryPopup

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
public BinaryPopup(String url, boolean larger) {
  super();
  setTitle("Binary");
  
  int width = Window.getClientWidth() / 2;
  int height = Window.getClientHeight() / 2;
  
  if(larger) {
    width = Window.getClientWidth() * 4 / 5;
    height = Window.getClientHeight() * 4 / 5;
  }
  
  Frame frame = new Frame(url);
  frame.setPixelSize(width, height); 

  FlowPanel panel = new FlowPanel();
  panel.setStylePrimaryName(UIConsts.VERTICAL_FLOW_PANEL_STYLENAME);
  panel.setPixelSize(width+6, height+30);
  panel.add(new SimplePanel(new ClosePopupButton(this)));       
  panel.add(frame);      
  setWidget(panel);
}
 
开发者ID:opendatakit,项目名称:aggregate,代码行数:23,代码来源:BinaryPopup.java

示例10: GreetingPartViewImpl

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
public GreetingPartViewImpl() {
  frame = new Frame();
  frame.setWidth("100%");
  frame.setHeight("100%");
  frame.getElement().getStyle().setBorderStyle(Style.BorderStyle.NONE);
  frame.getElement().getStyle().setVisibility(Style.Visibility.HIDDEN);

  frame.getElement().setAttribute("id", "greetingFrame");
  frame.getElement().setAttribute("tabindex", "0");

  setContentWidget(frame);

  frame.addLoadHandler(
      event -> frame.getElement().getStyle().setVisibility(Style.Visibility.VISIBLE));

  handleFrameEvents(frame.getElement());
}
 
开发者ID:eclipse,项目名称:che,代码行数:18,代码来源:GreetingPartViewImpl.java

示例11: 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");
    }
}
 
开发者ID:lsst,项目名称:firefly,代码行数:32,代码来源:GwtUtil.java

示例12: 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);
}
 
开发者ID:marat-gainullin,项目名称:platypus-js,代码行数:27,代码来源:AppClient.java

示例13: showHelp

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
/**
 * Shows the help dialogue.
 */
private void showHelp() {
	try {
		final DialogBox helpDialog = new DialogBox(true);
		helpDialog.setGlassEnabled(true);

		//Renders "help.html" in an iframe.
		Frame frame = new Frame("Help.html"); 
		frame.setWidth(CONSTANTS.HelpDialogWidth()); 
		frame.setHeight(CONSTANTS.HelpDialogWidth()); 
		frame.getElement().getStyle().setBorderWidth(0, Unit.PX);
		helpDialog.setWidget(frame);
		
		helpDialog.center();
		
		helpDialog.show();
	} catch (Exception exc) {
		logManager.logError(ERROR_SHOWING_HELP_DIALOG, "Error on trying to display the help dialogue");
		exc.printStackTrace();
	}
}
 
开发者ID:PRImA-Research-Lab,项目名称:prima-aletheia-web-emop,代码行数:24,代码来源:WebLayoutEditor.java

示例14: 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);
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt2,代码行数:21,代码来源:DefaultPrintRequestHandler.java

示例15: setHelpURL

import com.google.gwt.user.client.ui.Frame; //导入依赖的package包/类
public void setHelpURL(String url) {
	Frame help = new Frame(GWT.getModuleBaseURL()+url);
	help.setHeight(frameHeight);
	help.setWidth(frameWidth);
	layoutPanel.clear();
	layoutPanel.add(closeButton);
	layoutPanel.add(help);
}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:9,代码来源:HelpPanel.java


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