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


Java Window.setHeight方法代码示例

本文整理汇总了Java中com.smartgwt.client.widgets.Window.setHeight方法的典型用法代码示例。如果您正苦于以下问题:Java Window.setHeight方法的具体用法?Java Window.setHeight怎么用?Java Window.setHeight使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.smartgwt.client.widgets.Window的用法示例。


在下文中一共展示了Window.setHeight方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildWindow

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
private Window buildWindow() {
    
    Window window = new Window();
    window.setTitle("About OSWf Simulator");
    window.setWidth(400);
    window.setHeight(225);
    window.setIsModal(true);
    window.setShowModalMask(true);
    window.centerInPage();

    window.setShowMinimizeButton(false);
    window.setShowResizer(false);
    window.setShowStatusBar(true);
    window.setShowMaximizeButton(false);
    window.setCanDragResize(true);  

    return window;
}
 
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:19,代码来源:AboutBoxView.java

示例2: createFullImageWindow

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
private Window createFullImageWindow(Canvas content) {
    final Window window = new Window();
    window.setWidth(Page.getWidth() - 200);
    window.setHeight(Page.getHeight() - 40);
    window.setAutoCenter(true);
    window.setMaximized(true);
    window.setCanDragResize(true);
    window.setCanDragReposition(true);
    window.setIsModal(true);
    window.setDismissOnEscape(true);
    window.setDismissOnOutsideClick(true);
    window.setKeepInParentRect(true);
    window.setShowMaximizeButton(true);
    window.setShowMinimizeButton(false);

    window.setModalMaskOpacity(10);
    window.setShowModalMask(true);

    window.setShowResizer(true);
    window.setTitle(i18n.DigitalObjectPreview_Window_Title());
    window.setBodyColor(BACKGROUND_COLOR);
    window.setCanFocus(true);
    window.addItem(content);

    window.setHeaderControls(HeaderControls.HEADER_ICON, HeaderControls.HEADER_LABEL,
            getWindowZoomer(), HeaderControls.MAXIMIZE_BUTTON, HeaderControls.CLOSE_BUTTON);

    window.addCloseClickHandler(new CloseClickHandler() {

        @Override
        public void onCloseClick(CloseClickEvent event) {
            event.cancel();
            window.close();
            onWindowClose();
        }
    });

    return window;
}
 
开发者ID:proarc,项目名称:proarc,代码行数:40,代码来源:DigitalObjectPreview.java

示例3: showAlert

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
public static void showAlert() {
    Window w = new Window();
    w.setWidth(525);
    w.setHeight(275);
    w.setIsModal(true);
    w.setShowModalMask(true);
    w.setAutoCenter(true);
    w.show();
    HTMLPane pane = new HTMLPane();
    pane.setContents(matrixCollectionDisplay.getRichText());
    w.addItem(pane);
    w.setTitle(matrixCollectionDisplay.getTitle());
}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:14,代码来源:MatrixCollectionCRSDisplay.java

示例4: showAlert

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
public static void showAlert() {
    Window w = new Window();
    w.setWidth(525);
    w.setHeight(275);
    w.setIsModal(true);
    w.setShowModalMask(true);
    w.setAutoCenter(true);
    w.show();
    HTMLPane pane = new HTMLPane();
    pane.setContents(objectCollectionDisplay.getRichText());
    w.addItem(pane);
    w.setTitle(objectCollectionDisplay.getTitle());
}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:14,代码来源:ObjectCollectionCRSDisplay.java

