1,13 → 1,11 |
package org.tela_botanica.client.vues; |
|
import org.tela_botanica.client.image.ImageMediateur; |
import com.gwtext.client.core.Ext; |
import org.tela_botanica.client.interfaces.Rafraichissable; |
import org.tela_botanica.client.interfaces.VueListable; |
|
import com.google.gwt.user.client.Element; |
import com.google.gwt.user.client.ui.Label; |
import com.gwtext.client.core.EventObject; |
import com.gwtext.client.core.ExtElement; |
import com.gwtext.client.core.XTemplate; |
import com.gwtext.client.data.FieldDef; |
import com.gwtext.client.data.IntegerFieldDef; |
18,17 → 16,9 |
import com.gwtext.client.util.Format; |
import com.gwtext.client.widgets.Component; |
import com.gwtext.client.widgets.DataView; |
import com.gwtext.client.widgets.PagingToolbar; |
import com.gwtext.client.widgets.Panel; |
import com.gwtext.client.widgets.ToolTip; |
import com.gwtext.client.widgets.Toolbar; |
import com.gwtext.client.widgets.ToolbarButton; |
import com.gwtext.client.widgets.ToolbarTextItem; |
import com.gwtext.client.widgets.event.ContainerListenerAdapter; |
import com.gwtext.client.widgets.event.DataViewListenerAdapter; |
import com.gwtext.client.widgets.form.Field; |
import com.gwtext.client.widgets.form.NumberField; |
import com.gwtext.client.widgets.form.event.FieldListenerAdapter; |
|
/** |
* Galerie d'images miniatures |
35,8 → 25,7 |
* Avec barre de pagination |
* @author aurelien |
*/ |
public class GalerieImageVue extends Panel implements Rafraichissable, |
VueListable { |
public class GalerieImageVue extends Panel implements Rafraichissable, VueListable { |
|
/** |
* instance du médiateur |
79,6 → 68,7 |
this.addListener(new ContainerListenerAdapter() { |
|
// pour gagner du temps on n'instancie la vue en elle même que lors du premier affichage (lazy rendering) |
|
public void onShow(Component component) { |
|
if (!estInstancie) { |
104,6 → 94,7 |
dView.addListener(new DataViewListenerAdapter() { |
|
// gestion du clic sur une image |
|
public void onClick(DataView source, int index, Element node, |
EventObject e) { |
|
113,6 → 104,7 |
} |
|
// gestion du clic droit |
|
public void onContextMenu(DataView source, int index, Element node, |
EventObject e) { |
|
124,6 → 116,7 |
} |
|
// gestion du double clic |
|
public void onDblClick(DataView source, int index, Element node, |
EventObject e) { |
|
133,6 → 126,7 |
} |
|
// gestion des actions en fonction de la selection |
|
public void onSelectionChange(DataView view, Element[] selections) { |
|
// s'il n'y a aucun élement sélectionné |
222,6 → 216,7 |
// cree precedemment |
dView = new DataView("div.thumb-wrap") { |
|
|
public void prepareData(Data data) { |
data.setProperty("shortName", Format.ellipsis(data |
.getProperty("num_image"), 15)); |