當前位置: 首頁>>代碼示例>>Java>>正文


Java HTMLPanel.addAndReplaceElement方法代碼示例

本文整理匯總了Java中com.google.gwt.user.client.ui.HTMLPanel.addAndReplaceElement方法的典型用法代碼示例。如果您正苦於以下問題:Java HTMLPanel.addAndReplaceElement方法的具體用法?Java HTMLPanel.addAndReplaceElement怎麽用?Java HTMLPanel.addAndReplaceElement使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在com.google.gwt.user.client.ui.HTMLPanel的用法示例。


在下文中一共展示了HTMLPanel.addAndReplaceElement方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: getPublishPanel

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
private static HTMLPanel getPublishPanel() {
    HTMLPanel publishPanel = new HTMLPanel(GerritCiPlugin.publishJobPanel.toString());
    TextBox publishCommand = new TextBox();
    publishCommand.setName("publishCommand");
    publishCommand.setText("./scripts/publish.sh");
    TextBox publishBranchRegex = new TextBox();
    publishBranchRegex.setName("publishBranchRegex");
    publishBranchRegex.setText("refs/heads/(develop|master)");
    TextBox jobType = new TextBox();
    jobType.setText("publish");
    jobType.setName("jobType");
    jobType.setVisible(false);
    publishPanel.add(jobType);
    publishPanel.addAndReplaceElement(publishCommand, "publishCommand");
    publishPanel.addAndReplaceElement(publishBranchRegex, "publishBranchRegex");
    addCommonFields(publishPanel);
    return publishPanel;
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:19,代碼來源:JobPanels.java

示例2: getVerifyPanel

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
private static HTMLPanel getVerifyPanel() {
    HTMLPanel verifyPanel = new HTMLPanel(GerritCiPlugin.verifyJobPanel.toString());
    TextBox verifyCommand = new TextBox();
    verifyCommand.setName("verifyCommand");
    verifyCommand.setText("./scripts/verify.sh");
    TextBox verifyBranchRegex = new TextBox();
    verifyBranchRegex.setName("verifyBranchRegex");
    verifyBranchRegex.setText(".*");
    TextBox jobType = new TextBox();
    jobType.setText("verify");
    jobType.setName("jobType");
    jobType.setVisible(false);
    verifyPanel.add(jobType);
    verifyPanel.addAndReplaceElement(verifyCommand, "verifyCommand");
    verifyPanel.addAndReplaceElement(verifyBranchRegex, "verifyBranchRegex");
    addCommonFields(verifyPanel);
    return verifyPanel;
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:19,代碼來源:JobPanels.java

示例3: createJob

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
private HTMLPanel createJob(String jobType) {
    final HTMLPanel p = JobPanels.createJobPanel(jobType);
    TextBox jobName = new TextBox();
    jobName.setName("jobName");
    jobName.setText(jobType + "_" + projectName + "_" + Random.nextInt());
    jobName.setVisible(false);
    p.add(jobName);
    final Button deleteButton = new Button("delete");
    deleteButton.addClickHandler(new ClickHandler() {
        @Override
        public void onClick(ClickEvent event) {
            deletePanel(p);
        }
    });
    p.addAndReplaceElement(deleteButton, "delete");
    if(jobType.equals("cron")) {
        addCronToggleButton(p, deleteButton);
    }
    activePanels.add(p);
    return p;
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:22,代碼來源:ProjectConfigurationScreen.java

示例4: getCronPanel

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
private static HTMLPanel getCronPanel() {
    HTMLPanel cronPanel = new HTMLPanel(GerritCiPlugin.cronPanel.toString());
    TextBox cronCommand = new TextBox();
    cronCommand.setName("cronCommand");
    cronCommand.setText("./scripts/cron.sh");
    TextBox cronSchedule = new TextBox();
    cronSchedule.setName("cronJob");
    TextBox jobType = new TextBox();
    jobType.setText("cron");
    jobType.setName("jobType");
    jobType.setVisible(false);
    cronPanel.add(jobType);
    cronPanel.addAndReplaceElement(cronCommand, "cronCommand");
    cronPanel.addAndReplaceElement(cronSchedule, "cronJob");
    addCommonFields(cronPanel);
    return cronPanel;
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:18,代碼來源:JobPanels.java

示例5: addCommonFields

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
public static void addCommonFields(HTMLPanel p){
    CheckBox junitEnabled = new CheckBox();
    junitEnabled.setName("junitEnabled");
    junitEnabled.setValue(true);
    TextBox junitPath = new TextBox();
    junitPath.setText("build/test-results/*.xml");
    junitPath.setName("junitPath");
    TextBox timeoutMinutes = new TextBox();
    timeoutMinutes.setText("30");
    timeoutMinutes.setName("timeoutMinutes");
    p.addAndReplaceElement(junitEnabled, "junitEnabled");
    p.addAndReplaceElement(junitPath,"junitPath");
    p.addAndReplaceElement(timeoutMinutes, "timeoutMinutes");
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:15,代碼來源:JobPanels.java

示例6: addCronToggleButton

import com.google.gwt.user.client.ui.HTMLPanel; //導入方法依賴的package包/類
public static void addCronToggleButton(HTMLPanel p, final Button deleteButton) {
    final PopupPanel pop = new PopupPanel(true);
    final HTMLPanel cronSyntax = new HTMLPanel(GerritCiPlugin.cronToggle.toString());
    Button toggleButton = new Button("Build Schedule Syntax");
    toggleButton.addClickHandler(new ClickHandler() {
        public void onClick(ClickEvent event) {
            pop.setWidget(cronSyntax);
            pop.showRelativeTo(deleteButton);
        }
    });
    p.addAndReplaceElement(toggleButton, "toggleButton");
}
 
開發者ID:palantir,項目名稱:gerrit-ci,代碼行數:13,代碼來源:ProjectConfigurationScreen.java


注:本文中的com.google.gwt.user.client.ui.HTMLPanel.addAndReplaceElement方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。