Example usage for com.google.gwt.user.client.ui ValueLabel ValueLabel

List of usage examples for com.google.gwt.user.client.ui ValueLabel ValueLabel

Introduction

In this page you can find the example usage for com.google.gwt.user.client.ui ValueLabel ValueLabel.

Prototype

@UiConstructor
public ValueLabel(Renderer<? super T> renderer) 

Source Link

Document

Creates an empty value label.

Usage

From source file:com.google.gerrit.client.admin.PermissionEditor.java

License:Apache License

public PermissionEditor(Project.NameKey projectName, boolean readOnly, AccessSection section,
        LabelTypes labelTypes) {//  w  ww  .  j  av a  2  s . c om
    this.readOnly = readOnly;
    this.section = section;
    this.projectName = projectName;
    this.labelTypes = labelTypes;

    normalName = new ValueLabel<String>(PermissionNameRenderer.INSTANCE);
    deletedName = new ValueLabel<String>(PermissionNameRenderer.INSTANCE);

    initWidget(uiBinder.createAndBindUi(this));
    groupToAdd.setProject(projectName);
    rules = ListEditor.of(new RuleEditorSource());

    exclusiveGroup.setEnabled(!readOnly);
    exclusiveGroup.setVisible(RefConfigSection.isValid(section.getName()));

    if (readOnly) {
        addContainer.removeFromParent();
        addContainer = null;

        deletePermission.removeFromParent();
        deletePermission = null;
    }
}