List of usage examples for com.vaadin.ui Button Button
public Button()
From source file:co.edu.icesi.academ.client.perfiles.administrador.PanelEditarPrograma.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);// www . j a va2 s . c o m mainLayout.setWidth("380px"); mainLayout.setHeight("260px"); // top-level component properties setWidth("380px"); setHeight("260px"); // txtNombre txtNombre = new TextField(); txtNombre.setCaption("Nombre"); txtNombre.setImmediate(false); txtNombre.setWidth("240px"); txtNombre.setHeight("-1px"); mainLayout.addComponent(txtNombre, "top:40.0px;left:60.0px;"); // btnGuardar btnGuardar = new Button(); btnGuardar.setCaption("Guardar"); btnGuardar.setImmediate(true); btnGuardar.setWidth("240px"); btnGuardar.setHeight("-1px"); mainLayout.addComponent(btnGuardar, "top:194.0px;left:60.0px;"); // txtDesc txtDesc = new TextArea(); txtDesc.setCaption("Descripcin"); txtDesc.setImmediate(false); txtDesc.setWidth("240px"); txtDesc.setHeight("100px"); mainLayout.addComponent(txtDesc, "top:80.0px;left:60.0px;"); return mainLayout; }
From source file:co.edu.icesi.academ.client.perfiles.administrador.PanelListaMateriasParaEditar.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);/* w w w .j a v a2 s . co m*/ mainLayout.setWidth("400px"); mainLayout.setHeight("300px"); // top-level component properties setWidth("400px"); setHeight("300px"); // btn_editar btn_editar = new Button(); btn_editar.setCaption("Editar"); btn_editar.setImmediate(true); btn_editar.setWidth("280px"); btn_editar.setHeight("-1px"); mainLayout.addComponent(btn_editar, "top:234.0px;left:60.0px;"); // tableMaterias tableMaterias = new Table(); tableMaterias.setImmediate(false); tableMaterias.setWidth("100.0%"); tableMaterias.setHeight("200px"); mainLayout.addComponent(tableMaterias, "top:20.0px;right:60.0px;left:60.0px;"); return mainLayout; }
From source file:co.edu.icesi.academ.client.perfiles.administrador.PanelProgramasBloques.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//from w w w . j av a 2 s .co m mainLayout.setWidth("840px"); mainLayout.setHeight("440px"); // top-level component properties setWidth("840px"); setHeight("440px"); // btnCrearPrograma btnCrearPrograma = new Button(); btnCrearPrograma.setCaption("Crear Programa"); btnCrearPrograma.setImmediate(true); btnCrearPrograma.setWidth("160px"); btnCrearPrograma.setHeight("-1px"); mainLayout.addComponent(btnCrearPrograma, "top:20.0px;left:20.0px;"); // btnEditarPrograma btnEditarPrograma = new Button(); btnEditarPrograma.setCaption("Editar Programa"); btnEditarPrograma.setImmediate(true); btnEditarPrograma.setWidth("160px"); btnEditarPrograma.setHeight("-1px"); mainLayout.addComponent(btnEditarPrograma, "top:20.0px;left:220.0px;"); // btnAsociar btnAsociar = new Button(); btnAsociar.setCaption(">"); btnAsociar.setImmediate(true); btnAsociar.setWidth("100px"); btnAsociar.setHeight("26px"); mainLayout.addComponent(btnAsociar, "top:269.0px;left:360.0px;"); // btnDesasociar btnDesasociar = new Button(); btnDesasociar.setCaption("<"); btnDesasociar.setImmediate(true); btnDesasociar.setWidth("100px"); btnDesasociar.setHeight("-1px"); mainLayout.addComponent(btnDesasociar, "top:295.0px;left:360.0px;"); // tableProgramas tableProgramas = new Table(); tableProgramas.setImmediate(false); tableProgramas.setWidth("780px"); tableProgramas.setHeight("143px"); mainLayout.addComponent(tableProgramas, "top:60.0px;left:20.0px;"); // tableBloquesNoAsociados tableBloquesNoAsociados = new Table(); tableBloquesNoAsociados.setImmediate(false); tableBloquesNoAsociados.setWidth("340px"); tableBloquesNoAsociados.setHeight("160px"); mainLayout.addComponent(tableBloquesNoAsociados, "top:240.0px;left:20.0px;"); // tableBloquesAsociados tableBloquesAsociados = new Table(); tableBloquesAsociados.setImmediate(false); tableBloquesAsociados.setWidth("340px"); tableBloquesAsociados.setHeight("160px"); mainLayout.addComponent(tableBloquesAsociados, "top:240.0px;left:460.0px;"); return mainLayout; }
From source file:co.edu.icesi.academ.client.perfiles.propietario.Competencias.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//from ww w . j a v a 2 s . co m mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // butCrearCompetencia butCrearCompetencia = new Button(); butCrearCompetencia.setCaption("Crear Competencia"); butCrearCompetencia.setImmediate(false); butCrearCompetencia.setWidth("-1px"); butCrearCompetencia.setHeight("-1px"); mainLayout.addComponent(butCrearCompetencia, "top:40.0px;left:80.0px;"); // butEditarCompetencia butEditarCompetencia = new Button(); butEditarCompetencia.setCaption("Editar Competencia"); butEditarCompetencia.setImmediate(false); butEditarCompetencia.setWidth("-1px"); butEditarCompetencia.setHeight("-1px"); mainLayout.addComponent(butEditarCompetencia, "top:40.0px;left:240.0px;"); // listSelect_1 listSelect_1 = new ListSelect(); listSelect_1.setImmediate(false); listSelect_1.setWidth("500px"); listSelect_1.setHeight("200px"); mainLayout.addComponent(listSelect_1, "top:100.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);// w ww .j a va 2 s. c om 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.FactoresDeImpacto.java
License:Open Source License
@AutoGenerated private AbsoluteLayout buildMainLayout() { // common part: create layout mainLayout = new AbsoluteLayout(); mainLayout.setImmediate(false);//from ww w . java2 s. c o m mainLayout.setWidth("100%"); mainLayout.setHeight("100%"); // top-level component properties setWidth("100.0%"); setHeight("100.0%"); // table_1 initTable(); // button_cargar button_cargar = new Button(); button_cargar.setCaption("Cargar Factores"); button_cargar.setImmediate(false); button_cargar.setWidth("-1px"); button_cargar.setHeight("-1px"); button_cargar.addClickListener(new ClickListener() { /** * */ private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { // TODO Auto-generated method stub ControladorPropietario.getInstance().cargarFactoresImpacto(); } }); mainLayout.addComponent(button_cargar, "top:20.0px;left:10.0px;"); // button_guardar button_guardar = new Button(); button_guardar.setCaption("Guardar Factores"); button_guardar.setImmediate(false); button_guardar.setWidth("-1px"); button_guardar.setHeight("-1px"); button_guardar.addClickListener(new ClickListener() { /** * */ private static final long serialVersionUID = 1L; @Override public void buttonClick(ClickEvent event) { try { List<FactorDeImpactoBO> factoresDeImpacto = guardarFactoresDeImpacto(); ControladorPropietario.getInstance().guardarFactoresDeImpacto(factoresDeImpacto); } catch (Exception e) { Notification.show("Error", "Debe cargar primero los factores de impacto", Type.TRAY_NOTIFICATION); } } }); mainLayout.addComponent(button_guardar, "top:20.0px;left:150.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);//from w ww.j a va 2 s. 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);//from ww w .ja va 2s .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.customer.controller.CustomerContactController.java
private void addEditButtonForTableCareCust() { panelTblHistory.getMainTable().addGeneratedColumn("btnEdit", new CustomTable.ColumnGenerator() { @Override//ww w .j a v a 2s . c om public Object generateCell(CustomTable source, Object itemId, Object columnId) { final CustomerCareHistoryDTO editDTO = (CustomerCareHistoryDTO) itemId; Button btnEdit = new Button(); btnEdit.addStyleName("v-button-link"); btnEdit.setIcon(FontAwesome.EDIT); // btnEdit.setCaption("Sa"); btnEdit.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { CustomerContactDialog contactDialog = new CustomerContactDialog( BundleUtils.getString("customerCareHistoryForm"), lstCustomerServiceStatus, lstCustContact); contactDialog.fillData2Dialog(editDTO); contactDialog.setIsEdit(Boolean.TRUE); UI.getCurrent().addWindow(contactDialog); addListenerBtnSaveContactWhenEditCare(contactDialog, editDTO); event.getButton().setEnabled(true); } }); return btnEdit; } }); }
From source file:com.anphat.list.controller.ListStaffController.java
private void initTable() { itemContainer = new BeanItemContainer<>(StaffDTO.class); //add detail link into tblstaff tblStaffs.addGeneratedColumn("resetPassword", new CustomTable.ColumnGenerator() { @Override//from w ww . ja v a2 s. c o m public Object generateCell(CustomTable source, final Object itemId, Object columnId) { final Button linkDetails = new Button(); linkDetails.setIcon(FontAwesome.KEY); linkDetails.setStyleName(Runo.BUTTON_LINK); linkDetails.addStyleName("v-button-link-left"); linkDetails.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { final StaffDTO staffDTO = (StaffDTO) itemId; ConfirmDialog.show(UI.getCurrent(), "Reset mt khu", "?t li mt khu mc nh cho ti khon " + staffDTO.getName(), "?ng ", "Hu b?", new ConfirmDialog.Listener() { @Override public void onClose(ConfirmDialog dialog) { if (dialog.isConfirmed()) { staffDTO.setPassword( DataUtil.md5(BundleUtils.getStringCas("password_default"))); // Confirmed to continue String result = WSStaff.updateStaff(staffDTO); if (Constants.SUCCESS.equalsIgnoreCase(result)) { CommonMessages.showMessageUpdateSuccess("pass"); } } } }); } }); linkDetails.setDescription(BundleUtils.getString("resetPassword")); return linkDetails; } }); tblStaffs.addGeneratedColumn("detailRole", new CustomTable.ColumnGenerator() { @Override public Object generateCell(CustomTable source, final Object itemId, Object columnId) { final Button btnAddRole = new Button(BundleUtils.getString("detail.roles")); btnAddRole.setStyleName(Runo.BUTTON_LINK); btnAddRole.addStyleName("v-button-link-left"); btnAddRole.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { StaffDTO staffDTO = (StaffDTO) itemId; MapStaffRolesDiaglog diaglog = new MapStaffRolesDiaglog( BundleUtils.getString("map.staff.roles.view")); diaglog.setTblRolesVisiableOnly(); MapStaffRolesController controller = new MapStaffRolesController(diaglog); controller.initOnlyView(staffDTO); UI.getCurrent().addWindow(diaglog); } }); btnAddRole.setDescription(BundleUtils.getString("lb.header.staff.addCustomer.decr")); return btnAddRole; } }); //160316 NgocND6 them chuc nang hang hoa quan ly cua tung nhan vien tblStaffs.addGeneratedColumn("goodsManage", new CustomTable.ColumnGenerator() { @Override public Object generateCell(CustomTable source, final Object itemId, Object columnId) { final Button linkDetails = new Button(BundleUtils.getString("lb.header.staff.goodsManage")); linkDetails.setStyleName(Runo.BUTTON_LINK); linkDetails.addStyleName("v-button-link-left"); linkDetails.addClickListener(new Button.ClickListener() { @Override public void buttonClick(Button.ClickEvent event) { // StaffDTO staffDTO = (StaffDTO) itemId; // if (staffDTO.getStatus().equalsIgnoreCase("1")) { // getListMapStaffCustomer(staffDTO); // if (listMapStaffCustomer != null) { // DialogGoodsManagement dialogGoodsManagement = new DialogGoodsManagement(BundleUtils.getString("transfer.goods.manage.managoodsassignstaff")); // dialogGoodsManagement.initDialog(); // DialogGoodsManagementController dgmc = new DialogGoodsManagementController(staffDTO, dialogGoodsManagement); // UI.getCurrent().addWindow(dialogGoodsManagement); // }else{ // Notification.show(BundleUtils.getString("transfer.goods.manage.staffdontassigncust"), Notification.Type.WARNING_MESSAGE); // } // } else { // Notification.show(BundleUtils.getString("dept.staff.alert.message.notActive")); // } } }); linkDetails.setDescription(BundleUtils.getString("lb.header.staff.addCustomer.decr")); return linkDetails; } }); tableUtils = new TableUtils(); tableUtils.generateColumn(tblStaffs); CommonFunctionTableFilter.initTable(staffTablePanel, headerData, itemContainer, captionfieldsetListStaff, 5, "lb.header.staff"); CommonUtils.convertFieldAppParamTable(tblStaffs, Constants.STAFF.STATUS, Constants.APP_PARAMS.COMMON_STATUS); CommonUtils.convertFieldAppParamTable(tblStaffs, Constants.STAFF.STAFF_TYPE, Constants.APP_PARAMS.STAFF_TYPE); // tblStaffs.setColumnHeader("addStock", BundleUtils.getString("add.staff.for.stock")); }