示例5: createWindow

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
private Window createWindow() {
	VLayout layout = new VLayout(5);
	layout.setLayoutAlign(Alignment.CENTER);
	layout.setAlign(Alignment.CENTER);
	layout.setWidth100();
	Label label = new Label(messages.searchControllerSearchingMessage());
	label.setWidth100();
	label.setHeight(30);
	label.setAlign(Alignment.CENTER);
	layout.addMember(label);

	HTMLPane img = new HTMLPane();
	img.setLayoutAlign(Alignment.CENTER);
	img.setAlign(Alignment.CENTER);
	img.setWidth(20);
	img.setHeight(20);
	img.setOverflow(Overflow.HIDDEN);
	img.setContents("<img src=\"" + Geomajas.getIsomorphicDir()
			+ "/geomajas/ajax-loader.gif\" width=\"18\" height=\"18\" />");
	layout.addMember(img);
	Window w = new DockableWindow();
	w.setTitle(messages.searchControllerSearchingTitle());
	w.setAlign(Alignment.CENTER);
	w.setPadding(5);
	w.setHeight(100);
	w.setWidth(300);
	w.addItem(layout);
	w.setShowMinimizeButton(false);
	w.setShowCloseButton(false);
	w.setKeepInParentRect(true);
	w.setAutoCenter(true);
	return w;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:34,代码来源:SearchController.java

示例6: createWindow

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
private Window createWindow(String subtitle) {
	Window w = new Window();
	w.setWidth(windowWidth);
	w.setHeight(windowHeight);
	w.setTitle(I18nProvider.getAttribute().getAttributeWindowTitle(subtitle));
	w.setCanDragReposition(true);
	w.setCanDragResize(true);
	w.setAutoCenter(true);
	w.setKeepInParentRect(true);
	return w;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:12,代码来源:UrlFeatureDetailWidgetBuilder.java

示例7: keepWindowInScreen

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
/**
 * Try to force a window to stay within the screen bounds.
 *
 * @param window window to affect
 */
public static void keepWindowInScreen(Window window) {
	window.setKeepInParentRect(true);
	if (null != window.getHeightAsString()) {
		int screenHeight = com.google.gwt.user.client.Window.getClientHeight();
		int windowHeight = window.getViewportHeight();
		window.setMaxHeight(screenHeight - WidgetLayout.windowOffset * 2);
		if (windowHeight + window.getAbsoluteTop() > screenHeight) {
			int top = screenHeight - windowHeight;
			if (top >= 0) {
				window.setPageTop(top);
			} else {
				window.setHeight(screenHeight - WidgetLayout.windowOffset);
				window.setPageTop(WidgetLayout.windowOffset);
			}
		}
	}
	if (null != window.getWidthAsString()) {
		int screenWidth = com.google.gwt.user.client.Window.getClientWidth();
		int windowWidth = window.getViewportWidth();
		window.setMaxWidth(screenWidth - WidgetLayout.windowOffset * 2);
		if (windowWidth + window.getAbsoluteLeft() > screenWidth) {
			int left = screenWidth - windowWidth;
			if (left >= 0) {
				window.setPageLeft(left);
			} else {
				window.setWidth(screenWidth - WidgetLayout.windowOffset);
				window.setPageLeft(WidgetLayout.windowOffset);
			}
		}
	}
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:37,代码来源:WidgetLayout.java

示例8: createInformationWindow

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
private void createInformationWindow() {
	informationWindow = new Window();
	informationWindow.setTitle(LegendEntryTimeSeries.this.getTimeSeries().getTimeSeriesLabel());
	informationWindow.setWidth(450);
	informationWindow.setHeight(500);
	informationWindow.setShowMinimizeButton(false);
	informationWindow.centerInPage();
	HTMLPane htmlPane = new HTMLPane();
	htmlPane.setContentsURL(LegendEntryTimeSeries.this
			.getTimeSeries().getMetadataUrl());
	htmlPane.setContentsType(ContentsType.PAGE);
	informationWindow.addItem(htmlPane);
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:14,代码来源:LegendEntryTimeSeries.java

示例9: onClick

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
public void onClick(MenuItemClickEvent event) {
	VLayout layout = new VLayout();
	layout.setPadding(WidgetLayout.marginLarge);
	Img logo = new Img(WidgetLayout.aboutGeomajasLogo);
	layout.addMember(logo);
	HTMLFlow flow = new HTMLFlow("<h2>Geomajas " + Geomajas.getVersion() + "</h2>" +
			"<p>" + MESSAGES.aboutCopyRight() + "</p>" + "<p>" + MESSAGES.aboutVisit()
			+ ": <a href='http://www.geomajas.org/'>http://www.geomajas.org/</a><br />"
			+ MESSAGES.sourceUrl() + ":  <a href='https://github.com/geomajas/geomajas-project-client-gwt'>" +
			"https://github.com/geomajas/geomajas-project-client-gwt</a> </p>");



	HTMLFlow flowSmartgwt = new HTMLFlow("<h2>SmartGWT " + Version.getVersion()  +
			" " + Version.getSCVersionNumber() + "</h2>");

	layout.addMember(flow);
	layout.addMember(flowSmartgwt);

	final HTMLFlow copyrightWidget = new HTMLFlow("Copyright info");
	layout.addMember(copyrightWidget);
	GwtCommand commandRequest = new GwtCommand(CopyrightRequest.COMMAND);
	commandRequest.setCommandRequest(new EmptyCommandRequest());
	GwtCommandDispatcher.getInstance().execute(commandRequest, new AbstractCommandCallback<CopyrightResponse>() {

		public void execute(CopyrightResponse response) {
			Collection<CopyrightInfo> copyrights = response.getCopyrights();
			StringBuilder sb = new StringBuilder("<h2>");
			sb.append(MESSAGES.copyrightListTitle());
			sb.append("</h2><ul>");
			for (CopyrightInfo copyright : copyrights) {
				sb.append("<li>");
				sb.append(copyright.getKey());
				sb.append(" : ");
				sb.append(MESSAGES.licensedAs());
				sb.append(" ");
				sb.append(copyright.getCopyright());
				sb.append(" : <a target=\"_blank\" href=\"");
				sb.append(copyright.getLicenseUrl());
				sb.append("\">");
				sb.append(copyright.getLicenseName());
				sb.append("</a>");
				if (null != copyright.getSourceUrl()) {
					sb.append(" ");
					sb.append(MESSAGES.sourceUrl());
					sb.append(" : ");
					sb.append(" <a target=\"_blank\" href=\"");
					sb.append(copyright.getSourceUrl());
					sb.append("\">");
					sb.append(copyright.getSourceUrl());
					sb.append("</a>");
				}
				sb.append("</li>");
			}
			sb.append("</ul>");
			copyrightWidget.setContents(sb.toString());
		}
	});



	Window window = new Window();
	window.setHeaderIcon(WidgetLayout.iconGeomajas);
	window.setTitle(MESSAGES.aboutMenuTitle());
	window.setWidth(WidgetLayout.aboutGeomajasWidth);
	window.setHeight(WidgetLayout.aboutGeomajasHeight);
	window.setAutoCenter(true);
	window.setPadding(WidgetLayout.marginLarge);
	window.addItem(layout);
	window.draw();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:72,代码来源:AboutAction.java

示例10: showFiles

import com.smartgwt.client.widgets.Window; //导入方法依赖的package包/类
private void showFiles(Map<String, String> fileContents) {
	Window sourceWindow = new Window();
	sourceWindow.setTitle(MESSAGES.generalSourceTitle());
	sourceWindow.setHeaderIcon(WidgetLayout.iconGeomajas, 16, 16);
	sourceWindow.setKeepInParentRect(true);
	sourceWindow.setWidth(640);
	sourceWindow.setHeight(480);
	sourceWindow.setTop(100);
	sourceWindow.setLeft(100);
	sourceWindow.setMembersMargin(5);
	sourceWindow.setCanDragReposition(true);
	sourceWindow.setCanDragResize(true);

	TabSet tabs = new TabSet();
	tabs.setTabBarPosition(Side.TOP);
	tabs.setWidth100();
	tabs.setHeight100();

	addSourceTab(tabs, fileContents.get(getSourceFileName()));

	for (Entry<String, String> entry : fileContents.entrySet()) {
		if (!entry.getKey().equals(getSourceFileName())) {
			VLayout resourceLayout = new VLayout();
			HTMLPane tabPane = new HTMLPane();
			tabPane.setWidth100();
			tabPane.setHeight100();
			tabPane.setContents("<pre style='color:#000000;'>" + XmlParser.parseXML(entry.getValue()) + "</pre>");
			tabPane.setContentsType(ContentsType.PAGE);

			Label resourceLabel = new Label(MESSAGES.generalFile() + ": <b>"
					+ entry.getKey() + "</b>");
			resourceLabel.setHeight(30);
			resourceLabel.setPadding(5);
			resourceLayout.addMember(resourceLabel);

			VLayout paneLayout = new VLayout();
			paneLayout.setBorder("1px solid #C0C0C0");
			paneLayout.addMember(tabPane);

			resourceLayout.addMember(paneLayout);

			String tabTitle = entry.getKey();
			int pos = tabTitle.lastIndexOf('/');
			tabTitle = tabTitle.substring(pos + 1);

			Tab tab = new Tab(tabTitle, "[ISOMORPHIC]/geomajas/example/image/silk/script_go.png");
			tab.setPane(resourceLayout);
			tabs.addTab(tab);
		}
	}

	sourceWindow.addItem(tabs);
	addChild(sourceWindow);
	sourceWindow.show();
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:56,代码来源:SamplePanel.java


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