public WorkflowGrid() {
    panel = new Panel();

    createAllGrids();

    Responsive.makeResponsive(projectInfo);
    Responsive.makeResponsive(dataPart);
    Responsive.makeResponsive(commentsGrid);
  }
  public FormEstadoSoporte() {

    super.setColumns(4);
    super.setRows(3);
    setSpacing(true);
    setMargin(true);
    setWidth("100%");

    this.txt_id_estado_soporte = new TextField("Id. Estado Soporte:");
    this.txt_nombre_esoporte = new TextField("Descripcion del Estado de Soporte: ");
    this.mensajes = new ArrayList<BarMessage>();

    pitm_esoporte.addItemProperty("id_estado_soporte", new ObjectProperty<Integer>(0));
    pitm_esoporte.addItemProperty("nombre_estado_soporte", new ObjectProperty<String>(""));
    pitm_esoporte.addItemProperty("sigla", new ObjectProperty<String>(""));

    this.binder_esoporte = new FieldGroup(this.pitm_esoporte);

    binder_esoporte.bind(this.txt_id_estado_soporte, "id_estado_soporte");
    binder_esoporte.bind(this.txt_nombre_esoporte, "nombre_estado_soporte");

    this.txt_nombre_esoporte.setRequired(true);
    this.txt_nombre_esoporte.addValidator(new NullValidator("No Nulo", false));
    this.txt_nombre_esoporte.addValidator(
        new StringLengthValidator(Messages.STRING_LENGTH_MESSAGE(3, 50), 3, 50, false));
    this.txt_id_estado_soporte.setEnabled(false);

    txt_id_estado_soporte.setWidth("90%");
    txt_nombre_esoporte.setWidth("90%");

    updateId();
    buildContent();
    Responsive.makeResponsive(this);
  }
  private Component buildSparkCards() {
    CssLayout sparks = new CssLayout();
    sparks.addStyleName("sparks");
    sparks.setWidth("100%");
    Responsive.makeResponsive(sparks);

    float totalKm = getTotalKm();
    SparkCard worldTripsSparkCard =
        new SparkCard("trips around the world", Float.toString(totalKm / ECUATOR_LENGTH_KM));
    sparks.addComponent(worldTripsSparkCard);

    SparkCard moonTripsSparkCard =
        new SparkCard("trips to the moon", Float.toString(totalKm / DISTANCE_TO_THE_MOON_KM));
    sparks.addComponent(moonTripsSparkCard);

    float totalCalories = getTotalCalories();

    SparkCard burgersBurnedSparkCard =
        new SparkCard("burgers burned", Float.toString(totalCalories / CALORIES_PER_BURGER));
    sparks.addComponent(burgersBurnedSparkCard);

    SparkCard biersBurnedSparkCard =
        new SparkCard("beers burned", Long.toString(Math.round(totalCalories / CALORIES_PER_BEER)));
    sparks.addComponent(biersBurnedSparkCard);

    return sparks;
  }
Esempio n. 4
0
  public DashboardView() {
    addStyleName(ValoTheme.PANEL_BORDERLESS);
    setSizeFull();
    DashboardEventBus.register(this);

    root = new VerticalLayout();
    root.setSizeFull();
    root.setSpacing(false);
    root.addStyleName("dashboard-view");
    setContent(root);
    Responsive.makeResponsive(root);

    root.addComponent(buildHeader());

    root.addComponent(buildSparklines());

    Component content = buildContent();
    root.addComponent(content);
    root.setExpandRatio(content, 1);

    // All the open sub-windows should be closed whenever the root layout
    // gets clicked.
    root.addLayoutClickListener(
        new LayoutClickListener() {
          @Override
          public void layoutClick(final LayoutClickEvent event) {
            DashboardEventBus.post(new CloseOpenWindowsEvent());
          }
        });
  }
