com.vaadin.ui.CheckBox.<init>()方法的使用及代码示例

x33g5p2x  于2022-01-18 转载在 其他  
字(7.2k)|赞(0)|评价(0)|浏览(109)

本文整理了Java中com.vaadin.ui.CheckBox.<init>()方法的一些代码示例,展示了CheckBox.<init>()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。CheckBox.<init>()方法的具体详情如下:
包路径:com.vaadin.ui.CheckBox
类名称:CheckBox
方法名:<init>

CheckBox.<init>介绍

[英]Creates a new checkbox.
[中]创建一个新的复选框。

代码示例

代码示例来源:origin: nz.co.senanque/madura-vaadinsupport

public AbstractField getBooleanField(MaduraPropertyWrapper property) {
  return new CheckBox();
}
public AbstractField getSelectField(MaduraPropertyWrapper property) {

代码示例来源:origin: nz.co.senanque/madura-vaadinsupport

public AbstractField getBooleanField(MaduraPropertyWrapper property) {
  return new CheckBox();
}
public AbstractField getSelectField(MaduraPropertyWrapper property) {

代码示例来源:origin: nz.co.senanque/madura-vaadin

public AbstractField<?> getBooleanField(MaduraPropertyWrapper property) {
  return new CheckBox();
}
public AbstractField<?> getSelectField(MaduraPropertyWrapper property) {

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin

@Override
public Component createEditor() {
  return new CheckBox();
}

代码示例来源:origin: info.magnolia.ui/magnolia-ui-framework

public CheckBoxField(String checkBoxCaption) {
  this.checkBox = new CheckBox(checkBoxCaption);
}

代码示例来源:origin: org.opencms/opencms-core

/**
 * Gets the check box for the item with the given id.<p>
 *
 * @param id the item id
 * @return the check box
 */
private CheckBox getCheckBox(Object id) {
  if (!m_checkBoxes.containsKey(id)) {
    m_checkBoxes.put(id, new CheckBox());
  }
  return m_checkBoxes.get(id);
}

代码示例来源:origin: peholmst/vaadin4spring

private CheckBox createViewCheckbox(String caption, final String viewName) {
  final CheckBox checkBox = new CheckBox(caption, true);
  checkBox.addValueChangeListener(new HasValue.ValueChangeListener<Boolean>() {
    @Override
    public void valueChange(HasValue.ValueChangeEvent<Boolean> valueChangeEvent) {
      if (checkBox.getValue()) {
        allowedViews.add(viewName);
      } else {
        allowedViews.remove(viewName);
      }
    }
  });
  return checkBox;
}

代码示例来源:origin: uk.q3c.krail/krail

@Override
public AbstractField componentFor(Class<?> dataType) {
  if (dataType.equals(Date.class)) {
    return new DateField();
  }
  if (dataType.equals(boolean.class) || dataType.equals(Boolean.class)) {
    return new CheckBox();
  }
  return new TextField();
}

代码示例来源:origin: KrailOrg/krail

@Override
public AbstractField componentFor(Class<?> dataType) {
  if (dataType.equals(LocalDate.class)) {
    return new DateField();
  }
  if (dataType.equals(boolean.class) || dataType.equals(Boolean.class)) {
    return new CheckBox();
  }
  return new TextField();
}

代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin6

@Override
protected AbstractField createTextField() throws MException {
  def = getElement().getConfig().getBoolean("default",false);
  return new CheckBox();
}

代码示例来源:origin: org.aperteworkflow/gui-commons

public static CheckBox checkBox(String caption) {
  CheckBox cb = new CheckBox();
  if (caption != null) {
    cb.setCaption(caption);
  }
  cb.setValue(false);
  cb.setImmediate(true);
  cb.setWidth(100, Sizeable.UNITS_PERCENTAGE);
  return cb;
}

代码示例来源:origin: eclipse/hawkbit

private CheckBox createTargetVisibleField() {
  final CheckBox checkBox = new CheckBox();
  checkBox.setId(UIComponentIdProvider.METADATA_TARGET_VISIBLE_ID);
  checkBox.setCaption(i18n.getMessage("metadata.targetvisible"));
  checkBox.addValueChangeListener(this::onCheckBoxChange);
  return checkBox;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private CheckBox createTargetVisibleField() {
  final CheckBox checkBox = new CheckBox();
  checkBox.setId(UIComponentIdProvider.METADATA_TARGET_VISIBLE_ID);
  checkBox.setCaption(i18n.getMessage("metadata.targetvisible"));
  checkBox.addValueChangeListener(this::onCheckBoxChange);
  return checkBox;
}

代码示例来源:origin: org.activiti/activiti-explorer

@Override
public Field getPropertyField(FormProperty formProperty) {
 
 CheckBox checkBox = new CheckBox(getPropertyLabel(formProperty));
 checkBox.setRequired(formProperty.isRequired());
 checkBox.setEnabled(formProperty.isWritable());
 if (formProperty.getValue() != null) {
  Boolean value = new Boolean(Boolean.parseBoolean(formProperty.getValue()));
  checkBox.setValue(value); 
 }
 return checkBox;
}

代码示例来源:origin: org.activiti/activiti-explorer

protected void addIncludeProcessInstancesSection(boolean suspend) {
 verticalLayout.addComponent(new Label("&nbsp", Label.CONTENT_XHTML));
 verticalLayout.addComponent(new Label("&nbsp", Label.CONTENT_XHTML));
 
 includeProcessInstancesCheckBox = new CheckBox(suspend ?
     i18nManager.getMessage(Messages.PROCESS_SUSPEND_POPUP_INCLUDE_PROCESS_INSTANCES_DESCRIPTION) :
     i18nManager.getMessage(Messages.PROCESS_ACTIVATE_POPUP_INCLUDE_PROCESS_INSTANCES_DESCRIPTION), true);
 verticalLayout.addComponent(includeProcessInstancesCheckBox);
}

代码示例来源:origin: org.aperteworkflow/base-widgets

private CheckBox createCheckBoxField(CheckBoxWidgetElement we) {
  CheckBox cb = new CheckBox();
  if (we.getDefaultSelect() != null && we.getDefaultSelect()) {
    cb.setValue(we.getDefaultSelect());
  }
  if (we.getValue() != null)
    cb.setValue(we.getValue());
  return cb;
}

代码示例来源:origin: eclipse/hawkbit

private VerticalLayout initView() {
  final Label label = new Label(i18n.getMessage("label.auto.assign.description"));
  checkBox = new CheckBox(i18n.getMessage("label.auto.assign.enable"));
  checkBox.setId(UIComponentIdProvider.DIST_SET_SELECT_ENABLE_ID);
  checkBox.setImmediate(true);
  checkBox.addValueChangeListener(this);
  setTableEnabled(false);
  final VerticalLayout verticalLayout = new VerticalLayout();
  verticalLayout.addComponent(label);
  verticalLayout.addComponent(checkBox);
  verticalLayout.addComponent(dsTable);
  return verticalLayout;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

private VerticalLayout initView() {
  final Label label = new Label(i18n.getMessage("label.auto.assign.description"));
  checkBox = new CheckBox(i18n.getMessage("label.auto.assign.enable"));
  checkBox.setId(UIComponentIdProvider.DIST_SET_SELECT_ENABLE_ID);
  checkBox.setImmediate(true);
  checkBox.addValueChangeListener(this);
  setTableEnabled(false);
  final VerticalLayout verticalLayout = new VerticalLayout();
  verticalLayout.addComponent(label);
  verticalLayout.addComponent(checkBox);
  verticalLayout.addComponent(dsTable);
  return verticalLayout;
}

代码示例来源:origin: org.eclipse.hawkbit/hawkbit-ui

@SuppressWarnings("unchecked")
private void getSelectedTableItemData(final Long id) {
  Item saveTblitem;
  if (selectedTableContainer != null) {
    saveTblitem = selectedTableContainer.addItem(id);
    saveTblitem.getItemProperty(DIST_TYPE_NAME).setValue(
        sourceTable.getContainerDataSource().getItem(id).getItemProperty(DIST_TYPE_NAME).getValue());
    final CheckBox mandatoryCheckBox = new CheckBox();
    saveTblitem.getItemProperty(DIST_TYPE_MANDATORY).setValue(mandatoryCheckBox);
    saveTblitem.getItemProperty(DIST_TYPE_DESCRIPTION).setValue(
        sourceTable.getContainerDataSource().getItem(id).getItemProperty(DIST_TYPE_DESCRIPTION).getValue());
  }
}

代码示例来源:origin: eclipse/hawkbit

@SuppressWarnings("unchecked")
private void getSelectedTableItemData(final Long id) {
  Item saveTblitem;
  if (selectedTableContainer != null) {
    saveTblitem = selectedTableContainer.addItem(id);
    saveTblitem.getItemProperty(DIST_TYPE_NAME).setValue(
        sourceTable.getContainerDataSource().getItem(id).getItemProperty(DIST_TYPE_NAME).getValue());
    final CheckBox mandatoryCheckBox = new CheckBox();
    saveTblitem.getItemProperty(DIST_TYPE_MANDATORY).setValue(mandatoryCheckBox);
    saveTblitem.getItemProperty(DIST_TYPE_DESCRIPTION).setValue(
        sourceTable.getContainerDataSource().getItem(id).getItemProperty(DIST_TYPE_DESCRIPTION).getValue());
  }
}

相关文章