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


Java DropDownChoice.setEnabled方法代碼示例

本文整理匯總了Java中org.apache.wicket.markup.html.form.DropDownChoice.setEnabled方法的典型用法代碼示例。如果您正苦於以下問題:Java DropDownChoice.setEnabled方法的具體用法?Java DropDownChoice.setEnabled怎麽用?Java DropDownChoice.setEnabled使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.apache.wicket.markup.html.form.DropDownChoice的用法示例。


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

示例1: addExcludesPatternFields

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void addExcludesPatternFields(StringResourceModel helpMessage,
        final List<CommonPathPattern> includesExcludesSuggestions) {
    TextArea excludesTa = new TextArea("excludesPattern");
    excludesTa.setEnabled(isSystemAdmin());
    excludesTa.setOutputMarkupId(true);
    add(excludesTa);

    add(new HelpBubble("excludesHelp", helpMessage));

    //Excludes suggestions
    Model<CommonPathPattern> exclude = new Model<>();
    DropDownChoice<CommonPathPattern> excludesSuggest = new DropDownChoice<>(
            "excludesSuggest", exclude, includesExcludesSuggestions);
    if (!includesExcludesSuggestions.isEmpty()) {
        excludesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
    }
    excludesSuggest.add(new UpdatePatternsBehavior(exclude, excludesTa));
    excludesSuggest.setEnabled(isSystemAdmin());
    add(excludesSuggest);
}
 
開發者ID:alancnet,項目名稱:artifactory,代碼行數:21,代碼來源:RepositoriesTabPanel.java

示例2: DerivationTypeDropDownChoicePanel

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
public DerivationTypeDropDownChoicePanel(final String id, final int entryId, final SimulationTreeTableProvider<Object> simulationTreeTableProvider) {
	super(id);
	final Form<Void> layoutForm = new Form<Void>("layoutForm");

	final DropDownChoice<DerivationType> derivationTypeDropDownChoice = new DropDownChoice<DerivationType>("derivationTypeDropDownChoice", Model.of(simulationTreeTableProvider.getDerivationTypeForEntry(entryId)), this.derivationTypes);
	derivationTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			simulationTreeTableProvider.setDerivationTypeForEntry(derivationTypeDropDownChoice.getModelObject(), entryId);

			if (DerivationTypeDropDownChoicePanel.this.treeTable != null) {
				target.add(DerivationTypeDropDownChoicePanel.this.treeTable);
			} else {
				target.add(DerivationTypeDropDownChoicePanel.this.getPage());
			}
		}
	});

	derivationTypeDropDownChoice.setEnabled(true);
	layoutForm.add(derivationTypeDropDownChoice);
	this.add(layoutForm);
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:26,代碼來源:DerivationTypeDropDownChoicePanel.java

示例3: createAndAddVcsConfigSection

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@Override
public void createAndAddVcsConfigSection(Form form, RemoteRepoDescriptor repoDescriptor, boolean isCreate) {
    WebMarkupContainer vcsSection = new WebMarkupContainer("vcsSupportSection");
    vcsSection.add(new TitledBorderBehavior("fieldset-border", "Vcs"));
    vcsSection.add(new DisabledAddonBehavior(AddonType.VCS));
    vcsSection.add(new StyledCheckbox("enableVcsSupport").setTitle("Enable Vcs Support").setEnabled(false));
    vcsSection.add(new DisabledAddonHelpBubble("enableVcsSupport.help", VCS));

    DropDownChoice providerDropdown = new DropDownChoice("provider", Model.of(), Collections.emptyList());
    providerDropdown.setEnabled(false);
    providerDropdown.add(new DisabledAddonBehavior(AddonType.VCS));
    vcsSection.add(providerDropdown);
    vcsSection.add(new DisabledAddonHelpBubble("provider.help", VCS));

    WebMarkupContainer downloadUrlField = new WebMarkupContainer("downloadUrlField");
    downloadUrlField.setVisible(false);
    downloadUrlField.add(new TextField("downloadUrl").setEnabled(false).setVisible(false));
    downloadUrlField.add(new DisabledAddonHelpBubble("downloadUrl.help", VCS).setVisible(false));
    vcsSection.add(downloadUrlField);

    form.add(vcsSection);
}
 
開發者ID:alancnet,項目名稱:artifactory,代碼行數:23,代碼來源:WicketAddonsImpl.java

示例4: addIncludesPatternFields

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void addIncludesPatternFields(StringResourceModel helpMessage,
        final List<CommonPathPattern> includesExcludesSuggestions) {
    TextArea includesTa = new TextArea("includesPattern");
    includesTa.setEnabled(isSystemAdmin());
    includesTa.setOutputMarkupId(true);
    add(includesTa);

    add(new HelpBubble("includesHelp", helpMessage));

    Model<CommonPathPattern> include = new Model<>();
    DropDownChoice<CommonPathPattern> includesSuggest = new DropDownChoice<>(
            "includesSuggest", include, includesExcludesSuggestions);
    if (!includesExcludesSuggestions.isEmpty()) {
        includesSuggest.setDefaultModelObject(includesExcludesSuggestions.get(0));
    }
    includesSuggest.add(new UpdatePatternsBehavior(include, includesTa));
    if (parent.isCreate()) {
        includesSuggest.setDefaultModelObject(CommonPathPattern.ANY);
    }
    includesSuggest.setEnabled(isSystemAdmin());
    add(includesSuggest);
}
 
