Advertisement
AishaAli

Untitled

Nov 19th, 2019
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. /*
  2. @(#)DeleteCommand.java 5.2
  3. */
  4.  
  5. package CH.ifa.draw.standard;
  6.  
  7. import java.util.*;
  8. import CH.ifa.draw.util.Command;
  9. import CH.ifa.draw.framework.*;
  10.  
  11.  
  12. public class DeleteCommand extends FigureTransferCommand {
  13.  
  14. public DeleteCommand(String name, DrawingView view) {
  15. super(name, view);
  16. }
  17.  
  18. public void execute() {
  19. deleteSelection();
  20. fView.checkDamage();
  21. }
  22.  
  23. public boolean isExecutable() {
  24. return fView.selectionCount() > 0;
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement