Пример #1
0
  public void initializeAddBtnPanel() {
    btnAdd = initSizeButton(btnAdd, "Agregar", ">", null);
    btnAddAll = initSizeButton(btnAddAll, "Agregar Todos", ">>", null);
    btnRemove = initSizeButton(btnRemove, "Quitar", "<", null);
    btnRemoveAll = initSizeButton(btnRemoveAll, "Quitar Todos", "<<", null);

    panelAddButton = new VerticalLayout();
    panelAddButton.setMargin(false);
    panelAddButton.setHeight("100%");
    panelAddButton.setWidth("100%");

    GridLayout grid = new GridLayout(1, 4);
    grid.setWidth("90%");
    grid.setHeight("50%");

    grid.addComponent(btnAddAll, 0, 0);
    grid.setComponentAlignment(btnAddAll, Alignment.MIDDLE_CENTER);
    grid.addComponent(btnRemoveAll, 0, 3);
    grid.setComponentAlignment(btnRemoveAll, Alignment.MIDDLE_CENTER);
    panelAddButton.addComponent(grid);
    panelAddButton.setComponentAlignment(grid, Alignment.MIDDLE_CENTER);

    mainPanel.addComponent(panelAddButton);
    mainPanel.setExpandRatio(panelAddButton, new Float(0.10));
  }
Пример #2
0
  public GridLayout initialize() {

    LOG.debug("Initializing the category and post view");
    buildCategoryTree();
    buildCategoryCRUDAccordion();

    postCRUDAccordion = postView.buildPostCRUDAccordion();
    postCRUDAccordion.setHeight("100%");
    postViewGrid = postView.buildPostViewGrid();

    topLayout.setImmediate(true);
    topLayout.setHeight("100%");
    topLayout.setWidth("100%");
    topLayout.setSpacing(true);

    // first row of the grid layout
    topLayout.addComponent(categoryAccordionCRUD);
    topLayout.addComponent(topTreeLayout);
    topLayout.addComponent(postCRUDAccordion); // builds the CRUD accordion for Posts management

    // second row of the grid layout
    topLayout.addComponent(
        postViewGrid,
        0,
        1,
        2,
        1); // builds the Grid for the Posts view which spans over 3 columns of the row
    topLayout.setComponentAlignment(postViewGrid, Alignment.TOP_LEFT);

    return topLayout;
  }
Пример #3
0
  @Override
  protected void setup(VaadinRequest request) {
    final VerticalLayout uiLayout = new VerticalLayout();
    uiLayout.setMargin(true);
    setContent(uiLayout);

    final VerticalLayout windowLayout = new VerticalLayout();

    final Window testWindow = new Window("WebKitFail", windowLayout);
    testWindow.setWidth(300, Unit.PIXELS);

    GridLayout gl = new GridLayout();
    gl.setHeight(null);
    gl.setWidth(100, Unit.PERCENTAGE);
    windowLayout.addComponent(gl);

    ListSelect listSelect = new ListSelect();
    listSelect.setWidth(100, Unit.PERCENTAGE);
    gl.addComponent(listSelect);
    gl.setMargin(true);

    final Button testButton =
        new Button(
            "Open Window",
            new Button.ClickListener() {
              @Override
              public void buttonClick(ClickEvent event) {
                UI.getCurrent().addWindow(testWindow);
              }
            });
    uiLayout.addComponent(testButton);
  }
 private GridLayout locateLayoutWeek(Label label) {
   layoutWeek = new GridLayout();
   label.setWidth(40, UNITS_PIXELS);
   layoutWeek.setWidth(100, UNITS_PERCENTAGE);
   layoutWeek.setHeight(40, UNITS_PIXELS);
   layoutWeek.setComponentAlignment(label, Alignment.MIDDLE_CENTER);
   layoutWeek.addComponent(label);
   return layoutWeek;
 }
