GClear interface

De GENIUS
Révision datée du 5 mai 2017 à 11:58 par Admin (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

As for the GReadWrite interface, GENIUS proposes a GClear interface in order to reinitialize data:

  • The data are then reinitialized to the default value given when the widget has been instantiated
  • There is the possibility to change this default value by using the setDefaultValue() method
public class GManoeuvre extends GContainer implements GDisplay, GReadWrite, GClear {

   public void clear() throws GException { generic(); }

At last, you will just have to call the mainClear() method of the high level object you want to clear (it will correctly call the put methods of the lower level objects, as for display()) …

public void after(GEvent e) throws GException {
  if ( e.contains(butClear) ){ obj.mainClear(); }
}


Return to the introduction ↑ Go to the next page →