本文整理匯總了Java中com.vaadin.ui.CheckBox.getValue方法的典型用法代碼示例。如果您正苦於以下問題:Java CheckBox.getValue方法的具體用法?Java CheckBox.getValue怎麽用?Java CheckBox.getValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.vaadin.ui.CheckBox
的用法示例。
在下文中一共展示了CheckBox.getValue方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: valueChange
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
@Override
public void valueChange(final ValueChangeEvent event) {
if (!(event.getProperty() instanceof CheckBox)) {
return;
}
notifyConfigurationChanged();
final CheckBox checkBox = (CheckBox) event.getProperty();
BooleanConfigurationItem configurationItem;
if (actionAutocloseCheckBox.equals(checkBox)) {
configurationItem = actionAutocloseConfigurationItem;
} else {
return;
}
if (checkBox.getValue()) {
configurationItem.configEnable();
} else {
configurationItem.configDisable();
}
}
示例2: save
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
protected void save() {
if (isNotBlank(nameField.getValue()) && isNotBlank(versionLabelField.getValue())) {
releasePackage.setName(nameField.getValue());
releasePackage.setVersionLabel(versionLabelField.getValue());
releasePackage.setReleaseDate(releaseDateField.getValue());
configurationService.save(releasePackage);
configurationService.deleteReleasePackageProjectVersionsForReleasePackage(releasePackage.getId());
for (CheckBox projectCheckbox : projectCheckboxes) {
if (projectCheckbox.getValue() == true) {
String projectId = (String) projectCheckbox.getData();
OptionGroup optionGroup = projectVersionOptionGroups.get(projectId);
String projectVersionId = (String) optionGroup.getValue();
Rppv rppv = new Rppv(releasePackage.getId(), projectVersionId);
configurationService.save(rppv);
}
}
listener.updated(releasePackage);
close();
}
}
示例3: getValue
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
@Override
public String getValue()
{
String value = "";
int i = 1;
for (CheckBox box : boxes)
{
if (box.getValue())
{
if (value.length() > 0)
{
value += ",";
}
value += i;
}
i++;
}
return value;
}
示例4: valueChange
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
@Override
public void valueChange(final ValueChangeEvent event)
{
final CheckBox property = (CheckBox) event.getProperty();
final Boolean value = property.getValue();
if (property == ContactView.this.primaryPhone1 && value == true)
{
ContactView.this.primaryPhone2.setValue(false);
ContactView.this.primaryPhone3.setValue(false);
}
else if (property == ContactView.this.primaryPhone2 && value == true)
{
ContactView.this.primaryPhone1.setValue(false);
ContactView.this.primaryPhone3.setValue(false);
}
else if (property == ContactView.this.primaryPhone3 && value == true)
{
ContactView.this.primaryPhone2.setValue(false);
ContactView.this.primaryPhone1.setValue(false);
}
}
示例5: valueChange
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
@Override
public void valueChange(final ValueChangeEvent event)
{
final CheckBox property = (CheckBox) event.getProperty();
final Boolean value = property.getValue();
if (value != null)
{
if (property == OrganisationView.this.primaryPhone1 && value == true)
{
OrganisationView.this.primaryPhone2.setValue(false);
OrganisationView.this.primaryPhone3.setValue(false);
}
else if (property == OrganisationView.this.primaryPhone2 && value == true)
{
OrganisationView.this.primaryPhone1.setValue(false);
OrganisationView.this.primaryPhone3.setValue(false);
}
else if (property == OrganisationView.this.primaryPhone3 && value == true)
{
OrganisationView.this.primaryPhone2.setValue(false);
OrganisationView.this.primaryPhone1.setValue(false);
}
}
}
示例6: getViewPermissions
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
public List<Permission> getViewPermissions() {
List<Permission> list = new ArrayList<>();
for (Object id : accessTable.getItemIds()){
Role role = (Role) id;
Item item = accessTable.getItem(id);
CheckBox checkBox = (CheckBox) item.getItemProperty("canView").getValue();
if (checkBox.getValue()){
list.add(Permission.create(null, role, Permission.PERMISSION.VIEW));
}
}
return list;
}
示例7: valueChange
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
@Override
public void valueChange(final ValueChangeEvent event) {
if (!(event.getProperty() instanceof CheckBox)) {
return;
}
notifyConfigurationChanged();
final CheckBox checkBox = (CheckBox) event.getProperty();
BooleanConfigurationItem configurationItem;
if (gatewaySecTokenCheckBox.equals(checkBox)) {
configurationItem = gatewaySecurityTokenAuthenticationConfigurationItem;
} else if (targetSecTokenCheckBox.equals(checkBox)) {
configurationItem = targetSecurityTokenAuthenticationConfigurationItem;
} else if (certificateAuthCheckbox.equals(checkBox)) {
configurationItem = certificateAuthenticationConfigurationItem;
} else if (downloadAnonymousCheckBox.equals(checkBox)) {
configurationItem = anonymousDownloadAuthenticationConfigurationItem;
} else {
return;
}
if (checkBox.getValue()) {
configurationItem.configEnable();
} else {
configurationItem.configDisable();
}
}
示例8: projectSelectionListener
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
protected void projectSelectionListener(ValueChangeEvent event) {
CheckBox checkbox = (CheckBox) event.getProperty();
String projectId = (String) checkbox.getData();
OptionGroup optionGroup = projectVersionOptionGroups.get(projectId);
if (checkbox.getValue() == false) {
optionGroup.clear();
optionGroup.setEnabled(false);
} else {
@SuppressWarnings("unchecked")
Collection<String> projectVersionIds = (Collection<String>) optionGroup.getItemIds();
Iterator<String> itr = projectVersionIds.iterator();
optionGroup.select(itr.next());
optionGroup.setEnabled(true);
}
}
示例9: filter
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
/**
* Performs filtering.
* @param column Column to be filtered
* @param tf first TextField in the filter
* @param tf2 second TextField in the filter (for dates)
* @param caseSensitiveCheckBox
* @param onlyMatchPrefixCheckBox
*/
@SuppressWarnings("unchecked")
public void filter(Object column, TextField tf, TextField tf2, CheckBox caseSensitiveCheckBox, CheckBox onlyMatchPrefixCheckBox) {
DefaultHbnContainer<T> container = ((DefaultHbnContainer<T>) table.getContainerDataSource());
container.removeContainerFilters(column);
if(tf != null && tf.toString() != null && !tf.toString().isEmpty() && !tf.toString().equals(column.toString())) {
boolean ignoreCase = ! (Boolean) caseSensitiveCheckBox.getValue();
boolean onlyMatchPrefix = (Boolean) onlyMatchPrefixCheckBox.getValue();
container.addContainerFilter(column, tf.getValue().toString(), tf2.getValue() == null ? "" : tf2.getValue().toString(), ignoreCase, onlyMatchPrefix);
}
showCount();
}
示例10: guardarConsolidado
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
protected void guardarConsolidado()
{
// Collect the results of the iteration into this string.
String items = "";
ResultadoAprendizajeBO resultadoBO;
NivelDeConocimientoBO nivelBO;
List<ResultadoAprendizajeBO> listaResultadoAprendizajeBOs=new ArrayList<ResultadoAprendizajeBO>();
// Iterate over the item identifiers of the table.
for (Iterator i = this.tablaConsolidado.getItemIds().iterator(); i.hasNext();) {
// Get the current item identifier, which is an integer.
TemaBO iid = (TemaBO) i.next();
// Now get the actual item from the table.
Item item = this.tablaConsolidado.getItem(iid);
// And now we can get to the actual checkbox object.
CheckBox cb = (CheckBox)(item.getItemProperty("Seleccione").getValue());
// If the checkbox is selected.
if ((Boolean)cb.getValue() == true) {
// Do something with the selected item; collect the
// first names in a string.
resultadoBO=new ResultadoAprendizajeBO();
nivelBO=new NivelDeConocimientoBO();
//int nivel = Integer.parseInt((String) item.getItemProperty("Nivel de Conocimiento Resultante").getValue());
ComboBox elCb = (ComboBox) item.getItemProperty("Nivel de Conocimiento Resultante").getValue();
int nivel = (int)elCb.getValue();
nivelBO.setId(nivel);
resultadoBO.setNivelDeConocimiento(nivelBO);
//resultadoBO.setTema((TemaBO) item.getItemProperty("Numeral").getValue());
resultadoBO.setTema(iid);
listaResultadoAprendizajeBOs.add(resultadoBO);
}
}
ControladorPropietario.getInstance().guardarResultadosAprendizaje(listaResultadoAprendizajeBOs);
}
示例11: isMandatoryModuleType
import com.vaadin.ui.CheckBox; //導入方法依賴的package包/類
private static boolean isMandatoryModuleType(final Item item) {
final CheckBox mandatoryCheckBox = (CheckBox) item.getItemProperty(DIST_TYPE_MANDATORY).getValue();
return mandatoryCheckBox.getValue();
}