Пример #5
0
  private void buildContent() {

    this.cb_Grupo.setWidth("100%");
    this.cb_Auxiliar.setWidth("100%");
    this.cb_Activos.setWidth("100%");

    setColumnExpandRatio(0, 0.3f);
    setColumnExpandRatio(1, 1f);
    setColumnExpandRatio(2, 1f);

    GridLayout gridlFecha = new GridLayout(1, 1);
    gridlFecha.setWidth("100%");
    GridLayout gridlCodigo = new GridLayout(1, 1);
    gridlCodigo.setWidth("100%");
    gridlCodigo.setHeight("100%");
    GridLayout gridlCombos = new GridLayout(1, 3);
    gridlCombos.setWidth("100%");
    gridlCodigo.setMargin(true);
    gridlFecha.setMargin(true);
    gridlCombos.setMargin(true);

    Panel pnFecha = new Panel("Fecha Elaboracion");
    pnFecha.setContent(gridlFecha);
    pnFecha.setStyleName(AitTheme.PANEL_PRINT);
    pnFecha.setIcon(FontAwesome.EDIT);
    pnCodigo = new Panel("Seleccion por codigo");
    pnCodigo.setContent(gridlCodigo);
    pnCodigo.setStyleName(AitTheme.PANEL_PRINT);
    pnCodigo.setIcon(FontAwesome.EDIT);
    pnCombos = new Panel("Seleccion por Grupo y Auxiliar Contable");
    pnCombos.setContent(gridlCombos);
    pnCombos.setStyleName(AitTheme.PANEL_PRINT);
    pnCombos.setIcon(FontAwesome.EDIT);

    pnCodigo.addClickListener(this);
    pnCombos.addClickListener(this);

    gridlFecha.addComponent(dtf_fechaElaboracion, 0, 0);
    gridlCodigo.addComponent(txt_codigoActivo, 0, 0);
    gridlCombos.addComponent(this.cb_Grupo, 0, 0);
    gridlCombos.addComponent(this.cb_Auxiliar, 0, 1);
    gridlCombos.addComponent(this.cb_Activos, 0, 2);

    addComponent(pnFecha, 0, 0);
    addComponent(pnCodigo, 1, 0);
    addComponent(pnCombos, 1, 1, 1, 3);
  }
Пример #6
0
  @AutoGenerated
  private GridLayout buildHeadLayout() {
    // common part: create layout
    headLayout = new GridLayout();
    headLayout.setImmediate(false);
    headLayout.setWidth("-1px");
    headLayout.setHeight("-1px");
    headLayout.setMargin(false);
    headLayout.setSpacing(true);
    headLayout.setColumns(2);
    headLayout.setRows(2);

    // parameterTypeLabel
    parameterTypeLabel = new Label();
    parameterTypeLabel.setImmediate(false);
    parameterTypeLabel.setWidth("-1px");
    parameterTypeLabel.setHeight("-1px");
    parameterTypeLabel.setValue("Type of Parameter");
    headLayout.addComponent(parameterTypeLabel, 0, 0);

    // parameterType
    parameterType = new ComboBox();
    parameterType.setImmediate(false);
    parameterType.setWidth("-1px");
    parameterType.setHeight("-1px");
    headLayout.addComponent(parameterType, 1, 0);

    // parameterNameLabel
    parameterNameLabel = new Label();
    parameterNameLabel.setImmediate(false);
    parameterNameLabel.setWidth("-1px");
    parameterNameLabel.setHeight("-1px");
    parameterNameLabel.setValue("Parameter");
    headLayout.addComponent(parameterNameLabel, 0, 1);
    headLayout.setComponentAlignment(parameterNameLabel, new Alignment(6));

    // parameterName
    parameterName = new TextField();
    parameterName.setImmediate(false);
    parameterName.setWidth("-1px");
    parameterName.setHeight("-1px");
    parameterName.setRequired(true);
    headLayout.addComponent(parameterName, 1, 1);

    return headLayout;
  }
  public EditSanctionActsFormUp(EditSanctionActsSubWindow editSanctionActsSubWindow) {
    this.editSanctionActsSubWindow = editSanctionActsSubWindow;
    this.loadSanctionActSubWindow = editSanctionActsSubWindow.getLoadSanctionActSubWindow();
    removeAllComponents();
    setMargin(true);
    gridLayout.setWidth("95%");
    gridLayout.setHeight("65%");
    gridLayout.setImmediate(true);
    // gridLayout.setMargin(true);
    gridLayout.setSpacing(false);
    initializeDivisionComboBox();
    initializeEnrollmentTextField();
    initializeStateLcTextField();
    //		initializeTrimesterComponents();

    addComponent(gridLayout);
  }
Пример #8
0
  @AutoGenerated
  private GridLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new GridLayout();
    mainLayout.setStyleName("background");
    mainLayout.setImmediate(false);
    mainLayout.setWidth("480px");
    mainLayout.setHeight("450px");
    mainLayout.setMargin(false);

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

    // logintab
    logintab = buildLogintab();
    mainLayout.addComponent(logintab, 0, 0);

    return mainLayout;
  }
 public void initComponents() {
   gridLayout = new GridLayout(DEFAULT_COLUMNS, DEFAULT_ROWS);
   gridLayout.setWidth(100, UNITS_PERCENTAGE);
   gridLayout.setHeight(100, UNITS_PERCENTAGE);
 }