-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSampleB-code2.html
67 lines (63 loc) · 2.68 KB
/
SampleB-code2.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>SampleB-2</title>
<meta charset="UTF-8">
<!script src="https://cdn.jsdelivr.net/gh/google/code-prettify@master/loader/run_prettify.js?lang=css&skin=sunburst"><!/script>
<script src="https://cdn.rawgit.com/google/code-prettify/master/loader/run_prettify.js"></script>
<link rel="stylesheet" type="text/css" href="./prettify.css">
<!link rel="stylesheet" type="text/css" href="./float.css">
</head>
<body>
<!div class="sequence_float">
<!pre class="prettyprint linenums lang-java call_float">
<pre class="prettyprint linenums lang-java">
public class ActionRemoveFromDiagram extends AbstractAction {
public void actionPerformed(ActionEvent ae) {
Editor ce = Globals.<a href="#curEditor" name="rcurEditor">curEditor()</a>;
List<Fig> figs = ce.<a href="#getSelectionManager" name="rgetSelectionManager">getSelectionManager()</a>.<a href="#getFigs" name="rgetFigs">getFigs()</a>;
for (Fig f : figs) {
f.removeFromDiagram();
}
}
}
</pre>
<pre class="prettyprint linenums lang-java">
public class Globals {
protected static Editor _curEditor;
public static Editor <a name="curEditor">curEditor()</a> {
return _curEditor;
}<a href="#rcurEditor" > //return to the caller</a>
}
</pre>
<pre class="prettyprint linenums lang-java">
public class Editor implements Serializable, MouseListener,
MouseMotionListener, KeyListener {
protected SelectionManager _selectionManager = new SelectionManager(this);
public SelectionManager <a name="getSelectionManager">getSelectionManager()</a> {
return _selectionManager;
}<a href="#rgetSelectionManager"> //return to the caller</a>
}
</pre>
<pre class="prettyprint linenums lang-java">
public class SelectionManager implements Serializable, KeyListener,
MouseListener, MouseMotionListener {
private List<Selection> selections = new ArrayList<Selection>();
public Vector<Fig> <a name="getFigs">getFigs()</a> {
Vector<Fig> figs = new Vector<Fig>(selections.size());
figs.addElement(((Selection) selections.get(i)).<a href="#getContent" name="rgetContent">getContent())</a>;
return figs;
}<a href="#rgetFigs"> //return to the caller</a>
}
</pre>
<pre class="prettyprint linenums lang-java">
public abstract class Selection implements Serializable, MouseListener,
MouseMotionListener, KeyListener {
private Fig content;
public Fig <a name="getContent">getContent()</a> {
return content;
}<a href="#rgetContent"> //return to the caller</a>
}
</pre>
<p style="margin-bottom:100em;"></p>
</body>