Subversion Repositories eFlore/Applications.coel

Rev

Rev 1239 | Rev 1369 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1239 Rev 1246
Line 124... Line 124...
124
		grille.setAutoExpandColumn("titre");
124
		grille.setAutoExpandColumn("titre");
125
		grille.getView().setAutoFill(true);
125
		grille.getView().setAutoFill(true);
126
		grille.getView().setForceFit(true);
126
		grille.getView().setForceFit(true);
127
		grille.setSelectionModel(modeleDeSelection);
127
		grille.setSelectionModel(modeleDeSelection);
128
		grille.addListener(Events.ViewReady, new Listener<BaseEvent>() {
128
		grille.addListener(Events.ViewReady, new Listener<BaseEvent>() {
129
			@Override
-
 
130
			public void handleEvent(BaseEvent be) {
129
			public void handleEvent(BaseEvent be) {
131
				grille.getSelectionModel().select(0, false);
130
				grille.getSelectionModel().select(0, false);
132
			}
131
			}
133
		});
132
		});
134
		grille.addListener(Events.OnDoubleClick, new Listener<BaseEvent>(){
133
		grille.addListener(Events.OnDoubleClick, new Listener<BaseEvent>(){
135
			@Override
-
 
136
			public void handleEvent(BaseEvent be) {
134
			public void handleEvent(BaseEvent be) {
137
				modifier.fireEvent(Events.Select);
135
				modifier.fireEvent(Events.Select);
138
			}
136
			}
139
		});
137
		});
140
		add(grille);
138
		add(grille);
Line 144... Line 142...
144
		setBottomComponent(pagination);
142
		setBottomComponent(pagination);
145
	}
143
	}
Line 146... Line 144...
146
	
144
	
147
	private ColumnConfig creerColonneEditeur() {
145
	private ColumnConfig creerColonneEditeur() {
148
		GridCellRenderer<Publication> editeurRendu = new GridCellRenderer<Publication>() {
-
 
149
			@Override
146
		GridCellRenderer<Publication> editeurRendu = new GridCellRenderer<Publication>() {
150
			public String render(Publication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Publication> store, Grid<Publication> grid) {
147
			public String render(Publication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Publication> store, Grid<Publication> grid) {
151
				String editeur = model.getNomEditeur();
148
				String editeur = model.getNomEditeur();
152
				model.set("_editeur_", editeur);
149
				model.set("_editeur_", editeur);
153
				return editeur;
150
				return editeur;
Line 158... Line 155...
158
		return editeurColonne;
155
		return editeurColonne;
159
	}
156
	}
Line 160... Line 157...
160
	
157
	
161
	private ColumnConfig creerColonneAnneePublication() {
158
	private ColumnConfig creerColonneAnneePublication() {
162
		GridCellRenderer<Publication> datePublicationRendu = new GridCellRenderer<Publication>() {
-
 
163
			@Override
159
		GridCellRenderer<Publication> datePublicationRendu = new GridCellRenderer<Publication>() {
164
			public String render(Publication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Publication> store, Grid<Publication> grid) {
160
			public String render(Publication model, String property, ColumnData config, int rowIndex, int colIndex, ListStore<Publication> store, Grid<Publication> grid) {
165
				String annee = model.getAnneeParution();
161
				String annee = model.getAnneeParution();
166
				model.set("_annee_", annee);
162
				model.set("_annee_", annee);
167
				return annee;
163
				return annee;