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


Java VLayout.setVisible方法代码示例

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


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

示例1: SearchPanel

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
 * The only constructor.
 * 
 * @param mapModel
 *            The map's model. It knows what layers we can search in.
 * @param parent
 *            The map's parent widget. We use this to attach the search layout to.
 */
public SearchPanel(final MapModel mapModel, final Canvas parent) {
	// Set some parameters:
	setTop(TOP_OFFSET);
	setLeft(parent.getWidth() - BTN_WIDTH - 8);
	setWidth(BTN_WIDTH);
	setHeight(BTN_WIDTH + BTN_WIDTH + 8);
	setStyleName("search_panel_buttons");

	// Create the button GUI:
	createButtonGui();

	// Create the 2 panels:
	panelLayout = new VLayout();
	panelLayout.setBackgroundColor("${symbol_pound}647386");
	panelLayout.setTop(TOP_OFFSET);
	panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
	panelLayout.setHeight(PANEL_HEIGHT);
	panelLayout.setWidth(PANEL_WIDTH);
	panelLayout.setStyleName("search_panel");
	panelLayout.setVisible(false);

	gridPanel = createGridPanel(mapModel);
	searchPanel = createSearchPanel(mapModel);
	panelLayout.addChild(searchPanel);
	panelLayout.addChild(gridPanel);

	parent.addChild(panelLayout);

	// Add a handler that makes sure this widget is placed at the correct location when the parent widget resizes:
	parent.addResizedHandler(new ResizedHandler() {

		public void onResized(ResizedEvent event) {
			setTop(TOP_OFFSET);
			setLeft(parent.getWidth() - BTN_WIDTH - 8);
			panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
		}
	});
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:47,代码来源:SearchPanel.java

示例2: createSearchPanel

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/** Create the layout for the search panel. Also connect it to the feature grid. */
private Canvas createSearchPanel(final MapModel mapModel) {
	VLayout layout = new VLayout();
	layout.setSize("100%", "100%");
	layout.setVisible(false);
	layout.setStyleName("search_panel_inner");

	// Create a SearchWidget, based upon a map's model:
	final FeatureSearch searchWidget = new FeatureSearch(mapModel, true);

	// What to do when the result of a search comes in?
	// The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
	searchWidget.addSearchHandler(new DefaultSearchHandler(featureListGrid) {

		// After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
		public void afterSearch() {
			showPanel(gridPanel);
		}
	});

	// Limit the maximum number of features that a search may produce:
	searchWidget.setMaximumResultSize(20);
	searchWidget.setBackgroundColor("${symbol_pound}F0F0F0");
	layout.addMember(searchWidget);

	mapModel.addMapModelChangedHandler(new MapModelChangedHandler() {

		// On map initialization: Select the countries layer in the search panel.
		public void onMapModelChanged(MapModelChangedEvent event) {
			VectorLayer layer = mapModel.getVectorLayers().get(0);
			searchWidget.setLayer(layer);
		}
	});

	return layout;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:37,代码来源:SearchPanel.java

示例3: createGridPanel

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/** Create the panel containing the feature grid. This will display the search results. */
private Canvas createGridPanel(MapModel mapModel) {
	VLayout layout = new VLayout();
	layout.setSize("100%", "100%");
	layout.setVisible(false);
	layout.setStyleName("search_panel_inner");

	// Create the FeatureListGrid - a table for displaying attributes:
	featureListGrid = new FeatureListGrid(mapModel);
	featureListGrid.setEditingEnabled(true);
	layout.addMember(featureListGrid);
	return layout;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:14,代码来源:SearchPanel.java

示例4: SearchPanel

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
 * The only constructor.
 * 
 * @param mapModel
 *            The map's model. It knows what layers we can search in.
 * @param parent
 *            The map's parent widget. We use this to attach the search layout to.
 */
public SearchPanel(final MapModel mapModel, final Canvas parent) {
	// Set some parameters:
	setTop(TOP_OFFSET);
	setLeft(parent.getWidth() - BTN_WIDTH - 8);
	setWidth(BTN_WIDTH);
	setHeight(BTN_WIDTH + BTN_WIDTH + 8);
	setStyleName("search_panel_buttons");

	// Create the button GUI:
	createButtonGui();

	// Create the 2 panels:
	panelLayout = new VLayout();
	panelLayout.setBackgroundColor("#647386");
	panelLayout.setTop(TOP_OFFSET);
	panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
	panelLayout.setHeight(PANEL_HEIGHT);
	panelLayout.setWidth(PANEL_WIDTH);
	panelLayout.setStyleName("search_panel");
	panelLayout.setVisible(false);

	gridPanel = createGridPanel(mapModel);
	searchPanel = createSearchPanel(mapModel);
	panelLayout.addChild(searchPanel);
	panelLayout.addChild(gridPanel);

	parent.addChild(panelLayout);

	// Add a handler that makes sure this widget is placed at the correct location when the parent widget resizes:
	parent.addResizedHandler(new ResizedHandler() {

		public void onResized(ResizedEvent event) {
			setTop(TOP_OFFSET);
			setLeft(parent.getWidth() - BTN_WIDTH - 8);
			panelLayout.setLeft(parent.getWidth() - PANEL_WIDTH);
		}
	});
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:47,代码来源:SearchPanel.java

示例5: createSearchPanel

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/** Create the layout for the search panel. Also connect it to the feature grid. */
private Canvas createSearchPanel(final MapModel mapModel) {
	VLayout layout = new VLayout();
	layout.setSize("100%", "100%");
	layout.setVisible(false);
	layout.setStyleName("search_panel_inner");

	// Create a SearchWidget, based upon a map's model:
	final FeatureSearch searchWidget = new FeatureSearch(mapModel, true);

	// What to do when the result of a search comes in?
	// The DefaultSearchHandler will add all the features in the result to the given FeatureListGrid.
	searchWidget.addSearchHandler(new DefaultSearchHandler(featureListGrid) {

		// After the features have been added to the FeatureListGrid, make sure the tab with the grid is visible:
		public void afterSearch() {
			showPanel(gridPanel);
		}
	});

	// Limit the maximum number of features that a search may produce:
	searchWidget.setMaximumResultSize(20);
	searchWidget.setBackgroundColor("#F0F0F0");
	layout.addMember(searchWidget);

	mapModel.addMapModelChangedHandler(new MapModelChangedHandler() {

		// On map initialization: Select the countries layer in the search panel.
		public void onMapModelChanged(MapModelChangedEvent event) {
			VectorLayer layer = mapModel.getVectorLayers().get(0);
			searchWidget.setLayer(layer);
		}
	});

	return layout;
}
 
开发者ID:geomajas,项目名称:geomajas-project-client-gwt,代码行数:37,代码来源:SearchPanel.java

示例6: createExportMenu

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
private void createExportMenu() {
    exportMenu = new VLayout();
    exportMenu.setLeft(exportButton.getAbsoluteLeft());
    exportMenu.setTop(30);
    exportMenu.setStyleName("n52_sensorweb_client_interactionmenu");
    exportMenu.setAutoHeight();
    exportMenu.setZIndex(1000000);
    exportMenu.addMember(createPDFLabel());
    exportMenu.addMember(createCSVLabel());
    exportMenu.setVisible(false);
}
 
开发者ID:52North,项目名称:SensorWebClient,代码行数:12,代码来源:Legend.java

示例7: warn

import com.smartgwt.client.widgets.layout.VLayout; //导入方法依赖的package包/类
/**
     * Notifies user about error.
     * @param msg simple client message
     * @param detailMsg detail response message; can be HTML
     * @param debugInfo request details, URL, ...
     */
    private void warn(String msg, String detailMsg, String debugInfo) {
        if (msg == null) {
            msg = i18n.ErrorHandler_UnexpectedError_Msg();
        }
        SmartGwtMessages sgi18n = ClientUtils.createSmartGwtMessages();
        boolean allowDetail = !msg.equals(detailMsg);
        final Dialog d = new Dialog();
        d.setTitle(sgi18n.dialog_WarnTitle());
        d.setIsModal(true);
        d.setAutoSize(Boolean.FALSE);
        d.setMessage(msg);
        d.setIcon("[SKIN]warn.png");
        d.setCanDragResize(true);
        d.setCanDragReposition(Boolean.TRUE);
        d.setKeepInParentRect(Boolean.TRUE);
//        d.setShowMaximizeButton(Boolean.TRUE);
        d.setMinMemberSize(50);
        Button details = new Button(i18n.ErrorHandler_ButtonDetalis_Title());
        details.setVisible(allowDetail);
        d.setButtons(Dialog.OK, details);
        if (allowDetail) {
            Canvas errorPane = new Canvas();
            errorPane.setOverflow(Overflow.AUTO);
            errorPane.setWidth100();
            errorPane.setHeight100();
            errorPane.setContents(detailMsg);
            errorPane.setCanSelectText(true);
            Canvas debugInfoPane = new Canvas();
            debugInfoPane.setWidth100();
            debugInfoPane.setAutoHeight();
            debugInfoPane.setContents(debugInfo);
            debugInfoPane.setCanSelectText(true);
            final VLayout detailPane = new VLayout(4);
            detailPane.setLayoutMargin(4);
            detailPane.setGroupTitle(i18n.ErrorHandler_ButtonDetalis_Title());
            detailPane.setIsGroup(true);
            detailPane.setVisible(false);
            detailPane.addMember(errorPane);
            detailPane.addMember(debugInfoPane);
            detailPane.setWidth100();
            detailPane.setHeight100();
            d.addItem(detailPane);
            details.addClickHandler(new com.smartgwt.client.widgets.events.ClickHandler() {
                @Override
                public void onClick(com.smartgwt.client.widgets.events.ClickEvent event) {
                    if (detailPane.isVisible()) {
                        d.restore();
                    } else {
                        d.maximize();
                    }
                    detailPane.setVisible(!detailPane.isVisible());
                }
            });
        }
        d.show();
    }
 
开发者ID:proarc,项目名称:proarc,代码行数:63,代码来源:ErrorHandler.java


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