Package com.es.app.customs

Source Code of com.es.app.customs.cstSearchText

package com.es.app.customs;

import java.io.Serializable;

import com.es.app.data.GstFormat;
import com.vaadin.server.ThemeResource;
import com.vaadin.ui.Button;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.TextField;

public class cstSearchText extends HorizontalLayout implements Serializable {

  /**
   *
   */
  private static final long serialVersionUID = 6580428420617756976L;
  Button btnSearch;
  TextField txtBusqueda;

  public cstSearchText() {
    buildMain();
  }

  public cstSearchText(String capString) {
    setCaption(capString);
    buildMain();
  }

  public void buildMain() {
    setWidth("100.0%");
   
    setTxtBusqueda(new TextField());
    getTxtBusqueda().setWidth("100%");
    addComponent(getTxtBusqueda());
    setExpandRatio(getTxtBusqueda(), 2f);

    setBtnSearch(new Button());
    getBtnSearch().setIcon(
        new ThemeResource("../factelect/icons/refresh.png"));
    getBtnSearch().setDescription(
        GstFormat.description("Buscar",
            "Inicia la busqueda de contenidos"));
    getBtnSearch().setWidth("-1px");
    getBtnSearch().setHeight("-1px");
    addComponent(getBtnSearch());
    setExpandRatio(getBtnSearch(), .5f);
  }

  public Button getBtnSearch() {
    return btnSearch;
  }

  public void setBtnSearch(Button btnSearch) {
    this.btnSearch = btnSearch;
  }

  public TextField getTxtBusqueda() {
    return txtBusqueda;
  }

  public void setTxtBusqueda(TextField txtBusqueda) {
    this.txtBusqueda = txtBusqueda;
  }
}
TOP

Related Classes of com.es.app.customs.cstSearchText

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.