Example usage for com.vaadin.ui CheckBox CheckBox

List of usage examples for com.vaadin.ui CheckBox CheckBox

Introduction

In this page you can find the example usage for com.vaadin.ui CheckBox CheckBox.

Prototype

public CheckBox() 

Source Link

Document

Creates a new checkbox.

Usage

From source file:org.apache.openaz.xacml.admin.view.windows.ApplyEditorWindow.java

License:Apache License

@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // textAreaDescription
    textAreaDescription = new TextArea();
    textAreaDescription.setCaption("Enter A Description");
    textAreaDescription.setImmediate(false);
    textAreaDescription.setWidth("50.0%");
    textAreaDescription.setHeight("-1px");
    horizontalLayout_1.addComponent(textAreaDescription);

    // textFieldFilter
    textFieldFilter = new TextField();
    textFieldFilter.setCaption("Filter Function By ID");
    textFieldFilter.setImmediate(false);
    textFieldFilter.setWidth("-1px");
    textFieldFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(textFieldFilter);
    horizontalLayout_1.setComponentAlignment(textFieldFilter, new Alignment(9));

    // comboBoxDatatypeFilter
    comboBoxDatatypeFilter = new ComboBox();
    comboBoxDatatypeFilter.setCaption("Filter By Data Type");
    comboBoxDatatypeFilter.setImmediate(false);
    comboBoxDatatypeFilter.setWidth("-1px");
    comboBoxDatatypeFilter.setHeight("-1px");
    horizontalLayout_1.addComponent(comboBoxDatatypeFilter);
    horizontalLayout_1.setComponentAlignment(comboBoxDatatypeFilter, new Alignment(9));

    // checkBoxFilterIsBag
    checkBoxFilterIsBag = new CheckBox();
    checkBoxFilterIsBag.setCaption("Is Bag Filter");
    checkBoxFilterIsBag.setImmediate(false);
    checkBoxFilterIsBag.setWidth("-1px");
    checkBoxFilterIsBag.setHeight("-1px");
    horizontalLayout_1.addComponent(checkBoxFilterIsBag);
    horizontalLayout_1.setComponentAlignment(checkBoxFilterIsBag, new Alignment(9));

    return horizontalLayout_1;
}

From source file:org.apache.openaz.xacml.admin.view.windows.AttributeSelectionWindow.java

License:Apache License

@AutoGenerated
private VerticalLayout buildVerticalLayout_2() {
    // common part: create layout
    verticalLayout_2 = new VerticalLayout();
    verticalLayout_2.setImmediate(false);
    verticalLayout_2.setWidth("-1px");
    verticalLayout_2.setHeight("-1px");
    verticalLayout_2.setMargin(true);//from   ww w .j  ava 2  s . c  o  m
    verticalLayout_2.setSpacing(true);

    // textFieldIssuer
    textFieldIssuer = new TextField();
    textFieldIssuer.setCaption("Issuer");
    textFieldIssuer.setImmediate(false);
    textFieldIssuer.setWidth("-1px");
    textFieldIssuer.setHeight("-1px");
    verticalLayout_2.addComponent(textFieldIssuer);

    // checkBoxMustBePresent
    checkBoxMustBePresent = new CheckBox();
    checkBoxMustBePresent.setCaption("Attribute Must Be Present");
    checkBoxMustBePresent.setImmediate(false);
    checkBoxMustBePresent.setWidth("-1px");
    checkBoxMustBePresent.setHeight("-1px");
    verticalLayout_2.addComponent(checkBoxMustBePresent);

    return verticalLayout_2;
}

From source file:org.apache.openaz.xacml.admin.view.windows.ExpressionBuilderComponent.java

License:Apache License

