Example usage for com.vaadin.ui Label Label

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

Introduction

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

Prototype

public Label() 

Source Link

Document

Creates an empty Label.

Usage

From source file:ch.bfh.ti.soed.hs16.srs.red.ui.views.MyReservationView.java

License:Open Source License

public MyReservationView(Navigator nav) {

    /*---------------------------------
    initialize objects//from w  w  w.ja v  a  2  s.  c o  m
    ---------------------------------*/
    this.root = new VerticalLayout();
    this.subWindowReservation = new Window();

    this.navigation = new Menu(nav);
    this.labelWelcome = new Label();
    this.error = new Label();
    this.calendarWeek = new Calendar();
    this.buttonAddRes = new Button("add Reservation", this::buttonAddReservation); //handle event in method addReservation
    this.contentSubWindow = new SubWindowReservation();
    this.saveButton = contentSubWindow.getButtonSave();
    this.deleteButton = contentSubWindow.getButtonDelete();

    this.reservationController = new ReservationController();
    this.userController = new UserController();
    this.roomController = new RoomController();

    /*---------------------------------
    specialize objects
    ---------------------------------*/
    calendarWeek.setFirstDayOfWeek(GregorianCalendar.MONDAY);
    saveButton.addClickListener(this::buttonSave);
    deleteButton.addClickListener(this::buttonDelete);

    List<Room> rooms = roomController.getAllRooms();
    for (int i = 0; i < rooms.size(); i++) {
        contentSubWindow.getRooms().addItem(rooms.get(i).getId() + " " + rooms.get(i).getName());
    }

    /*---------------------------------
    add style names
    ---------------------------------*/
    calendarWeek.setPrimaryStyleName("calendarWeek");

    /*-------------------------------
    add components to root
    --------------------------------*/
    Layout layoutMenu = navigation.getMenu();
    root.addComponents(layoutMenu, labelWelcome, error, buttonAddRes, calendarWeek);
    setCompositionRoot(root);

    /*-------------------------------
    double click on calendar events
    --------------------------------*/
    calendarWeek.setHandler((CalendarComponentEvents.EventClickHandler) event -> {
        addSubWindowToRoot(event);
    });

}

From source file:ch.bfh.ti.soed.hs16.srs.white.view.RegistrationView.java

License:Open Source License

public RegistrationView(AbstractView lastView) {
    super(lastView);
    fieldFirstName = new TextField("First Name");
    fieldLastName = new TextField("Last Name");
    fieldEmail = new TextField("E-Mail Address");
    fieldConfirmEmail = new TextField("Repeat E-Mail Address");
    fieldPassword = new PasswordField("Password");
    fieldConfirmPassword = new PasswordField("Repeat Password");
    btnSubmit = new Button("Submit");
    btnCancel = new Button("Cancel");
    labelMessage = new Label();
    loadController();//from www. j  a v a  2  s . c  o  m
}

From source file:ch.bfh.ti.soed.hs16.srs.white.view.subviews.CustomMenuItem.java

License:Open Source License

public CustomMenuItem(String caption, String icon) {
    this.setStyleName("menu-item");

    if (icon == null || icon.isEmpty()) {
        icon = "no-icon";
    }/*from  w w  w.  j  av a2s.  c om*/

    StringBuilder iconStyle = new StringBuilder("menu-item-icon").append("-").append(icon);
    Label imageIcon = new Label();
    imageIcon.setStyleName(iconStyle.toString());

    Label itemCaption = new Label(caption);
    itemCaption.setStyleName("menu-item-caption");
    itemCaption.setWidthUndefined();

    this.addComponents(imageIcon, itemCaption);
}

From source file:ch.vorburger.vaadin.designer.samplescreen.SampleFixedScreenComponent.java

License:Apache License

@AutoGenerated
private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);/*from w w w  .  ja  v a2s  . co  m*/
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    mainLayout.setMargin(false);

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    screenTitle = new Label();
    screenTitle.setImmediate(false);
    screenTitle.setWidth("-1px");
    screenTitle.setHeight("-1px");
    mainLayout.addComponent(screenTitle);

    // tabSheet
    tabSheet = buildTabSheet();
    mainLayout.addComponent(tabSheet);
    mainLayout.setExpandRatio(tabSheet, 1.0f);

    return mainLayout;
}

From source file:co.edu.icesi.academ.client.perfiles.administrador.PanelAlcance.java

License:Open Source License

