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


Java PushButton.setWidth方法代码示例

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


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

示例1: SettingsWidget

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public SettingsWidget(String title, String panelID, String operationID, String optionID) {
	this.operationID = operationID;
	this.optionID = optionID;
	
	closeButton = new PushButton("Close");
	closeButton.addStyleDependentName("SMALLER");
	closeButton.setTitle("Close settings panel for "+panelID);
	closeButton.addClickListener(closeClick);
	buttonBar = new HorizontalPanel();
	buttonBar.add(closeButton);
	
	datasetButton = new DatasetButton();		
	optionsButton = new OptionsButton(optionID, 300);
	datasetButton.setOffset(0);

	operations = new OperationsWidget(title);
	operations.addClickHandler(operationsClickHandler);

	settingsButton = new PushButton (title);
	settingsButton.addStyleDependentName("SMALLER");
	settingsButton.addClickListener(settingsButtonClick);
	settingsPopup = new PopupPanel(false);

	buttonBar.add(datasetButton);
	buttonBar.add(optionsButton);

	settingsLayout = new FlexTable();
	settingsLayout.setWidget(0, 0, buttonBar);
	settingsLayout.setWidget(1, 0, operations);


	settingsPopup.add(settingsLayout);
	settingsButton.setWidth("65px");
	initWidget(settingsButton);	

}
 
开发者ID:NOAA-PMEL,项目名称:LAS,代码行数:37,代码来源:SettingsWidget.java

示例2: createPushButton

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
/** Method to create a Push button for the toolbar **/
private PushButton createPushButton(String url, Integer top, Integer left, Integer width, Integer height, String tip) {
	Image extract = new Image(url, left, top, width, height);
	PushButton tb = new PushButton(extract);
	tb.setHeight(height+"px");
	tb.setWidth(width+"px");
	tb.addClickHandler(evHandler);
	if (tip != null) {
		tb.setTitle(tip);
	}
	return tb;
}
 
开发者ID:fhcampuswien,项目名称:atom,代码行数:13,代码来源:RichTextToolbar.java

示例3: getCompactGodiva3Layout

import com.google.gwt.user.client.ui.PushButton; //导入方法依赖的package包/类
public static Widget getCompactGodiva3Layout(LayerSelectorIF layerSelector,
        UnitsInfoIF unitsInfo, TimeSelectorIF timeSelector,
        ElevationSelectorIF elevationSelector, PaletteSelectorIF paletteSelector,
        Anchor kmzLink, Anchor permalink, Anchor email, Anchor screenshot, Image rescLogo,
        MapArea mapArea, Image loadingImage, AnimationButton anim, PushButton infoButton) {

    kmzLink.setStylePrimaryName("linkStyle");
    permalink.setStylePrimaryName("linkStyle");
    email.setStylePrimaryName("linkStyle");
    screenshot.setStylePrimaryName("linkStyle");

    VerticalPanel selectors = new VerticalPanel();
    selectors.add(layerSelector);
    selectors.add(unitsInfo);
    selectors.add(timeSelector);
    selectors.add(elevationSelector);

    /*
     * The image height is hardcoded here, because when running with IE8,
     * rescLogo.getHeight() returns 0 instead of the actual height...
     */
    int logoHeight = rescLogo.getHeight();
    if (logoHeight == 0)
        logoHeight = 52;
    selectors.setHeight(logoHeight + "px");

    HorizontalPanel bottomPanel = new HorizontalPanel();
    bottomPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
    anim.setWidth("16px");
    bottomPanel.add(anim);
    bottomPanel.setWidth("100%");
    bottomPanel.add(kmzLink);
    bottomPanel.add(permalink);
    bottomPanel.add(email);
    bottomPanel.add(screenshot);
    infoButton.setWidth("16px");
    bottomPanel.add(infoButton);

    HorizontalPanel topPanel = new HorizontalPanel();

    topPanel.add(rescLogo);
    topPanel.add(selectors);
    topPanel.setCellVerticalAlignment(rescLogo, HasVerticalAlignment.ALIGN_MIDDLE);

    HorizontalPanel mapPalettePanel = new HorizontalPanel();
    mapPalettePanel.add(mapArea);
    mapPalettePanel.add(paletteSelector);

    /*
     * We introduce an AbsolutePanel here. Generally I like to avoid them,
     * but it allows us to overlay a loading image. It's introduced at the
     * last possible moment to avoid any ugliness related to absolute
     * positioning
     */
    AbsolutePanel mapPaletteLoaderPanel = new AbsolutePanel();
    mapPaletteLoaderPanel.add(mapPalettePanel);
    int loaderHeight = loadingImage.getHeight();
    int loaderWidth = loadingImage.getWidth();
    if (loaderHeight == 0)
        loaderHeight = 19;
    if (loaderWidth == 0)
        loaderWidth = 220;
    mapPaletteLoaderPanel.add(loadingImage,
            (int) (mapArea.getMap().getSize().getWidth() - loaderWidth) / 2, (int) (mapArea
                    .getMap().getSize().getHeight() - loaderHeight) / 2);

    VerticalPanel vPanel = new VerticalPanel();
    vPanel.add(topPanel);

    vPanel.setCellHeight(topPanel, logoHeight + "px");
    vPanel.setCellWidth(topPanel, ((int) mapArea.getMap().getSize().getWidth() + 100) + "px");
    vPanel.add(mapPaletteLoaderPanel);

    vPanel.add(bottomPanel);
    vPanel.setCellHeight(bottomPanel, "100%");
    vPanel.setCellVerticalAlignment(bottomPanel, HasVerticalAlignment.ALIGN_MIDDLE);

    ScrollPanel scrollPanel = new ScrollPanel(vPanel);

    return scrollPanel;
}
 
开发者ID:Reading-eScience-Centre,项目名称:edal-java,代码行数:82,代码来源:LayoutManager.java


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