Esempio n. 5
0
  private Component buildFormContent() {

    VerticalLayout formContent = new VerticalLayout();
    formContent.setSpacing(true);

    Panel frmPanel = new Panel();
    frmPanel.setStyleName(AitTheme.PANEL_FORM);
    frmPanel.setIcon(FontAwesome.EDIT);
    frmPanel.setWidth("100%");
    frmPanel.setCaption("Datos a eliminar");
    frmPanel.setContent(this.frm_organismo);
    this.frm_organismo.enabled();
    formContent.setMargin(true);
    Panel gridPanel = new Panel();
    gridPanel.setStyleName(AitTheme.PANEL_GRID);
    gridPanel.setIcon(FontAwesome.TABLE);
    gridPanel.setWidth("100%");
    gridPanel.setCaption("Organismos Financiadores registrados");
    gridPanel.setContent(this.grid_organismo);
    formContent.setMargin(true);
    formContent.addComponent(gridPanel);
    formContent.addComponent(frmPanel);

    this.frm_organismo.update();
    Responsive.makeResponsive(formContent);
    return formContent;
  }
  public FormRevalorizaP() {
    setColumns(5); // columnas que aceptara el grid en las posiciones
    setRows(3); // filas que aceptara el grid
    setWidth("100%"); // ancho de todo el grid
    setMargin(true); // espacio de los cuatro costados
    setSpacing(true); // distancia de componente a componente

    this.dt_fecha = new DateField("Fecha:");
    this.txt_no_resolucion = new TextField("No. Resolucion");

    pitm_Revaloriza.addItemProperty("fecha", new ObjectProperty<Date>(new Date()));
    pitm_Revaloriza.addItemProperty("resolucion", new ObjectProperty<String>(""));

    this.binder_Revaloriza = new FieldGroup(pitm_Revaloriza);
    // instanciando FieldGroup mandandole PropertysetItem
    this.binder_Revaloriza.bind(this.dt_fecha, "fecha");
    this.binder_Revaloriza.bind(this.txt_no_resolucion, "resolucion");
    this.binder_Revaloriza.clear();

    this.txt_no_resolucion.setRequired(true);
    this.dt_fecha.setRequired(true);
    this.txt_no_resolucion.addValidator(new NullValidator("", false));
    // new NullValidator("", false) por es una clase de vaadin --> no da errores pero tampoco deja
    // registrar
    //		this.dt_fecha.setEnabled(false);

    this.dt_fecha.setWidth("40%");
    this.txt_no_resolucion.setWidth("90%");

    buildContent();
    Responsive.makeResponsive(this);
  }
Esempio n. 7
0
  public void buildGrid() {
    bean_inmueble = new BeanItemContainer<InmuebleModel>(InmuebleModel.class);
    SessionModel usuario = (SessionModel) UI.getCurrent().getSession().getAttribute("user");

    short dependencia = dependencia_impl.getdependencia_ID(usuario.getDependecia());
    bean_inmueble.addAll(this.inmueble_impl.getalls(dependencia));
    setContainerDataSource(bean_inmueble);
    setHeightMode(HeightMode.ROW);
    setHeightByRows(5);

    removeColumn("INM_Fecha_Registro");
    removeColumn("INM_Dependencia_ID");
    removeColumn("INM_Ciudad_ID");

    setWidth("100%");

    setColumnOrder("INM_Inmueble", "INM_Nombre_Inmueble", "INM_Ciudad", "INM_Domicilio_Inmueble");

    Grid.Column id_inmuebleColumn = this.getColumn("INM_Inmueble");
    Grid.Column nombre_inmuebleColumn = this.getColumn("INM_Nombre_Inmueble");
    Grid.Column id_ciudadColumn = this.getColumn("INM_Ciudad");
    Grid.Column domicilioColumn = this.getColumn("INM_Domicilio_Inmueble");

    id_inmuebleColumn.setHeaderCaption("Codigo");
    nombre_inmuebleColumn.setHeaderCaption("Nombre del Inmueble").setExpandRatio(6);
    id_ciudadColumn.setHeaderCaption("Ciudad").setExpandRatio(2);
    domicilioColumn.setHeaderCaption("Domicilio").setExpandRatio(4);
    Responsive.makeResponsive(this);
  }
