-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path1046.html
43 lines (43 loc) · 5.68 KB
/
1046.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
<html><head><title>DeleteShapeCommand.java</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" type="text/css" href="sourcestyles.css" />
</head><body link="blue" vlink="blue">
<h3>File: /Users/shatabdi/Education/GitHub/se450_project/src/model/commands/DeleteShapeCommand.java</h3>
<SCRIPT>
defaultStatus = "File: /Users/shatabdi/Education/GitHub/se450_project/src/model/commands/DeleteShapeCommand.java";
top.document.title = "DeleteShapeCommand.java";
</SCRIPT>
<pre><span class="default"></span><a name="1"><font size=-1>1 </font></a><span class="default"></span><span class="keyword">package </span><span class="default">model.<a href="dictionary_M.html#12">commands</a>;</span>
<a name="2"><font size=-1>2 </font></a><span class="default"></span>
<a name="3"><font size=-1>3 </font></a><span class="default"></span><span class="keyword">import </span><span class="default">controller.<a href="dictionary_C.html#18">interfaces</a>.<a href="dictionary_C.html#15">ICommand</a>;</span>
<a name="4"><font size=-1>4 </font></a><span class="default"></span><span class="keyword">import </span><span class="default">controller.<a href="dictionary_C.html#18">interfaces</a>.<a href="dictionary_C.html#160">IUndoable</a>;</span>
<a name="5"><font size=-1>5 </font></a><span class="default"></span><span class="keyword">import </span><span class="default">model.<a href="dictionary_M.html#17">shape</a>.<a href="dictionary_M.html#363">DeleteShape</a>;</span>
<a name="6"><font size=-1>6 </font></a><span class="default"></span>
<a name="7"><font size=-1>7 </font></a><span class="default"></span><span class="keyword">public class <a href="dictionary_M.html#1047">DeleteShapeCommand</a> implements <a href="dictionary_C.html#15">ICommand</a></span><span class="default">, <a href="dictionary_C.html#160">IUndoable</a> {</span>
<a name="8"><font size=-1>8 </font></a><span class="default"> <a href="dictionary_M.html#363">DeleteShape</a> <a href="dictionary_M.html#1053">deleteShape</a>;</span>
<a name="9"><font size=-1>9 </font></a><span class="default"></span>
<a name="10"><font size=-1>10 </font></a><span class="default"> </span><span class="keyword">public <a href="dictionary_M.html#1048">DeleteShapeCommand</a></span><span class="default">(<a href="dictionary_M.html#363">DeleteShape</a> <a href="dictionary_M.html#1049">deleteShape</a>) {</span>
<a name="11"><font size=-1>11 </font></a><span class="default"> </span><span class="keyword">this</span><span class="default">.<a href="dictionary_M.html#1053">deleteShape</a> = <a href="dictionary_M.html#1049">deleteShape</a>;</span>
<a name="12"><font size=-1>12 </font></a><span class="default"> }</span>
<a name="13"><font size=-1>13 </font></a><span class="default"></span>
<a name="14"><font size=-1>14 </font></a><span class="default"> @<a href="dictionary_O.html#2">Override</a></span>
<a name="15"><font size=-1>15 </font></a><span class="default"> </span><span class="keyword">public void <a href="dictionary_M.html#1051">run</a></span><span class="default">() {</span>
<a name="16"><font size=-1>16 </font></a><span class="default"> <a href="dictionary_M.html#1053">deleteShape</a>.<a href="dictionary_M.html#366">delete</a>();</span>
<a name="17"><font size=-1>17 </font></a><span class="default"> System.out.<a href="dictionary_P.html#8">println</a>(</span><span class="string">"Selected Shapes Removed!"</span><span class="default">);</span>
<a name="18"><font size=-1>18 </font></a><span class="default"> <a href="dictionary_M.html#177">CommandHistory</a>.<a href="dictionary_M.html#711">add</a>(</span><span class="keyword">this</span><span class="default">);</span>
<a name="19"><font size=-1>19 </font></a><span class="default"> }</span>
<a name="20"><font size=-1>20 </font></a><span class="default"></span>
<a name="21"><font size=-1>21 </font></a><span class="default"> @<a href="dictionary_O.html#2">Override</a></span>
<a name="22"><font size=-1>22 </font></a><span class="default"> </span><span class="keyword">public void <a href="dictionary_M.html#1052">undo</a></span><span class="default">() {</span>
<a name="23"><font size=-1>23 </font></a><span class="default"> <a href="dictionary_M.html#1053">deleteShape</a>.<a href="dictionary_M.html#369">undo</a>();</span>
<a name="24"><font size=-1>24 </font></a><span class="default"> System.out.<a href="dictionary_P.html#8">println</a>(</span><span class="string">"Delete Shapes Undo called!"</span><span class="default">);</span>
<a name="25"><font size=-1>25 </font></a><span class="default"> }</span>
<a name="26"><font size=-1>26 </font></a><span class="default"></span>
<a name="27"><font size=-1>27 </font></a><span class="default"> @<a href="dictionary_O.html#2">Override</a></span>
<a name="28"><font size=-1>28 </font></a><span class="default"> </span><span class="keyword">public void <a href="dictionary_M.html#1050">redo</a></span><span class="default">() {</span>
<a name="29"><font size=-1>29 </font></a><span class="default"> <a href="dictionary_M.html#1053">deleteShape</a>.<a href="dictionary_M.html#368">redo</a>();</span>
<a name="30"><font size=-1>30 </font></a><span class="default"> System.out.<a href="dictionary_P.html#8">println</a>(</span><span class="string">"Delete Shapes Redo called"</span><span class="default">);</span>
<a name="31"><font size=-1>31 </font></a><span class="default"> }</span>
<a name="32"><font size=-1>32 </font></a><span class="default">}</span>
<a name="33"><font size=-1>33 </font></a><span class="default"></span>
</pre></body></html>