• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java Button类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: getButtons

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
private HLayout getButtons() {

        // Buttons on the bottom
        HLayout buttonLayout = new HLayout();
        buttonLayout.setWidth100();
        buttonLayout.setHeight(25);
        buttonLayout.setLayoutMargin(6);
        buttonLayout.setMembersMargin(5);
        buttonLayout.setAlign(Alignment.RIGHT);

        i_closeButton = new Button("Close");
        i_closeButton.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                // close the window
                destroy();
            }
        });

        buttonLayout.addMember(i_closeButton);

        return buttonLayout;
    }
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:25,代码来源:DashboardWindow.java


示例2: getButton

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
private HLayout getButton() {

        // Buttons on the bottom
        HLayout buttonLayout = new HLayout();
        buttonLayout.setWidth100();
        buttonLayout.setHeight(40);
        buttonLayout.setLayoutMargin(6);
        buttonLayout.setMembersMargin(10);
        buttonLayout.setAlign(Alignment.CENTER);

        i_cancelButton = new Button("Close");
        i_cancelButton.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                // close the window
                destroy();
            }
        });

        buttonLayout.addMember(i_cancelButton);

        return buttonLayout;
    }
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:25,代码来源:ValueSetEditorWindow.java


示例3: setButton

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
private void setButton(Button btn, boolean show, String title) {
    if (show) {
        btn.show();
        btn.setTitle(title);
    } else {
        btn.hide();
    }
}
 
开发者ID:proarc,项目名称:proarc,代码行数:9,代码来源:Wizard.java


示例4: RunConfigSection

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
public RunConfigSection() {
    super("Config run");
    HLayout hLayout = new HLayout();
    form = new DynamicForm();
    final TextItem titleText = new TextItem(RunModel.RUNTITLE_FIELD, constants.runTitle());
    titleText.setWidth("100%");
    form.setFields(titleText);
    form.setWidth("*");
    Button button = new Button("save");
    button.setAlign(Alignment.CENTER);
    button.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            run.setTitle(form.getValueAsString(RunModel.RUNTITLE_FIELD));
            run.writeToCloud(new JsonCallback(){
                public void onJsonReceived(JSONValue jsonValue) {
                       RunConfigSection.this.setExpanded(false);
                    RunDataSource.getInstance().loadRun(run.getRunId());

                }
            });
        }
    });
    hLayout.addMember(form);
    hLayout.addMember(button);
    setItems(hLayout);
    hLayout.setHeight(40);
}
 
开发者ID:WELTEN,项目名称:dojo-ibl,代码行数:29,代码来源:RunConfigSection.java


示例5: createButtonLayout

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
private HLayout createButtonLayout() {

        i_buttonLayout = new HLayout();
        i_buttonLayout.setWidth100();
        i_buttonLayout.setHeight(40);
        i_buttonLayout.setMargin(25);
        i_buttonLayout.setAlign(Alignment.CENTER);

        i_versionToggleButton = new Button();
        i_versionToggleButton.setTitle(INITIAL_VERSION);
        i_versionToggleButton.setWidth(300);

        // show button if user is logged in.
        i_versionToggleButton.setVisible(userPermitted);

        i_versionToggleButton.addClickHandler(new ClickHandler() {

            @Override
            public void onClick(ClickEvent event) {
                if (i_versionToggleButton.getTitle().equals(INITIAL_VERSION)) {
                    displayInitalVersion();
                } else {
                    displayLastExecutedVersion();
                }
            }
        });

        i_buttonLayout.addMember(i_versionToggleButton);

        return i_buttonLayout;
    }
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:32,代码来源:CriteriaTab.java


示例6: buildButton

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
private Widget buildButton(Button button) {
    button.setWidth100();
    return button;
}
 
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:5,代码来源:GraphvizControls.java


示例7: enableButton

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
void enableButton(Button button, boolean enabled) {
    if(enabled) 
        button.enable();
    else
        button.disable();
}
 
开发者ID:will-gilbert,项目名称:OSWf-OSWorkflow-fork,代码行数:7,代码来源:SimulatorControls.java


示例8: warn

import com.smartgwt.client.widgets.Button; //导入依赖的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


