13,87 → 13,78 |
import com.gwtext.client.widgets.form.TextField; |
|
public class IdVue extends Window implements Rafraichissable { |
|
private ImageMediateur iMediateur ; |
private TextField champId = null ; |
private Button ok = null ; |
|
public IdVue(ImageMediateur im) |
{ |
super("Identification") ; |
|
iMediateur = im ; |
|
champId = new TextField() ; |
ok = new Button("OK") ; |
|
add(champId) ; |
add(ok) ; |
|
setSize(156,75) ; |
setClosable(false) ; |
setModal(true) ; |
this.setCloseAction(HIDE) ; |
|
|
ajouterListeners() ; |
|
private ImageMediateur iMediateur; |
private TextField champId = null; |
private Button ok = null; |
|
public IdVue(ImageMediateur im) { |
super("Identification"); |
|
iMediateur = im; |
|
champId = new TextField(); |
ok = new Button("OK"); |
|
add(champId); |
add(ok); |
|
setSize(156, 75); |
setClosable(false); |
setModal(true); |
this.setCloseAction(HIDE); |
|
ajouterListeners(); |
} |
|
|
private void ajouterListeners() { |
|
// gestion du clic sur le bouton |
ok.addListener(new ButtonListenerAdapter() { |
|
|
public void onClick(Button button, EventObject e) { |
|
valider() ; |
|
valider(); |
} |
|
}) ; |
|
|
}); |
|
// gestion de la touche entrée |
champId.addKeyListener(EventObject.ENTER, new KeyListener() { |
|
public void onKey(int key, EventObject e) { |
|
valider() ; |
|
valider(); |
} |
|
|
}) ; |
|
|
}); |
|
this.addListener(new WindowListenerAdapter() { |
|
public void onClose(Panel panel) { |
|
|
|
} |
|
|
}); |
|
|
} |
|
public ImageMediateur getIMediateur() |
{ |
return iMediateur ; |
|
public ImageMediateur getIMediateur() { |
return iMediateur; |
} |
|
|
protected void valider() { |
|
String id = champId.getText() ; |
getIMediateur().setIdentifiant(""+id.hashCode()) ; |
getIMediateur().changerUtilisateur() ; |
this.close() ; |
|
|
String id = champId.getText(); |
getIMediateur().setIdentifiant("" + id.hashCode()); |
getIMediateur().changerUtilisateur(); |
this.close(); |
|
} |
|
public void rafraichir(Object nouvelleDonnees, |
boolean repandreRaffraichissement) { |
|
|
|
} |
|
|
} |