GClear interface

De Wiki
Aller à : navigation, rechercher

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 →