EventsControl.js 884 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. define( function() {
  2. "use strict";
  3. var bAlert = false;
  4. function Control()
  5. {
  6. };
  7. Control.prototype.initialize = function( oControlHost, fnDoneInitializing )
  8. {
  9. this.log( "CustomControl.initialize" );
  10. fnDoneInitializing();
  11. };
  12. Control.prototype.show = function( oControlHost )
  13. {
  14. this.log( "CustomControl.show" );
  15. };
  16. Control.prototype.hide = function( oControlHost )
  17. {
  18. this.log( "CustomControl.hide" );
  19. };
  20. Control.prototype.draw = function( oControlHost )
  21. {
  22. this.log( "CustomControl.draw" );
  23. oControlHost.container.innerHTML = "Hello";
  24. };
  25. Control.prototype.getParameters = function( oControlHost )
  26. {
  27. this.log( "CustomControl.getParameters" );
  28. return null;
  29. };
  30. Control.prototype.destroy = function( oControlHost )
  31. {
  32. this.log( "CustomControl.destroy" );
  33. };
  34. Control.prototype.log = function( s )
  35. {
  36. console.log( s );
  37. if ( bAlert )
  38. {
  39. alert( s );
  40. }
  41. };
  42. return Control;
  43. });