@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);//from w  ww  . j av  a  2  s  .  c o  m
    mainLayout.setWidth("840px");
    mainLayout.setHeight("440px");

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

    // label_4
    label_4 = new Label();
    label_4.setImmediate(false);
    label_4.setWidth("-1px");
    label_4.setHeight("-1px");
    label_4.setValue("Competencias");
    mainLayout.addComponent(label_4, "top:220.0px;left:23.0px;");

    // button_guardarAlcance
    button_guardarAlcance = new Button();
    button_guardarAlcance.setCaption("Guardar Alcance");
    button_guardarAlcance.setImmediate(true);
    button_guardarAlcance.setWidth("-1px");
    button_guardarAlcance.setHeight("-1px");
    mainLayout.addComponent(button_guardarAlcance, "top:20.0px;left:20.0px;");

    // table_bloques
    table_bloques = new Table();
    table_bloques.setImmediate(false);
    table_bloques.setWidth("260px");
    table_bloques.setHeight("120px");
    mainLayout.addComponent(table_bloques, "top:60.0px;left:20.0px;");

    // tableMaterias
    tableMaterias = new Table();
    tableMaterias.setImmediate(false);
    tableMaterias.setWidth("520px");
    tableMaterias.setHeight("120px");
    mainLayout.addComponent(tableMaterias, "top:60.0px;left:300.0px;");

    // tableResultadoAlcance
    tableResultadoAlcance = new Table();
    tableResultadoAlcance.setImmediate(false);
    tableResultadoAlcance.setWidth("800px");
    tableResultadoAlcance.setHeight("140px");
    mainLayout.addComponent(tableResultadoAlcance, "top:300.0px;left:20.0px;");

    // tableCompetencias
    tableCompetencias = new Table();
    tableCompetencias.setCaption("Resultados aprendizaje");
    tableCompetencias.setImmediate(false);
    tableCompetencias.setWidth("700px");
    tableCompetencias.setHeight("80px");
    mainLayout.addComponent(tableCompetencias, "top:200.0px;left:120.0px;");

    return mainLayout;
}

From source file:co.edu.icesi.academ.client.perfiles.propietario.CrearCompetencia.java

License:Open Source License

@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);//from  w  w w.  jav  a 2 s .co  m
    mainLayout.setWidth("700px");
    mainLayout.setHeight("480px");

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

    // resutadoAprendizajeSelect
    resutadoAprendizajeSelect = new TwinColSelect();
    resutadoAprendizajeSelect.setImmediate(false);
    resutadoAprendizajeSelect.setWidth("100.0%");
    resutadoAprendizajeSelect.setHeight("-1px");
    mainLayout.addComponent(resutadoAprendizajeSelect, "top:60.0px;right:63.0px;left:80.0px;");

    // label_1
    label_1 = new Label();
    label_1.setImmediate(false);
    label_1.setWidth("229px");
    label_1.setHeight("-1px");
    label_1.setValue("Resultados de Aprendizaje Disponibles:");
    mainLayout.addComponent(label_1, "top:20.0px;left:80.0px;");

    // label_2
    label_2 = new Label();
    label_2.setImmediate(false);
    label_2.setWidth("229px");
    label_2.setHeight("-1px");
    label_2.setValue("Resultados de Aprendizaje Asociados:");
    mainLayout.addComponent(label_2, "top:20.0px;left:380.0px;");

    // label_3
    label_3 = new Label();
    label_3.setImmediate(false);
    label_3.setWidth("89px");
    label_3.setHeight("18px");
    label_3.setValue("Competencia:");
    mainLayout.addComponent(label_3, "top:222.0px;left:80.0px;");

    // btGuardarCompetencia
    btGuardarCompetencia = new NativeButton();
    btGuardarCompetencia.setCaption("Guardar");
    btGuardarCompetencia.setImmediate(true);
    btGuardarCompetencia.setWidth("-1px");
    btGuardarCompetencia.setHeight("-1px");
    mainLayout.addComponent(btGuardarCompetencia, "top:418.0px;left:566.0px;");

    // textDescripcion
    textDescripcion = new TextArea();
    textDescripcion.setImmediate(false);
    textDescripcion.setWidth("560px");
    textDescripcion.setHeight("140px");
    textDescripcion.setMaxLength(100);
    mainLayout.addComponent(textDescripcion, "top:260.0px;left:80.0px;");

    return mainLayout;
}

From source file:co.edu.icesi.academ.client.perfiles.propietario.DialogoEditarRubrica.java

License:Open Source License

