Java 类com.vaadin.ui.Grid.RowReference 实例源码

项目:holon-vaadin7    文件:DefaultItemListing.java   
@Override
public String getStyle(RowReference row) {
    if (!rowStyleGenerators.isEmpty()) {
        return generateRowStyle(requireDataSource().get(row.getItemId()).orElse(null));
    }
    return null;
}
项目:esup-ecandidat    文件:CandidatureViewTemplate.java   
/**
 * Ajoute les alertes SVA
 */
protected void addAlertSva(final Boolean isCanceled, final Boolean isArchived) {
    if (isCanceled || isArchived) {
        return;
    }
    List<AlertSva> listeAlerteSva = alertSvaController.getAlertSvaEnService();
    String dateSva = parametreController.getAlertSvaDat();
    Boolean definitifSva = parametreController.getAlertSvaDefinitif();
    if (listeAlerteSva.size() == 0) {
        return;
    }

    /* Ajout du css SVA */
    candidatureGrid.setRowStyleGenerator(new RowStyleGenerator() {

        /** serialVersionUID **/
        private static final long serialVersionUID = -4321160176275490773L;

        @Override
        public String getStyle(final RowReference row) {
            return getStyleSva((Candidature) row.getItemId(), listeAlerteSva, dateSva, definitifSva);
        }
    });

    /*Legende alertes SVA*/
    pvSva.setContent(createPopUpContent(listeAlerteSva, dateSva));
    pvSva.setVisible(true);
}