ButtonDelete.js 839 B

12345678910111213141516171819202122
  1. /**
  2. * This notice must be untouched at all times. This is the COMPRESSED version of
  3. * Draw2D WebSite: http://www.draw2d.org Copyright: 2006 Andreas Herz. All
  4. * rights reserved. Created: 5.11.2006 by Andreas Herz (Web:
  5. * http://www.freegroup.de ) LICENSE: LGPL
  6. */
  7. draw2d.ButtonDelete = function(_20e8) {
  8. this.imagePath = '/js/designer/draw2d/';
  9. draw2d.Button.call(this, _20e8, 16, 16);
  10. };
  11. draw2d.ButtonDelete.prototype = new draw2d.Button;
  12. draw2d.ButtonDelete.prototype.type = "ButtonDelete";
  13. draw2d.ButtonDelete.prototype.getImageUrl = function() {
  14. return this.imagePath+this.type + ".png";
  15. };
  16. draw2d.ButtonDelete.prototype.execute = function() {
  17. this.palette.workflow.getCommandStack().execute(
  18. new draw2d.CommandDelete(this.palette.workflow
  19. .getCurrentSelection()));
  20. draw2d.ToolGeneric.prototype.execute.call(this);
  21. };