@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);//from  w  w  w  . ja va2  s .  c  o  m
    mainLayout.setWidth("440px");
    mainLayout.setHeight("561px");

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

    // lblCriterios
    lblCriterios = new Label();
    lblCriterios.setImmediate(false);
    lblCriterios.setWidth("-1px");
    lblCriterios.setHeight("-1px");
    lblCriterios.setValue("Criterios:");
    mainLayout.addComponent(lblCriterios, "top:20.0px;left:20.0px;");

    // lblNiveles
    lblNiveles = new Label();
    lblNiveles.setImmediate(false);
    lblNiveles.setWidth("-1px");
    lblNiveles.setHeight("-1px");
    lblNiveles.setValue("Niveles:");
    mainLayout.addComponent(lblNiveles, "top:264.0px;left:20.0px;");

    // btnCrearCriterio
    btnCrearCriterio = new Button();
    btnCrearCriterio.setCaption("Crear Criterio");
    btnCrearCriterio.setImmediate(true);
    btnCrearCriterio.setWidth("-1px");
    btnCrearCriterio.setHeight("-1px");
    mainLayout.addComponent(btnCrearCriterio, "top:54.0px;left:19.0px;");

    // btnCrearNivel
    btnCrearNivel = new Button();
    btnCrearNivel.setCaption("Crear Nivel");
    btnCrearNivel.setImmediate(true);
    btnCrearNivel.setWidth("-1px");
    btnCrearNivel.setHeight("-1px");
    mainLayout.addComponent(btnCrearNivel, "top:300.0px;left:19.0px;");

    // tblNiveles
    tblNiveles = new Table();
    tblNiveles.setImmediate(false);
    tblNiveles.setWidth("401px");
    tblNiveles.setHeight("140px");
    mainLayout.addComponent(tblNiveles, "top:340.0px;left:19.0px;");

    // btnGuardar
    btnGuardar = new Button();
    btnGuardar.setCaption("Guardar");
    btnGuardar.setImmediate(true);
    btnGuardar.setWidth("-1px");
    btnGuardar.setHeight("-1px");
    mainLayout.addComponent(btnGuardar, "top:514.0px;left:350.0px;");

    // tblCriterios
    tblCriterios = new Table();
    tblCriterios.setImmediate(false);
    tblCriterios.setWidth("400px");
    tblCriterios.setHeight("140px");
    mainLayout.addComponent(tblCriterios, "top:100.0px;left:20.0px;");

    return mainLayout;
}

From source file:co.edu.icesi.academ.client.perfiles.propietario.PanelAsignarRolEvaluador.java

License:Open Source License

@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);/*  w ww . ja  v a 2s  . c  o m*/
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    // btnGuardar
    btnGuardar = new Button();
    btnGuardar.setCaption("Guardar");
    btnGuardar.setImmediate(true);
    btnGuardar.setWidth("-1px");
    btnGuardar.setHeight("-1px");
    mainLayout.addComponent(btnGuardar, "top:20.0px;left:10.0px;");

    // lblEvaluadores
    lblEvaluadores = new Label();
    lblEvaluadores.setImmediate(false);
    lblEvaluadores.setWidth("-1px");
    lblEvaluadores.setHeight("-1px");
    lblEvaluadores.setValue("Evaluadores:");
    mainLayout.addComponent(lblEvaluadores, "top:80.0px;left:30.0px;");

    // btnAgregar
    btnAgregar = new Button();
    btnAgregar.setCaption(">");
    btnAgregar.setImmediate(true);
    btnAgregar.setWidth("-1px");
    btnAgregar.setHeight("-1px");
    mainLayout.addComponent(btnAgregar, "top:160.0px;left:204.0px;");

    // btnRemover
    btnRemover = new Button();
    btnRemover.setCaption("<");
    btnRemover.setImmediate(true);
    btnRemover.setWidth("-1px");
    btnRemover.setHeight("-1px");
    mainLayout.addComponent(btnRemover, "top:234.0px;left:204.0px;");

    // lblRoles
    lblRoles = new Label();
    lblRoles.setImmediate(false);
    lblRoles.setWidth("-1px");
    lblRoles.setHeight("-1px");
    lblRoles.setValue("Roles:");
    mainLayout.addComponent(lblRoles, "top:80.0px;left:280.0px;");

    // tstRoles
    tstRoles = new TabSheet();
    tstRoles.setImmediate(false);
    tstRoles.setWidth("410px");
    tstRoles.setHeight("246px");
    mainLayout.addComponent(tstRoles, "top:114.0px;left:280.0px;");

    // lstEvaluadores
    lstEvaluadores = new ListSelect();
    lstEvaluadores.setImmediate(false);
    lstEvaluadores.setWidth("140px");
    lstEvaluadores.setHeight("246px");
    mainLayout.addComponent(lstEvaluadores, "top:114.0px;left:20.0px;");

    return mainLayout;
}