Esempio n. 8
0
  private Component buildSparklines() {
    CssLayout sparks = new CssLayout();
    sparks.addStyleName("sparks");
    sparks.setWidth("100%");
    Responsive.makeResponsive(sparks);

    SparklineChart s =
        new SparklineChart("Traffic", "K", "", DummyDataGenerator.chartColors[0], 22, 20, 80);
    sparks.addComponent(s);

    s =
        new SparklineChart(
            "Revenue / Day", "M", "$", DummyDataGenerator.chartColors[2], 8, 89, 150);
    sparks.addComponent(s);

    s =
        new SparklineChart(
            "Checkout Time", "s", "", DummyDataGenerator.chartColors[3], 10, 30, 120);
    sparks.addComponent(s);

    s =
        new SparklineChart(
            "Theater Fill Rate", "%", "", DummyDataGenerator.chartColors[5], 50, 34, 100);
    sparks.addComponent(s);

    return sparks;
  }
Esempio n. 9
0
  public void buildGrid() {
    bean_grupo = new BeanItemContainer<GruposContablesModel>(GruposContablesModel.class);
    bean_grupo.addAll(grupo_impl.getalls());
    setContainerDataSource(bean_grupo);
    setHeightMode(HeightMode.ROW);
    setHeightByRows(10);
    setWidth("100%");

    removeColumn("GRC_Fecha_Registro");
    removeColumn("GRC_Partida_ID");

    setColumnOrder(
        "GRC_Grupo_Contable",
        "GRC_Partida",
        "GRC_Nombre_Grupo_Contable",
        "GRC_Vida_Util",
        "GRC_Coeficiente");

    Grid.Column id_grupoColumn = this.getColumn("GRC_Grupo_Contable");
    Grid.Column nombre_grupoColumn = this.getColumn("GRC_Nombre_Grupo_Contable");
    Grid.Column vida_utilColumn = this.getColumn("GRC_Vida_Util");
    Grid.Column coeficienteColumn = this.getColumn("GRC_Coeficiente");
    Grid.Column id_partidaColumn = this.getColumn("GRC_Partida");

    id_grupoColumn.setHeaderCaption("Codigo de Grupo").setExpandRatio(1);
    nombre_grupoColumn.setHeaderCaption("Nombre del Grupo Contable").setExpandRatio(4);
    vida_utilColumn.setHeaderCaption("Vida Util").setExpandRatio(4);
    coeficienteColumn.setHeaderCaption("Coeficiente").setExpandRatio(4);
    id_partidaColumn.setHeaderCaption("Partida Presupuestaria").setExpandRatio(4);

    sort("GRC_Grupo_Contable", SortDirection.ASCENDING);
    Responsive.makeResponsive(this);
  }
Esempio n. 10
0
 private Component buildContent() {
   dashboardPanels = new CssLayout();
   dashboardPanels.addStyleName("dashboard-panels");
   Responsive.makeResponsive(dashboardPanels);
   //        dashboardPanels.addComponent(createContentWrapper(new AchievementsCard(activities)));
   return dashboardPanels;
 }
