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


Java CheckBox.addStyleName方法代码示例

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


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

示例1: setProperties

import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
public void setProperties(RoomPropertiesInterface properties) {
	iProperties = properties;
	iRooms.setProperties(properties);
	
	iFutureSessions.clear();
	iForm.getRowFormatter().setVisible(iFutureSessionsRow, iProperties.hasFutureSessions());
	if (iProperties.hasFutureSessions()) {
		CheckBox current = new CheckBox(iProperties.getAcademicSessionName());
		current.setValue(true); current.setEnabled(false);
		current.addStyleName("future-session");
		iFutureSessions.add(current);
		for (AcademicSessionInterface session: iProperties.getFutureSessions()) {
			if (session.isCanAddGlobalRoomGroup() || session.isCanAddDepartmentalRoomGroup()) {
				CheckBox ch = new CheckBox(session.getLabel());
				iFutureSessionsToggles.put(session.getId(), ch);
				ch.addStyleName("future-session");
				iFutureSessions.add(ch);
			}
		}
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:22,代码来源:RoomGroupEdit.java

示例2: setProperties

import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
public void setProperties(RoomPropertiesInterface properties) {
	iProperties = properties;
	iRooms.setProperties(properties);
	
	iForm.getRowFormatter().setVisible(iTypeRow, !iProperties.getFeatureTypes().isEmpty());
	iType.clear();
	if (!iProperties.getFeatureTypes().isEmpty()) {
		iType.addItem(MESSAGES.itemNoFeatureType(), "-1");
		for (FeatureTypeInterface type: iProperties.getFeatureTypes())
			iType.addItem(type.getLabel(), type.getId().toString());
	}

	iFutureSessions.clear();
	iForm.getRowFormatter().setVisible(iFutureSessionsRow, iProperties.hasFutureSessions());
	if (iProperties.hasFutureSessions()) {
		CheckBox current = new CheckBox(iProperties.getAcademicSessionName());
		current.setValue(true); current.setEnabled(false);
		current.addStyleName("future-session");
		iFutureSessions.add(current);
		for (AcademicSessionInterface session: iProperties.getFutureSessions()) {
			if (session.isCanAddGlobalRoomGroup() || session.isCanAddDepartmentalRoomGroup()) {
				CheckBox ch = new CheckBox(session.getLabel());
				iFutureSessionsToggles.put(session.getId(), ch);
				ch.addStyleName("future-session");
				iFutureSessions.add(ch);
			}
		}
	}
}
 
开发者ID:Jenner4S,项目名称:unitimes,代码行数:30,代码来源:RoomFeatureEdit.java

示例3: CommitViewImpl

import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
/** Create view. */
@Inject
protected CommitViewImpl(GitResources res, GitLocalizationConstant locale) {
  this.res = res;
  this.locale = locale;
  this.message = new ShiftableTextArea();
  this.ensureDebugId("git-commit-window");

  this.setTitle(locale.commitTitle());

  Widget widget = uiBinder.createAndBindUi(this);
  this.setWidget(widget);

  btnCancel =
      createButton(
          locale.buttonCancel(), "git-commit-cancel", event -> delegate.onCancelClicked());
  btnCommit =
      createButton(
          locale.buttonCommit(), "git-commit-commit", event -> delegate.onCommitClicked());
  btnCommit.addStyleName(resources.windowCss().primaryButton());

  remoteBranches = new ListBox();
  remoteBranches.setEnabled(false);
  remoteBranches.getElement().setAttribute("style", "width: 230px");

  pushAfterCommit = new CheckBox();
  pushAfterCommit.setHTML(locale.commitPushCheckboxTitle());
  pushAfterCommit.ensureDebugId("push-after-commit-check-box");
  pushAfterCommit.addValueChangeHandler(event -> remoteBranches.setEnabled(event.getValue()));

  pushAfterCommit.addStyleName(res.gitCSS().spacing());
  getFooter().add(pushAfterCommit);
  getFooter().add(remoteBranches);

  addButtonToFooter(btnCommit);
  addButtonToFooter(btnCancel);
}
 
开发者ID:eclipse,项目名称:che,代码行数:38,代码来源:CommitViewImpl.java

示例4: makeCheckBox

import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
public static CheckBox makeCheckBox(String text,
                                    String tip,
                                    boolean selected,
                                    boolean forceNowrap) {
    CheckBox cb = new CheckBox();
    cb.addStyleName("gwtutil-checkbox");
    cb.setValue(selected);
    cb.setHTML(text);
    cb.setTitle(tip);
    if (forceNowrap) {
        setStyle(cb, "whiteSpace", "nowrap");

    }
    return cb;
}
 
开发者ID:lsst,项目名称:firefly,代码行数:16,代码来源:GwtUtil.java

示例5: create

import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
@Override
public Widget create(String machineName, List<RuntimeInfo> runtimeList) {
  VerticalPanel panel = new VerticalPanel();
  panel.ensureDebugId("runtimeInfoVerticalPanel");
  panel.setWidth("100%");

  Label caption = new Label(locale.cellTableCaption(machineName));
  caption.ensureDebugId("runtimeInfoCellTableCaption");
  caption.addStyleName(resources.cellTableStyle().cellTableCaption());

  HorizontalPanel hPanel = new HorizontalPanel();
  hPanel.setWidth("100%");
  hPanel.ensureDebugId("runtimeInfoCellTableHeaderWrapper");
  hPanel.add(caption);

  ListDataProvider<RuntimeInfo> dataProvider = new ListDataProvider<>(runtimeList);

  CheckBox hideCheckBox = new CheckBox("Hide internal servers");
  hideCheckBox.addValueChangeHandler(
      event -> {
        if (event.getValue()) { // if hide = true
          dataProvider.setList(
              runtimeList
                  .stream()
                  .filter(info -> !isNullOrEmpty(info.getPort()))
                  .collect(toList()));
        } else {
          dataProvider.setList(runtimeList);
        }
        dataProvider.refresh();
      });
  hideCheckBox.addStyleName(resources.cellTableStyle().cellTableHideServersCheckBox());
  hideCheckBox.ensureDebugId("runtimeInfoHideServersCheckBox");

  hPanel.add(hideCheckBox);

  panel.add(hPanel);
  panel.add(createCellTable(dataProvider));

  return new ScrollPanel(panel);
}
 
开发者ID:eclipse,项目名称:che,代码行数:42,代码来源:CellTableRuntimeInfoWidgetFactory.java

示例6: buildScopePopup

import com.google.gwt.user.client.ui.CheckBox; //导入方法依赖的package包/类
/**
 * Rebuild the popup from scratch with all of the scopes that we have from the last time we were
 * presented.
 */
private void buildScopePopup() {

  scopePanel.clear();
  additionalScopePanel.clear();

  Set<TextBox> oldEditors = Sets.newLinkedHashSet(freeFormEditors);
  freeFormEditors.clear();

  // Hide the service scopes label if there aren't any.
  hasScopesText.setVisible(!scopesFromDiscovery.isEmpty());
  noScopesText.setVisible(scopesFromDiscovery.isEmpty());

  // Show different text on the free-form scopes section when there are discovery scopes.
  optionalAdditionalScopes.setVisible(!scopesFromDiscovery.isEmpty());

  for (final Map.Entry<String, AuthScope> scope : scopesFromDiscovery.entrySet()) {
    // Add the check box to the table.
    CheckBox scopeToggle = new CheckBox();

    SafeHtmlBuilder safeHtml = new SafeHtmlBuilder();
    safeHtml.appendEscaped(scope.getKey()).appendHtmlConstant("<br><span>")
        .appendEscaped(scope.getValue().getDescription()).appendHtmlConstant("</span>");
    scopeToggle.setHTML(safeHtml.toSafeHtml());

    scopeToggle.addStyleName(style.discoveryScopeSelector());
    scopePanel.add(scopeToggle);

    // When the box is checked, add our scope to the selected list.
    scopeToggle.addClickHandler(new ClickHandler() {
      @Override
      public void onClick(ClickEvent event) {
        CheckBox checkBox = (CheckBox) event.getSource();
        if (checkBox.getValue()) {
          selectedScopes.add(scope.getKey());
        } else {
          selectedScopes.remove(scope.getKey());
        }
      }
    });

    // Enable the check box if the scope is selected.
    scopeToggle.setValue(selectedScopes.contains(scope.getKey()));
  }

  // Process any scopes that are extra.
  for (TextBox editor : oldEditors) {
    if (!editor.getValue().trim().isEmpty()) {
      addFreeFormEditorRow(editor.getValue(), true);
    }
  }

  // There should always be one empty editor.
  addFreeFormEditorRow("", false);
}
 
开发者ID:showlowtech,项目名称:google-apis-explorer,代码行数:59,代码来源:AuthView.java


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