From source file:co.edu.icesi.academ.client.perfiles.propietario.PanelRubricas.java

License:Open Source License

@AutoGenerated
private AbsoluteLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new AbsoluteLayout();
    mainLayout.setImmediate(false);//  ww w . jav a 2  s  . c  o m
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    // lstResultados
    lstResultados = new ListSelect();
    lstResultados.setImmediate(false);
    lstResultados.setWidth("420px");
    lstResultados.setHeight("146px");
    mainLayout.addComponent(lstResultados, "top:100.0px;left:40.0px;");

    // lblResultados
    lblResultados = new Label();
    lblResultados.setImmediate(false);
    lblResultados.setWidth("-1px");
    lblResultados.setHeight("-1px");
    lblResultados.setValue("Resultados de aprendizaje:");
    mainLayout.addComponent(lblResultados, "top:22.0px;left:40.0px;");

    // btnCrear
    btnCrear = new Button();
    btnCrear.setCaption("Crear Rbria");
    btnCrear.setImmediate(false);
    btnCrear.setWidth("-1px");
    btnCrear.setHeight("-1px");
    mainLayout.addComponent(btnCrear, "top:60.0px;left:40.0px;");

    // btnEditar
    btnEditar = new Button();
    btnEditar.setCaption("Editar Rbrica");
    btnEditar.setImmediate(false);
    btnEditar.setWidth("-1px");
    btnEditar.setHeight("-1px");
    mainLayout.addComponent(btnEditar, "top:60.0px;left:160.0px;");

    return mainLayout;
}

From source file:com.anphat.cms.appparams.ui.DialogCreateAppParams.java

