private void initializeListboxProgressTypes() { if (cbProgressTypes == null) { cbProgressTypes = (Combobox) planner.getFellow("cbProgressTypes"); } if (btnShowAdvances == null) { btnShowAdvances = (Button) planner.getFellow("showAdvances"); } cbProgressTypes.setModel(new ListModelList(ProgressType.getAll())); cbProgressTypes.setItemRenderer(new ProgressTypeRenderer()); // Update completion of tasks on selecting new progress type cbProgressTypes.addEventListener(Events.ON_SELECT, new EventListener() { @Override public void onEvent(Event event) { planner.forcedShowAdvances(); planner.updateCompletion(getSelectedProgressType().toString()); } private ProgressType getSelectedProgressType() { return (ProgressType) cbProgressTypes.getSelectedItem().getValue(); } }); cbProgressTypes.setVisible(true); ProgressType progressType = getProgressTypeFromConfiguration(); if (progressType != null) { planner.updateCompletion(progressType.toString()); } }
public void onSelect$compagne() throws SQLException { poste_travail.getItems().clear(); poste_travail.setVisible(true); String compagne_id = (String) map_compagne.get((String) compagne.getSelectedItem().getLabel()); StatCotationEmployeModel cotationMoel = new StatCotationEmployeModel(); map_poste = cotationMoel.getListPostTravailValid(compagne_id); Set set = (map_poste).entrySet(); Iterator i = set.iterator(); while (i.hasNext()) { Map.Entry me = (Map.Entry) i.next(); poste_travail.appendItem((String) me.getKey()); } poste_travail.setSelectedIndex(0); }
public void doAfterCompose(Component comp) throws Exception { super.doAfterCompose(comp); StatCotationEmployeModel cotationMoel = new StatCotationEmployeModel(); // ListeCotationEmploye=cotationMoel.InitialiserStatCotationEmploye(); map_compagne = cotationMoel.getListCompagneValid(); Set set = (map_compagne).entrySet(); Iterator i = set.iterator(); // Display elements while (i.hasNext()) { Map.Entry me = (Map.Entry) i.next(); compagne.appendItem((String) me.getKey()); } // forcer la selection de la permiere ligne poste_travail.setVisible(false); if (compagne.getItemCount() > 0) compagne.setSelectedIndex(0); }