Esempio n. 11
0
  @SuppressWarnings("serial")
  private Component getTable() {
    List<UserOprYayasan> lm = GenericPersistence.findList(UserOprYayasan.class);

    dashboardPanels = new VerticalLayout();
    dashboardPanels.addStyleName("dashboard-panels");
    Responsive.makeResponsive(dashboardPanels);
    beans.setBeanIdProperty("id");
    beans.removeAllItems();
    if (lm != null) {
      beans.addAll(lm);
    } else {
      beans.addBean(new UserOprYayasan());
    }

    tabel.addGeneratedColumn(
        "aksi",
        new ColumnGenerator() {
          @Override
          public Object generateCell(Table source, Object itemId, Object columnId) {
            HorizontalLayout hl = new HorizontalLayout();
            Button edit = new Button(FontAwesome.EDIT);
            Button hapus = new Button(FontAwesome.TRASH_O);
            edit.addStyleName(ValoTheme.BUTTON_FRIENDLY);
            edit.addStyleName(ValoTheme.BUTTON_SMALL);
            hapus.addStyleName(ValoTheme.BUTTON_FRIENDLY);
            hapus.addStyleName(ValoTheme.BUTTON_SMALL);
            BeanItem<?> i = (BeanItem<?>) source.getContainerDataSource().getItem(itemId);
            final UserOprYayasan o = (UserOprYayasan) i.getBean();
            edit.addClickListener(
                new ClickListener() {
                  @Override
                  public void buttonClick(ClickEvent event) {
                    tambahUserYayasanbaru(o);
                  }
                });
            hl.addComponent(edit);
            hl.addComponent(hapus);
            return hl;
          }
        });
    tabel.setSizeFull();
    tabel.setImmediate(true);
    tabel.setSelectable(true);
    tabel.setContainerDataSource(beans);
    tabel.setRowHeaderMode(Table.RowHeaderMode.INDEX);
    tabel.setColumnHeader("useNnama", "NAMA PENGGUNA");
    tabel.setColumnHeader("nama", "NAMA");
    tabel.setColumnHeader("realName", "NAMA LENGKAP");
    tabel.setColumnHeader("registerDate", "TANGGAL REGISTRASI");
    tabel.setColumnHeader("email", "E-MAIL");
    tabel.setColumnHeader("lastSuccessfulLogin", "TERAKHIR LOGIN");
    tabel.setColumnHeader("aksi", "AKSI");
    tabel.setVisibleColumns(
        "aksi", "nama", "realName", "registerDate", "email", "lastSuccessfulLogin");
    dashboardPanels.addComponent(tabel);
    return dashboardPanels;
  }
Esempio n. 12
0
 public TaskOptionLayout(Task task) {
   Design.read(this);
   Responsive.makeResponsive(this);
   scheduleStartDate.setResolution(Resolution.MINUTE);
   scheduleEndDate.setResolution(Resolution.MINUTE);
   setDefaultScheduler(task);
   binder.setItemDataSource(task);
   binder.bind(scheduleStartDate, "scheduleStartDate");
   binder.bind(scheduleEndDate, "scheduleEndDate");
   binder.setBuffered(true);
 }
Esempio n. 13
0
 public CariMahasiswa() {
   setMargin(true);
   setSpacing(true);
   Responsive.makeResponsive(this);
   addComponent(ViewFactory.header("Pencarian Data Mahasiswa"));
   addComponent(createFilterComponent());
   siapkanPilihanProdi();
   siapkanPilihanPA();
   addComponent(content);
   addComponent(ViewFactory.footer());
 }
Esempio n. 14
0
 private Component buildLoginForm() {
   loginPanel.setSpacing(true);
   loginPanel.setMargin(true);
   final Panel panel = new Panel();
   Responsive.makeResponsive(panel);
   loginPanel.addComponent(buildLabels());
   errores.setVisible(false);
   loginPanel.addComponent(errores);
   loginPanel.addComponent(buildFields());
   panel.setContent(loginPanel);
   return panel;
 }
Esempio n. 15
0
  private Component buildContent() {
    dashboardPanels = new CssLayout();
    dashboardPanels.addStyleName("dashboard-panels");
    Responsive.makeResponsive(dashboardPanels);

    dashboardPanels.addComponent(buildTopGrossingMovies());
    dashboardPanels.addComponent(buildNotes());
    dashboardPanels.addComponent(buildTop10TitlesByRevenue());
    dashboardPanels.addComponent(buildPopularMovies());

    return dashboardPanels;
  }