開發者ID:alancnet,項目名稱:artifactory,代碼行數:23,代碼來源:RepositoriesTabPanel.java

示例5: getKeyPairContainer

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@Override
public WebMarkupContainer getKeyPairContainer(String wicketId, String virtualRepoKey, boolean isCreate) {
    WebMarkupContainer container = new WebMarkupContainer(wicketId);
    DropDownChoice<Object> keyPairDropDown = new DropDownChoice<>("keyPair", Collections.emptyList());
    keyPairDropDown.setEnabled(false);
    keyPairDropDown.add(new DisabledAddonBehavior(WEBSTART));
    container.add(keyPairDropDown);
    container.add(new WebMarkupContainer("keyPairMessage"));
    container.add(new DisabledAddonHelpBubble("keyPair.help", WEBSTART));
    return container;
}
 
開發者ID:alancnet,項目名稱:artifactory,代碼行數:12,代碼來源:WicketAddonsImpl.java

示例6: init

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
/**
 * Init panel components
 */
private void init() {
    TitledBorder border = new TitledBorder("mavenSettingsBorder");

    addChoice("releases", true, false, false, false);
    addChoice("snapshots", false, true, false, false);
    addChoice("pluginReleases", true, false, true, false);
    addChoice("pluginSnapshots", false, true, true, false);

    final DropDownChoice mirrorDropDownChoice = new DropDownChoice<>("mirrorAnySelection",
            new PropertyModel<T>(this, "mirrorAnySelection"), virtualRepoDescriptors);
    mirrorDropDownChoice.setOutputMarkupId(true);
    if (!virtualRepoDescriptors.isEmpty()) {
        mirrorDropDownChoice.setDefaultModelObject(getDefaultChoice(false, false, false, true));
    }
    mirrorDropDownChoice.setEnabled(false);
    form.add(mirrorDropDownChoice);
    form.add(new HelpBubble("mirrorAnySelection.help", new ResourceModel("mirrorAnySelection.help")));

    final StyledCheckbox mirrorAnyCheckbox =
            new StyledCheckbox("mirrorAny", new PropertyModel<Boolean>(this, "mirrorAny"));
    mirrorAnyCheckbox.setDefaultModelObject(Boolean.FALSE);
    mirrorAnyCheckbox.add(new AjaxFormComponentUpdatingBehavior("onclick") {
        @Override
        protected void onUpdate(AjaxRequestTarget target) {
            mirrorDropDownChoice.setEnabled(mirrorAnyCheckbox.isChecked());
            target.add(mirrorDropDownChoice);
        }
    });
    form.add(mirrorAnyCheckbox);

    TitledAjaxSubmitLink generateButton = getGenerateButton();

    form.add(new DefaultButtonBehavior(generateButton));
    border.add(form);
    add(border);
    add(generateButton);
}
 
開發者ID:alancnet,項目名稱:artifactory,代碼行數:41,代碼來源:MavenSettingsPanel.java

示例7: rebuildAttendees

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void rebuildAttendees()
{
  attendeesRepeater.removeAll();
  for (final TeamEventAttendeeDO attendee : attendees) {
    final WebMarkupContainer item = new WebMarkupContainer(attendeesRepeater.newChildId());
    attendeesRepeater.add(item);
    item.add(new AttendeeEditableLabel("editableLabel", Model.of(attendee), false));
    final DropDownChoice<TeamAttendeeStatus> statusChoice = new DropDownChoice<TeamAttendeeStatus>("status",
        new PropertyModel<TeamAttendeeStatus>(attendee, "status"), statusChoiceRenderer.getValues(), statusChoiceRenderer);
    statusChoice.setEnabled(false);
    item.add(statusChoice);
  }
}
 
開發者ID:micromata,項目名稱:projectforge-webapp,代碼行數:14,代碼來源:TeamAttendeesPanel.java

示例8: addWicketComponents

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
@SuppressWarnings("unchecked")
  public void addWicketComponents() {    	        	    	
  	
      final DropDownChoice<String> exportChoice = new DropDownChoice<String>("exportType", new PropertyModel<String>(runtimeModel, "exportType"), typeList,
      		new ChoiceRenderer<String>() {
			@Override
			public Object getDisplayValue(String name) {
				if (name.equals(ReportConstants.ETL_FORMAT)) {
					return getString("Analysis.source");
				} else {
					return name;
				}
			}
});
      exportChoice.add(new AjaxFormComponentUpdatingBehavior("onChange") {
          @Override
          protected void onUpdate(AjaxRequestTarget target) {
              String format = (String) getFormComponent().getConvertedInput();
              if (ReportConstants.ETL_FORMAT.equals(format)) {
			System.out.println("***** ETL selected");
			//analysisPanel.setVisible(true);
		} else {
			System.out.println("***** " + format);
			//analysisPanel.setVisible(false);
		}
              //target.add(analysisPanel);
          }
      });
	
      exportChoice.setRequired(true);
      add(exportChoice);
      
      if (report.isAlarmType() || report.isIndicatorType() || report.isDisplayType()) {
      	exportChoice.setEnabled(false);
      } else {
      	exportChoice.setRequired(true);
      }
      
      
  }
 