@AutoGenerated
private HorizontalLayout buildHorizontalLayout_1() {
    // common part: create layout
    horizontalLayout_1 = new HorizontalLayout();
    horizontalLayout_1.setImmediate(false);
    horizontalLayout_1.setWidth("-1px");
    horizontalLayout_1.setHeight("-1px");
    horizontalLayout_1.setMargin(false);
    horizontalLayout_1.setSpacing(true);

    // buttonAddExpression
    buttonAddExpression = new Button();
    buttonAddExpression.setCaption("Add Expression");
    buttonAddExpression.setImmediate(true);
    buttonAddExpression.setWidth("-1px");
    buttonAddExpression.setHeight("-1px");
    horizontalLayout_1.addComponent(buttonAddExpression);

    // buttonDeleteExpression
    buttonDeleteExpression = new Button();
    buttonDeleteExpression.setCaption("Delete Expression");
    buttonDeleteExpression.setImmediate(true);
    buttonDeleteExpression.setWidth("-1px");
    buttonDeleteExpression.setHeight("-1px");
    horizontalLayout_1.addComponent(buttonDeleteExpression);

    // buttonClearAll
    buttonClearAll = new Button();
    buttonClearAll.setCaption("Clear All");
    buttonClearAll.setImmediate(true);/*  w w w. j a  v a2s  .com*/
    buttonClearAll.setDescription("Clears all the expressions.");
    buttonClearAll.setWidth("-1px");
    buttonClearAll.setHeight("-1px");
    horizontalLayout_1.addComponent(buttonClearAll);

    // checkBoxShortName
    checkBoxShortName = new CheckBox();
    checkBoxShortName.setCaption("Display Short XACML ID's");
    checkBoxShortName.setImmediate(false);
    checkBoxShortName.setDescription(
            "If checked, the right-most string of the function and datatype URI's will only be displayed.");
    checkBoxShortName.setWidth("-1px");
    checkBoxShortName.setHeight("-1px");
    horizontalLayout_1.addComponent(checkBoxShortName);

    return horizontalLayout_1;
}

From source file:org.apache.openaz.xacml.admin.view.windows.PIPSQLResolverEditorWindow.java

License:Apache License

@AutoGenerated
private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);/*from w w w  .  jav a  2s  .  co m*/
    mainLayout.setWidth("-1px");
    mainLayout.setHeight("-1px");
    mainLayout.setMargin(true);
    mainLayout.setSpacing(true);

    // top-level component properties
    setWidth("-1px");
    setHeight("-1px");

    // textAreaSelect
    textAreaSelect = new TextArea();
    textAreaSelect.setCaption("SQL Select Statement");
    textAreaSelect.setImmediate(false);
    textAreaSelect.setWidth("100.0%");
    textAreaSelect.setHeight("-1px");
    textAreaSelect.setInvalidAllowed(false);
    textAreaSelect.setRequired(true);
    mainLayout.addComponent(textAreaSelect);
    mainLayout.setExpandRatio(textAreaSelect, 1.0f);

    // textFieldBase
    textFieldBase = new TextField();
    textFieldBase.setCaption("Base DN");
    textFieldBase.setImmediate(false);
    textFieldBase.setWidth("-1px");
    textFieldBase.setHeight("-1px");
    mainLayout.addComponent(textFieldBase);

    // textFieldFilter
    textFieldFilter = new TextField();
    textFieldFilter.setCaption("Filter");
    textFieldFilter.setImmediate(false);
    textFieldFilter.setWidth("-1px");
    textFieldFilter.setHeight("-1px");
    mainLayout.addComponent(textFieldFilter);

    // checkBoxShortIds
    checkBoxShortIds = new CheckBox();
    checkBoxShortIds.setCaption("Display short ids.");
    checkBoxShortIds.setImmediate(false);
    checkBoxShortIds.setWidth("-1px");
    checkBoxShortIds.setHeight("-1px");
    mainLayout.addComponent(checkBoxShortIds);

    // tableRequiredAttributes
    tableRequiredAttributes = new Table();
    tableRequiredAttributes.setCaption("Attributes Returned");
    tableRequiredAttributes.setImmediate(false);
    tableRequiredAttributes.setWidth("-1px");
    tableRequiredAttributes.setHeight("-1px");
    mainLayout.addComponent(tableRequiredAttributes);

    // tableAttributes
    tableAttributes = new Table();
    tableAttributes.setCaption("Parameters - Attributes Needed (i.e. ?)");
    tableAttributes.setImmediate(false);
    tableAttributes.setWidth("-1px");
    tableAttributes.setHeight("-1px");
    tableAttributes.setInvalidAllowed(false);
    tableAttributes.setRequired(true);
    mainLayout.addComponent(tableAttributes);

    return mainLayout;
}

From source file:org.apache.openaz.xacml.admin.view.windows.PolicyUploadWindow.java

License:Apache License