Esempio n. 16
0
  private com.vaadin.ui.Component buildLoginForm() {
    final VerticalLayout loginPanel = new VerticalLayout();
    loginPanel.setSizeUndefined();
    loginPanel.setSpacing(true);
    Responsive.makeResponsive(loginPanel);
    loginPanel.addStyleName("login-panel");

    loginPanel.addComponent(buildLabels());
    loginPanel.addComponent(buildFields());
    loginPanel.addComponent(new CheckBox("Remember me", true));
    return loginPanel;
  }
  @Override
  protected void init(final VaadinRequest request) {
    setLocale(RUSSIAN_LOCALE);

    DashboardEventBus.register(this);
    Responsive.makeResponsive(this);
    addStyleName(ValoTheme.UI_WITH_MENU);

    updateContent();

    Page.getCurrent()
        .addBrowserWindowResizeListener(event -> DashboardEventBus.post(new BrowserResizeEvent()));
  }
Esempio n. 18
0
  public VOrganismoB() {

    this.frm_organismo = new FormOrganismo();
    this.btn_limpiar = new Button("Limpiar");
    this.btn_eliminar = new Button("Eliminar");
    this.btn_eliminar.addClickListener(this);
    this.btn_limpiar.addClickListener(this);
    this.grid_organismo = new GridOrganismo();
    this.hl_errores = new CssLayout();

    addComponent(buildNavBar());
    addComponent(buildFormContent());
    addComponent(buildButtonBar());
    buildGrid();
    Responsive.makeResponsive(this);
  }
Esempio n. 19
0
  private Component buildFormContent() {

    VerticalLayout formContent = new VerticalLayout();
    formContent.setSpacing(true);

    Panel frmPanel = new Panel();
    frmPanel.setStyleName(AitTheme.PANEL_FORM);
    frmPanel.setIcon(FontAwesome.EDIT);
    frmPanel.setWidth("100%");
    frmPanel.setCaption("Servidor con Atribuciones de Autorizacion");

    GridLayout gridlFunionario = new GridLayout(3, 1);
    gridlFunionario.addComponent(txtDependencia, 0, 0);
    gridlFunionario.addComponent(txtUnidadOrganizacional, 1, 0);
    gridlFunionario.addComponent(txt_nombre_servidor, 2, 0);

    gridlFunionario.setMargin(true);
    gridlFunionario.setSpacing(true);
    gridlFunionario.setWidth("100%");
    frmPanel.setContent(gridlFunionario);

    formContent.setMargin(true);
    formContent.addComponent(frmPanel);
    Panel gridPanel = new Panel();
    gridPanel.setWidth("100%");
    gridPanel.setCaption("Documentos que Puede Autorizar");
    gridPanel.setContent(this.gridTipoAutorizacion);
    gridPanel.setStyleName(AitTheme.PANEL_GRID);
    gridPanel.setIcon(FontAwesome.TABLE);
    formContent.setMargin(true);

    Panel gridpin = new Panel();
    gridpin.setStyleName(AitTheme.PANEL_FORM);
    gridpin.setIcon(FontAwesome.TABLE);
    gridpin.setWidth("100%");
    gridpin.setCaption("N. PIN");
    gridpin.setContent(this.frm_pin);
    formContent.setMargin(true);

    formContent.addComponent(frmPanel);
    formContent.addComponent(gridPanel);
    formContent.addComponent(gridpin);
    Responsive.makeResponsive(formContent);
    return formContent;
  }
Esempio n. 20
0
  public DashboardView() {
    activities = getActivities();
    addStyleName(ValoTheme.PANEL_BORDERLESS);
    setSizeFull();
    DashboardEventBus.register(this);

    root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(true);
    root.addStyleName("dashboard-view");
    setContent(root);
    Responsive.makeResponsive(root);

    root.addComponent(buildSparkCards());

    Component content = buildContent();
    root.addComponent(content);
    root.setExpandRatio(content, 1);
  }
Esempio n. 21
0
  private Component buildFormContent() {

    VerticalLayout formContent = new VerticalLayout();
    formContent.setSpacing(true);
    Panel frmPanel = new Panel();
    frmPanel.setWidth("100%");
    frmPanel.setCaption("Datos a registrar");
    frmPanel.setContent(this.frm_unidad);
    formContent.setMargin(true);
    formContent.addComponent(frmPanel);
    Panel gridPanel = new Panel();
    gridPanel.setWidth("100%");
    gridPanel.setCaption("Dependencias registradas");
    gridPanel.setContent(this.grid_unidad);
    formContent.setMargin(true);
    formContent.addComponent(frmPanel);
    formContent.addComponent(gridPanel);
    Responsive.makeResponsive(formContent);
    return formContent;
  }