開發者ID:nextreports,項目名稱:nextreports-server,代碼行數:41,代碼來源:NextRuntimePanel.java

示例9: AttributeTypeDropDownChoicePanel

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
public AttributeTypeDropDownChoicePanel(final String id, final TypeTreeNode attribute, final boolean dropDownChoiceEnabled, final EventAttributeProvider dataProvider) {
	super(id);
	final Form<Void> layoutForm = new Form<Void>("layoutForm");

	final List<AttributeTypeEnum> attributeTypes = new ArrayList<AttributeTypeEnum>();
	if (attribute.getType() != null) {
		switch (attribute.getType()) {
			case DATE:
				attributeTypes.add(AttributeTypeEnum.DATE);
				attributeTypes.add(AttributeTypeEnum.STRING);
				break;
			case FLOAT:
				attributeTypes.add(AttributeTypeEnum.FLOAT);
				attributeTypes.add(AttributeTypeEnum.STRING);
				break;
			case INTEGER:
				attributeTypes.add(AttributeTypeEnum.INTEGER);
				attributeTypes.add(AttributeTypeEnum.FLOAT);
				attributeTypes.add(AttributeTypeEnum.STRING);
				break;
			default:
				attributeTypes.add(AttributeTypeEnum.STRING);
		}
	}

	final DropDownChoice<AttributeTypeEnum> attributeTypeDropDownChoice = new DropDownChoice<AttributeTypeEnum>("attributeTypeDropDownChoice", new PropertyModel<AttributeTypeEnum>(this, "attributeType"), attributeTypes);
	attributeTypeDropDownChoice.add(new AjaxFormComponentUpdatingBehavior("onchange") {

		private static final long serialVersionUID = 1L;

		@Override
		protected void onUpdate(final AjaxRequestTarget target) {
			attribute.setType(AttributeTypeDropDownChoicePanel.this.attributeType);
		}
	});

	attributeTypeDropDownChoice.setEnabled(dropDownChoiceEnabled);

	layoutForm.add(attributeTypeDropDownChoice);
	this.add(layoutForm);
}
 
開發者ID:bptlab,項目名稱:Unicorn,代碼行數:42,代碼來源:AttributeTypeDropDownChoicePanel.java

示例10: enableComponents

import org.apache.wicket.markup.html.form.DropDownChoice; //導入方法依賴的package包/類
private void enableComponents(int monthlyType, Label mLabel, DropDownChoice minuteChoice, Label label, TextField<Integer> minuteText,
                              IntervalFieldPanel hoursPanel, IntervalFieldPanel monthsPanel,
                              DropDownChoice<Integer> noChoice, DropDownChoice<String> dayChoice,
                              Label everyLabel) {
    if (ScheduleConstants.MONTHLY_GENERAL_TYPE == monthlyType) {
    	mLabel.setEnabled(true);
        minuteChoice.setEnabled(true);
        label.setEnabled(true);
        minuteText.setEnabled(true);
        hoursPanel.setEnabled(true);
        daysPanel.setEnabled(true);
        monthsPanel.setEnabled(true);
        weekdaysPanel.setEnabled(true);

        noChoice.setEnabled(false);
        dayChoice.setEnabled(false);
        everyLabel.setEnabled(false);
    } else if (ScheduleConstants.MONTHLY_DAY_OF_WEEK_TYPE == monthlyType) {
    	mLabel.setEnabled(false);
        minuteChoice.setEnabled(false);
        label.setEnabled(false);
        minuteText.setEnabled(false);
        hoursPanel.setEnabled(false);
        daysPanel.setEnabled(false);
        monthsPanel.setEnabled(false);
        weekdaysPanel.setEnabled(false);

        noChoice.setEnabled(true);
        dayChoice.setEnabled(true);
        everyLabel.setEnabled(true);
    } else {
    	mLabel.setEnabled(false);
        minuteChoice.setEnabled(false);
        label.setEnabled(false);
        minuteText.setEnabled(false);
        hoursPanel.setEnabled(false);
        daysPanel.setEnabled(false);
        monthsPanel.setEnabled(false);
        weekdaysPanel.setEnabled(false);

        noChoice.setEnabled(false);
        dayChoice.setEnabled(false);
        everyLabel.setEnabled(false);
    }
}
 
開發者ID:nextreports,項目名稱:nextreports-server,代碼行數:46,代碼來源:MonthlyJobPanel.java


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