@AutoGenerated
private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);/*from w w  w  . ja  va2  s  . c o m*/
    mainLayout.setWidth("-1px");
    mainLayout.setHeight("-1px");
    mainLayout.setMargin(true);
    mainLayout.setSpacing(true);

    // top-level component properties
    setWidth("-1px");
    setHeight("-1px");

    // upload
    upload = new Upload();
    upload.setCaption("Upload Xacml Policy File");
    upload.setImmediate(false);
    upload.setWidth("-1px");
    upload.setHeight("-1px");
    mainLayout.addComponent(upload);

    // checkBoxImportAttributes
    checkBoxImportAttributes = new CheckBox();
    checkBoxImportAttributes.setCaption("Import attributes into attribute dictionary.");
    checkBoxImportAttributes.setImmediate(false);
    checkBoxImportAttributes.setWidth("-1px");
    checkBoxImportAttributes.setHeight("-1px");
    mainLayout.addComponent(checkBoxImportAttributes);

    // checkBoxIgnoreStandard
    checkBoxIgnoreStandard = new CheckBox();
    checkBoxIgnoreStandard.setCaption("Ignore Standard Attributes");
    checkBoxIgnoreStandard.setImmediate(false);
    checkBoxIgnoreStandard.setWidth("-1px");
    checkBoxIgnoreStandard.setHeight("-1px");
    mainLayout.addComponent(checkBoxIgnoreStandard);
    mainLayout.setComponentAlignment(checkBoxIgnoreStandard, new Alignment(20));

    // checkBoxImportObligations
    checkBoxImportObligations = new CheckBox();
    checkBoxImportObligations.setCaption("Import obligations into obligation dictionary.");
    checkBoxImportObligations.setImmediate(false);
    checkBoxImportObligations.setWidth("-1px");
    checkBoxImportObligations.setHeight("-1px");
    mainLayout.addComponent(checkBoxImportObligations);

    // checkBoxImportAdvice
    checkBoxImportAdvice = new CheckBox();
    checkBoxImportAdvice.setCaption("Import advice into advice dictionary.");
    checkBoxImportAdvice.setImmediate(false);
    checkBoxImportAdvice.setWidth("-1px");
    checkBoxImportAdvice.setHeight("-1px");
    mainLayout.addComponent(checkBoxImportAdvice);

    return mainLayout;
}

From source file:org.bubblecloud.ilves.ui.user.privilege.PrivilegesFlowlet.java

License:Apache License

private void refreshGroupMatrix() {
    final EntityManager entityManager = Site.getCurrent().getSiteContext().getObject(EntityManager.class);
    final Company company = Site.getCurrent().getSiteContext().getObject(Company.class);

    if (groupMatrix != null) {
        matrixLayout.removeComponent(groupMatrix);
    }/*www.  j  av  a 2  s.  c  om*/
    final List<Group> groups = UserDao.getGroups(entityManager, company);

    groupCheckBoxes = new CheckBox[privilegeKeys.length * groups.size()];
    groupMatrix = new GridLayout(privilegeKeys.length + 1, groups.size() + 1);
    matrixLayout.addComponent(groupMatrix);
    for (int i = 0; i < groupCheckBoxes.length; i++) {
        groupCheckBoxes[i] = new CheckBox();
        groupCheckBoxes[i].setImmediate(true);
        groupCheckBoxes[i].addValueChangeListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(Property.ValueChangeEvent event) {
                dirty = true;
                saveButton.setEnabled(true);
                discardButton.setEnabled(true);
            }
        });
    }

    groupMatrix.addComponent(new Label("<b>" + getSite().localize("label-group") + "</b>", ContentMode.HTML), 0,
            0);

    for (int j = 0; j < groups.size(); j++) {
        final Label label = new Label(groups.get(j).getDescription());
        label.setWidth(200, Unit.PIXELS);
        groupMatrix.addComponent(label, 0, j + 1);
    }

    for (int i = 0; i < privilegeKeys.length; i++) {
        final Label label = new Label("<b>" + getSite().localize("privilege-" + privilegeKeys[i]) + "</b>",
                ContentMode.HTML);
        label.setWidth(50, Unit.PIXELS);
        groupMatrix.addComponent(label, i + 1, 0);
    }

    for (int i = 0; i < privilegeKeys.length; i++) {
        for (int j = 0; j < groups.size(); j++) {
            final int checkBoxIndex = i + j * privilegeKeys.length;
            groupMatrix.addComponent(groupCheckBoxes[checkBoxIndex], i + 1, j + 1);
            groupCheckBoxes[checkBoxIndex].setValue(
                    UserDao.hasGroupPrivilege(entityManager, groups.get(j), privilegeKeys[i], dataId));
        }
    }
    dirty = false;
    saveButton.setEnabled(false);
    discardButton.setEnabled(false);
}

