Esempio n. 1
0
  public void initializePanelRigth() {
    lstStudentSelecteds = new ListSelect("Alumnos Asignados");
    lstStudentSelecteds.setSizeFull();
    lstStudentSelecteds.setMultiSelect(true);

    mainPanel.addComponent(lstStudentSelecteds);
    mainPanel.setExpandRatio(lstStudentSelecteds, new Float(0.45));
  }
Esempio n. 2
0
  public void initializePanelLeft() {
    txtSearch = new TextField();
    txtSearch.setWidth("100%");
    txtSearch.setHeight("100%");

    txtSearch.addListener(
        new TextChangeListener() {
          private static final long serialVersionUID = 1L;

          public void textChange(TextChangeEvent event) {
            String filter = event.getText();
            search(filter);
          }
        });

    btnSearch.setStyleName("searchButton");
    btnSearch.setDescription("Buscar");

    HorizontalLayout pnlSearch = new HorizontalLayout();
    pnlSearch.setWidth("100%");
    pnlSearch.setHeight("100%");
    pnlSearch.setMargin(false);
    pnlSearch.addComponent(txtSearch);
    pnlSearch.addComponent(btnSearch);

    lstStudents = new ListSelect("Alumnos Disponibles");
    lstStudents.setSizeFull();
    lstStudents.setMultiSelect(true);

    // panel left
    VerticalLayout pnlLeft = new VerticalLayout();
    pnlLeft.setHeight("100%");
    pnlLeft.setWidth("100%");
    pnlLeft.addComponent(pnlSearch);
    pnlLeft.addComponent(lstStudents);
    pnlLeft.setMargin(false);
    pnlLeft.setExpandRatio(pnlSearch, new Float(0.08));
    pnlLeft.setExpandRatio(lstStudents, new Float(0.92));

    mainPanel.addComponent(pnlLeft);
    mainPanel.setExpandRatio(pnlLeft, new Float(0.45));
  }