use of com.vaadin.ui.CheckBox in project Activiti by Activiti.
the class AccountSelectionPopup method initImapComponent.
protected void initImapComponent() {
imapForm = new Form();
imapForm.setDescription(i18nManager.getMessage(Messages.IMAP_DESCRIPTION));
final TextField imapServer = new TextField(i18nManager.getMessage(Messages.IMAP_SERVER));
imapForm.getLayout().addComponent(imapServer);
final TextField imapPort = new TextField(i18nManager.getMessage(Messages.IMAP_PORT));
imapPort.setWidth(30, UNITS_PIXELS);
// Default imap port (non-ssl)
imapPort.setValue(143);
imapForm.getLayout().addComponent(imapPort);
final CheckBox useSSL = new CheckBox(i18nManager.getMessage(Messages.IMAP_SSL));
useSSL.setValue(false);
useSSL.setImmediate(true);
imapForm.getLayout().addComponent(useSSL);
useSSL.addListener(new ValueChangeListener() {
public void valueChange(ValueChangeEvent event) {
imapPort.setValue(((Boolean) useSSL.getValue()) ? 993 : 143);
}
});
final TextField imapUserName = new TextField(i18nManager.getMessage(Messages.IMAP_USERNAME));
imapForm.getLayout().addComponent(imapUserName);
final PasswordField imapPassword = new PasswordField(i18nManager.getMessage(Messages.IMAP_PASSWORD));
imapForm.getLayout().addComponent(imapPassword);
// Matching listener
imapClickListener = new ClickListener() {
public void buttonClick(ClickEvent event) {
Map<String, Object> accountDetails = createAccountDetails("imap", imapUserName.getValue().toString(), imapPassword.getValue().toString(), "server", imapServer.getValue().toString(), "port", imapPort.getValue().toString(), "ssl", imapPort.getValue().toString());
fireEvent(new SubmitEvent(AccountSelectionPopup.this, SubmitEvent.SUBMITTED, accountDetails));
}
};
}
use of com.vaadin.ui.CheckBox in project Activiti by Activiti.
the class TaskTable method getSteps.
public List<HumanStepDefinition> getSteps() {
List<HumanStepDefinition> steps = new ArrayList<HumanStepDefinition>();
for (Object itemId : getItemIds()) {
Item item = getItem(itemId);
HumanStepDefinition humanStepDefinition = new HumanStepDefinition();
String name = (String) item.getItemProperty(ID_NAME).getValue();
if (name != null && name.length() > 0) {
humanStepDefinition.setName(name);
}
String assignee = (String) ((ComboBox) item.getItemProperty(ID_ASSIGNEE).getValue()).getValue();
if (assignee != null && assignee.length() > 0) {
humanStepDefinition.setAssignee(assignee);
}
String groups = (String) ((ComboBox) item.getItemProperty("groups").getValue()).getValue();
List<String> candidateGroups = new ArrayList<String>();
if (groups != null && groups.length() > 0) {
for (String group : groups.split(",")) {
candidateGroups.add(group.trim());
}
}
humanStepDefinition.setCandidateGroups(candidateGroups);
String description = (String) ((TextField) item.getItemProperty(ID_DESCRIPTION).getValue()).getValue();
if (description != null && description.length() > 0) {
humanStepDefinition.setDescription(description);
}
humanStepDefinition.setStartsWithPrevious((boolean) ((CheckBox) item.getItemProperty(ID_START_WITH_PREVIOUS).getValue()).booleanValue());
FormDefinition formDefinition = taskFormModel.getForm(itemId);
humanStepDefinition.setForm(formDefinition);
steps.add(humanStepDefinition);
}
return steps;
}
use of com.vaadin.ui.CheckBox in project Activiti by Activiti.
the class ChangeProcessSuspensionStatePopupWindow method addIncludeProcessInstancesSection.
protected void addIncludeProcessInstancesSection(boolean suspend) {
verticalLayout.addComponent(new Label(" ", Label.CONTENT_XHTML));
verticalLayout.addComponent(new Label(" ", 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);
}
use of com.vaadin.ui.CheckBox in project Activiti by Activiti.
the class BooleanFormPropertyRenderer method getPropertyField.
@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;
}
Aggregations