From source file:org.bubblecloud.ilves.ui.user.privilege.PrivilegesFlowlet.java

License:Apache License

private void refreshUserMatrix() {
    final EntityManager entityManager = Site.getCurrent().getSiteContext().getObject(EntityManager.class);
    final Company company = Site.getCurrent().getSiteContext().getObject(Company.class);

    if (userMatrix != null) {
        matrixLayout.removeComponent(userMatrix);
    }//from  w ww  .j av  a  2 s . c  om
    final List<User> users = UserDao.getUsers(entityManager, company);

    userCheckBoxes = new CheckBox[privilegeKeys.length * users.size()];
    userMatrix = new GridLayout(privilegeKeys.length + 1, users.size() + 1);
    matrixLayout.addComponent(userMatrix);
    for (int i = 0; i < userCheckBoxes.length; i++) {
        userCheckBoxes[i] = new CheckBox();
        userCheckBoxes[i].setImmediate(true);
        userCheckBoxes[i].addValueChangeListener(new Property.ValueChangeListener() {
            @Override
            public void valueChange(Property.ValueChangeEvent event) {
                dirty = true;
                saveButton.setEnabled(true);
                discardButton.setEnabled(true);
            }
        });
    }

    userMatrix.addComponent(new Label("<b>" + getSite().localize("label-user") + "</b>", ContentMode.HTML), 0,
            0);

    for (int j = 0; j < users.size(); j++) {
        final Label label = new Label(users.get(j).getLastName() + " " + users.get(j).getFirstName());
        label.setWidth(200, Unit.PIXELS);
        userMatrix.addComponent(label, 0, j + 1);
    }

    for (int i = 0; i < privilegeKeys.length; i++) {
        final Label label = new Label("<b>" + getSite().localize("privilege-" + privilegeKeys[i]) + "</b>",
                ContentMode.HTML);
        label.setWidth(50, Unit.PIXELS);
        userMatrix.addComponent(label, i + 1, 0);
    }

    for (int i = 0; i < privilegeKeys.length; i++) {
        for (int j = 0; j < users.size(); j++) {
            final int checkBoxIndex = i + j * privilegeKeys.length;
            userMatrix.addComponent(userCheckBoxes[checkBoxIndex], i + 1, j + 1);
            userCheckBoxes[checkBoxIndex]
                    .setValue(UserDao.hasUserPrivilege(entityManager, users.get(j), privilegeKeys[i], dataId));
        }
    }
    dirty = false;
    saveButton.setEnabled(false);
    discardButton.setEnabled(false);
}

From source file:org.eclipse.emf.ecp.controls.vaadin.internal.BooleanControlVaadinRenderer.java

License:Open Source License

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

From source file:org.eclipse.hawkbit.ui.distributions.disttype.CreateUpdateDistSetTypeLayout.java

License:Open Source License

@SuppressWarnings("unchecked")
private void getSelectedTableItemData(final Long id) {

    Item saveTblitem;//  ww  w. j av  a2s  . c o  m
    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();
        window.updateAllComponents(mandatoryCheckBox);
        saveTblitem.getItemProperty(DIST_TYPE_MANDATORY).setValue(mandatoryCheckBox);
        saveTblitem.getItemProperty(DIST_TYPE_DESCRIPTION).setValue(sourceTable.getContainerDataSource()
                .getItem(id).getItemProperty(DIST_TYPE_DESCRIPTION).getValue());
    }
}

From source file:org.eclipse.hawkbit.ui.distributions.disttype.DistributionSetTypeSoftwareModuleSelectLayout.java

License:Open Source License

@SuppressWarnings("unchecked")
private void getSelectedTableItemData(final Long id) {
    Item saveTblitem;//ww  w . j av  a2 s.c  o m
    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());
    }
}