Esempio n. 22
0
  @Override
  protected void setup(VaadinRequest request) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.addStyleName("layout-update");
    layout.setWidth("100%");
    setContent(layout);
    Responsive.makeResponsive(layout);

    Label label =
        new Label(
            "This label changes its size between the breakpoints, allowing more space for the adjacent component.");
    label.addStyleName("change-width");
    layout.addComponent(label);

    Panel panel = new Panel("Panel");
    Label label2 = new Label("This Panel should be maximized in both breakpoints.");
    label2.setWidth("100%");
    panel.setContent(label2);
    panel.setSizeFull();
    layout.addComponent(panel);
    layout.setExpandRatio(panel, 1);
  }
Esempio n. 23
0
 @SuppressWarnings("serial")
 public DaftarUserYayasan() {
   addStyleName(ValoTheme.PANEL_BORDERLESS);
   root = new VerticalLayout();
   root.setSizeFull();
   root.setMargin(true);
   root.setSpacing(true);
   root.addStyleName("dashboard-view");
   setContent(root);
   Responsive.makeResponsive(root);
   root.addComponent(getTable());
   Button tambah = new Button("Tambah", FontAwesome.PLUS_SQUARE_O);
   root.addComponent(tambah);
   tambah.addClickListener(
       new ClickListener() {
         @Override
         public void buttonClick(ClickEvent event) {
           tambahUserYayasanbaru(new UserOprYayasan());
         }
       });
   tambah.addStyleName(ValoTheme.BUTTON_FRIENDLY);
 }
  private ProfilePreferencesWindow(final User user, final boolean preferencesTabOpen) {
    addStyleName("profile-window");
    setId(ID);
    Responsive.makeResponsive(this);

    setModal(true);
    setCloseShortcut(KeyCode.ESCAPE, null);
    setResizable(false);
    setClosable(false);
    setHeight(90.0f, Unit.PERCENTAGE);
    setWidth(60.0f, Unit.PERCENTAGE);

    VerticalLayout content = new VerticalLayout();
    content.setSizeFull();
    content.setMargin(new MarginInfo(true, false, false, false));
    setContent(content);

    TabSheet detailsWrapper = new TabSheet();
    detailsWrapper.setSizeFull();
    detailsWrapper.addStyleName(ValoTheme.TABSHEET_PADDED_TABBAR);
    detailsWrapper.addStyleName(ValoTheme.TABSHEET_ICONS_ON_TOP);
    detailsWrapper.addStyleName(ValoTheme.TABSHEET_CENTERED_TABS);
    content.addComponent(detailsWrapper);
    content.setExpandRatio(detailsWrapper, 1f);

    detailsWrapper.addComponent(buildProfileTab());
    detailsWrapper.addComponent(buildPreferencesTab());

    if (preferencesTabOpen) {
      detailsWrapper.setSelectedTab(1);
    }

    content.addComponent(buildFooter());

    fieldGroup = new BeanFieldGroup<>(User.class);
    fieldGroup.bindMemberFields(this);
    fieldGroup.setItemDataSource(user);
  }
  public Component getComponent() {
    Responsive.makeResponsive(panel);
    panel.setSizeFull();

    panel.setHeight(100, Unit.PERCENTAGE);

    // p.setHeight(200, Unit.PERCENTAGE);
    HorizontalLayout layout = new HorizontalLayout();

    layout.setSizeFull();

    layout.addComponent(projectInfo);
    layout.addComponent(dataPart);
    layout.addComponent(commentsGrid);

    layout.setExpandRatio(projectInfo, 2.8f);
    layout.setExpandRatio(dataPart, 6.2f);
    layout.setExpandRatio(commentsGrid, 2.1f);

    panel.setContent(layout);

    return panel;
  }