@AutoGenerated
private GridLayout buildGridLayout_1() {
    // common part: create layout
    gridLayout_1 = new GridLayout();
    gridLayout_1.setStyleName("custom-feildset");
    gridLayout_1.setCaption(MakeURL.makeURLForGrid(BundleUtils.getString("appParam.fieldset.title")));
    gridLayout_1.setCaptionAsHtml(true);
    gridLayout_1.setImmediate(false);/*  www.j  a  v a2s.c  o  m*/
    gridLayout_1.setWidth("100.0%");
    gridLayout_1.setHeight("-1px");
    gridLayout_1.setMargin(true);
    gridLayout_1.setSpacing(true);
    gridLayout_1.setColumns(4);
    gridLayout_1.setRows(4);

    // lblParamCode
    lblParamCode = new Label();
    lblParamCode.setImmediate(false);
    lblParamCode.setWidth("-1px");
    lblParamCode.setHeight("-1px");
    lblParamCode.setValue(BundleUtils.getString("lb.appParam.code"));
    gridLayout_1.addComponent(lblParamCode, 0, 0);

    txtParamCode = new TextField();
    txtParamCode.setImmediate(true);
    txtParamCode.setWidth("100.0%");
    txtParamCode.setHeight("-1px");
    txtParamCode.setRequired(true);
    txtParamCode.setMaxLength(50);
    //        StringBuilder messageError = new StringBuilder();
    //        messageError.append(BundleUtils.getString("lb.appParam.code"));
    //        messageError.append(BundleUtils.getString(" "));
    //        messageError.append(BundleUtils.getString("message.error.numberformat"));
    //        txtParamCode.addValidator(new RegexpValidator("[0-9]+", messageError.toString()));
    gridLayout_1.addComponent(txtParamCode, 1, 0);
    // lblParamName
    lblParamName = new Label();
    lblParamName.setImmediate(false);
    lblParamName.setWidth("100%");
    lblParamName.setHeight("-1px");
    lblParamName.setValue(BundleUtils.getString("lb.appParam.name"));
    gridLayout_1.addComponent(lblParamName, 2, 0);

    txtParamName = new TextField();
    txtParamName.setImmediate(true);
    txtParamName.setWidth("100.0%");
    txtParamName.setHeight("-1px");
    txtParamName.setRequired(true);
    txtParamName.setMaxLength(200);
    //        txtParamName.addValidator(new RegexpValidator("^[a-zA-Z0-9 -_]+$", BundleUtils.getString("lb.appParam.name")+" "+BundleUtils.getString("message.error.special.char")));
    gridLayout_1.addComponent(txtParamName, 3, 0);

    // lblParamType
    lblParamType = new Label();
    lblParamType.setImmediate(false);
    lblParamType.setWidth("100%");
    lblParamType.setHeight("-1px");
    lblParamType.setValue(BundleUtils.getString("lb.appParam.type"));
    gridLayout_1.addComponent(lblParamType, 0, 1);

    txtParamType = new TextField();
    txtParamType.setImmediate(true);
    txtParamType.setWidth("100.0%");
    txtParamType.setHeight("-1px");
    txtParamType.setRequired(true);
    txtParamType.setMaxLength(100);
    txtParamType.addValidator(new RegexpValidator("^[a-zA-Z0-9-_]+$", BundleUtils.getString("lb.appParam.type")
            + " " + BundleUtils.getString("message.error.special.char")));
    gridLayout_1.addComponent(txtParamType, 1, 1);
    // lblParamOrder
    lblParamOrder = new Label();
    lblParamOrder.setImmediate(false);
    lblParamOrder.setWidth("100%");
    lblParamOrder.setHeight("-1px");
    lblParamOrder.setValue(BundleUtils.getString("lb.appParam.order"));
    gridLayout_1.addComponent(lblParamOrder, 2, 1);

    // cboImplementer
    txtParamOrder = new TextField();
    txtParamOrder.setImmediate(true);
    txtParamOrder.setWidth("100.0%");
    txtParamOrder.setHeight("-1px");
    txtParamOrder.setMaxLength(5);
    StringBuilder messageErrorOrder = new StringBuilder();
    messageErrorOrder.append(BundleUtils.getString("lb.appParam.order"));
    messageErrorOrder.append(BundleUtils.getString(" "));
    messageErrorOrder.append(BundleUtils.getString("message.error.numberformat"));
    txtParamOrder.addValidator(new RegexpValidator("[0-9]+", messageErrorOrder.toString()));
    gridLayout_1.addComponent(txtParamOrder, 3, 1);

    // lblStatus
    lblStatus = new Label();
    lblStatus.setImmediate(false);
    lblStatus.setWidth("100%");
    lblStatus.setHeight("-1px");
    lblStatus.setValue(BundleUtils.getString("lb.appParam.status"));
    gridLayout_1.addComponent(lblStatus, 0, 2);

    cboStatus = new ComboBox();
    cboStatus.setImmediate(true);
    cboStatus.setTextInputAllowed(false);
    cboStatus.setFilteringMode(FilteringMode.OFF);
    cboStatus.setWidth("100.0%");
    cboStatus.setHeight("-1px");
    cboStatus.setStyleName("notRequireStyle");
    gridLayout_1.addComponent(cboStatus, 1, 2);

    // lblToDate
    lblParamDesc = new Label();
    lblParamDesc.setImmediate(false);
    lblParamDesc.setWidth("100%");
    lblParamDesc.setHeight("-1px");
    lblParamDesc.setValue(BundleUtils.getString("lb.appParam.description"));
    gridLayout_1.addComponent(lblParamDesc, 2, 2);

    // pdfToDate
    txtAreaParamDesc = new TextArea();
    txtAreaParamDesc.setImmediate(true);
    txtAreaParamDesc.setWidth("100.0%");
    txtAreaParamDesc.setHeight("-1px");
    txtAreaParamDesc.setMaxLength(300);
    //        txtAreaParamDesc.addValidator(new StringLengthValidator(BundleUtils.getString("message.error.overlengthString")));
    gridLayout_1.addComponent(txtAreaParamDesc, 3, 2);

    //        // btnReset
    //        GridLayout button = new GridLayout(1, 1);
    //        button.setWidth("100%");
    //        button.setHeight("-1px");
    //        btnReset = new Button();
    //        btnReset.setStyleName("v-button-link");
    //        btnReset.setIcon(new ThemeResource("img/refresh-icon.png"));
    //        btnReset.setImmediate(true);
    //        btnReset.setHeight("-1px");
    //        btnReset.setDescription(Constants.BUTTON_REFRESH);
    //        button.addComponent(btnReset);
    //        button.setComponentAlignment(btnReset, Alignment.TOP_RIGHT);
    //        gridLayout_1.addComponent(button, 3, 3);
    return gridLayout_1;
}