示例9: getCloseButton

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
public Button getCloseButton() {
    return i_closeButton;
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:4,代码来源:DashboardWindow.java


示例10: getCloseButton

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
public Button getCloseButton() {
    return i_okButton;
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:4,代码来源:CategorySelectionWindow.java


示例11: LatestExecutionWindow

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
public LatestExecutionWindow(List<ValueSet> valueSetList) {
	super();
	setTitle("Last Execution: Value Set Details");
	setWidth(800);
	setHeight(525);
	setModalMaskOpacity(90);
	setAlign(Alignment.CENTER);

	setCanDragReposition(true);
	setCanDragResize(true);
	setAnimateMinimize(true);

	HTMLPanel header = new HTMLPanel("<b>The latest execution was ran with these value sets.</b>");
	header.setWidth("100%");
	HLayout headerLayout = new HLayout();
	headerLayout.setWidth100();
	headerLayout.setHeight(25);
	headerLayout.setLayoutAlign(Alignment.CENTER);
	headerLayout.setAlign(VerticalAlignment.CENTER);
	headerLayout.addMember(header);

	ExecValueSetGrid grid = new ExecValueSetGrid(valueSetList);

	Button cancelButton = new Button("Close");
	cancelButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent clickEvent) {
			destroy();
		}
	});

	HLayout buttonLayout = new HLayout(5);
	buttonLayout.setHeight(25);
	buttonLayout.setMargin(10);
	buttonLayout.setAlign(Alignment.CENTER);
	buttonLayout.addMember(cancelButton);

	addItem(headerLayout);
	addItem(grid);
	addItem(buttonLayout);
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:42,代码来源:LatestExecutionWindow.java


示例12: ExecuteWindow

import com.smartgwt.client.widgets.Button; //导入依赖的package包/类
public ExecuteWindow(final AlgorithmData algorithmData, final Date fromDate, final Date toDate) {
	super();
	setTitle("Value Set Version Selection For Execution");
	setWidth(800);
	setHeight("95%");
	setModalMaskOpacity(90);
	setAlign(Alignment.CENTER);

	setCanDragReposition(true);
	setCanDragResize(true);
	setAnimateMinimize(true);

	HTMLPanel header = new HTMLPanel("<a style='text-align:center;'><b>Select the version of each value set for execution.</b></a>");
	header.setWidth("100%");
	HLayout headerLayout = new HLayout();
	headerLayout.setWidth100();
	headerLayout.setHeight(25);
	headerLayout.setLayoutAlign(Alignment.CENTER);
	headerLayout.setAlign(VerticalAlignment.CENTER);
	headerLayout.addMember(header);

	HTMLPanel dataCriteria = new HTMLPanel("<b>Data Criteria (QDM Data Elements)</b>");
	dataCriteria.setWidth("100%");
	HLayout dataCriteriaLayout = new HLayout();
	dataCriteriaLayout.setWidth100();
	dataCriteriaLayout.setHeight(25);
	dataCriteriaLayout.setLayoutAlign(Alignment.LEFT);
	dataCriteriaLayout.setAlign(VerticalAlignment.CENTER);
	dataCriteriaLayout.setLayoutTopMargin(20);
	dataCriteriaLayout.addMember(dataCriteria);
	DataCriteriaListGrid dataCriteriaListGrid = new DataCriteriaListGrid();
	dataCriteriaListGrid.setGridData(algorithmData);

	HTMLPanel suppDataCriteria = new HTMLPanel("<b>Supplemental Data Elements</b>");
	suppDataCriteria.setWidth("100%");
	HLayout suppDataCriteriaLayout = new HLayout();
	suppDataCriteriaLayout.setWidth100();
	suppDataCriteriaLayout.setHeight(25);
	suppDataCriteriaLayout.setLayoutAlign(Alignment.LEFT);
	suppDataCriteriaLayout.setAlign(VerticalAlignment.CENTER);
	suppDataCriteriaLayout.setLayoutTopMargin(20);
	suppDataCriteriaLayout.addMember(suppDataCriteria);
	SupplementalDataListGrid supplementalDataListGrid = new SupplementalDataListGrid();
	supplementalDataListGrid.setGridData(algorithmData);

	Button cancelButton = new Button("Cancel");
	cancelButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent clickEvent) {
			destroy();
		}
	});

	Button executeButton = new Button("Execute");
	executeButton.addClickHandler(new ClickHandler() {
		@Override
		public void onClick(ClickEvent event) {
			executePhenotype(algorithmData, fromDate, toDate);
		}
	});

	HLayout buttonLayout = new HLayout(5);
	buttonLayout.setHeight(25);
	buttonLayout.setMargin(10);
	buttonLayout.setLayoutTopMargin(20);
	buttonLayout.setAlign(Alignment.CENTER);
	buttonLayout.addMember(executeButton);
	buttonLayout.addMember(cancelButton);

	addItem(headerLayout);
	addItem(dataCriteriaLayout);
	addItem(dataCriteriaListGrid);
	addItem(suppDataCriteriaLayout);
	addItem(supplementalDataListGrid);
	addItem(buttonLayout);
}
 
开发者ID:SHARP-HTP,项目名称:phenotype-portal,代码行数:77,代码来源:ExecuteWindow.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java AbstractRxTask类代码示例发布时间:2022-05-22
下一篇:
Java MetaClassRegistry类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap