|
@@ -47,9 +47,6 @@ import java.util.HashSet;
|
47
|
47
|
import java.util.List;
|
48
|
48
|
import java.util.Optional;
|
49
|
49
|
import java.util.Set;
|
50
|
|
-import java.util.concurrent.CopyOnWriteArrayList;
|
51
|
|
-
|
52
|
|
-import javax.annotation.Nullable;
|
53
|
50
|
|
54
|
51
|
import static com.google.common.base.Preconditions.checkState;
|
55
|
52
|
|
|
@@ -61,10 +58,6 @@ public abstract class FrameContainer implements WindowModel {
|
61
|
58
|
|
62
|
59
|
/** Listeners not yet using ListenerSupport. */
|
63
|
60
|
protected final ListenerList listeners = new ListenerList();
|
64
|
|
- /** The children of this frame. */
|
65
|
|
- private final Collection<WindowModel> children = new CopyOnWriteArrayList<>();
|
66
|
|
- /** The parent of this frame. */
|
67
|
|
- private final Optional<WindowModel> parent;
|
68
|
61
|
/** The name of the icon being used for this container's frame. */
|
69
|
62
|
private String icon;
|
70
|
63
|
/** The name of this container. */
|
|
@@ -108,7 +101,6 @@ public abstract class FrameContainer implements WindowModel {
|
108
|
101
|
* Instantiate new frame container.
|
109
|
102
|
*/
|
110
|
103
|
protected FrameContainer(
|
111
|
|
- @Nullable final WindowModel parent,
|
112
|
104
|
final String icon,
|
113
|
105
|
final String name,
|
114
|
106
|
final String title,
|
|
@@ -116,7 +108,6 @@ public abstract class FrameContainer implements WindowModel {
|
116
|
108
|
final BackBufferFactory backBufferFactory,
|
117
|
109
|
final DMDircMBassador eventBus,
|
118
|
110
|
final Collection<String> components) {
|
119
|
|
- this.parent = Optional.ofNullable(parent);
|
120
|
111
|
this.configManager = config;
|
121
|
112
|
this.name = name;
|
122
|
113
|
this.title = title;
|
|
@@ -139,7 +130,6 @@ public abstract class FrameContainer implements WindowModel {
|
139
|
130
|
* Instantiate new frame container that accepts user input.
|
140
|
131
|
*/
|
141
|
132
|
protected FrameContainer(
|
142
|
|
- @Nullable final WindowModel parent,
|
143
|
133
|
final String icon,
|
144
|
134
|
final String name,
|
145
|
135
|
final String title,
|
|
@@ -148,7 +138,6 @@ public abstract class FrameContainer implements WindowModel {
|
148
|
138
|
final TabCompleter tabCompleter,
|
149
|
139
|
final DMDircMBassador eventBus,
|
150
|
140
|
final Collection<String> components) {
|
151
|
|
- this.parent = Optional.ofNullable(parent);
|
152
|
141
|
this.configManager = config;
|
153
|
142
|
this.name = name;
|
154
|
143
|
this.title = title;
|
|
@@ -176,11 +165,6 @@ public abstract class FrameContainer implements WindowModel {
|
176
|
165
|
this.commandParser = Optional.ofNullable(commandParser);
|
177
|
166
|
}
|
178
|
167
|
|
179
|
|
- @Override
|
180
|
|
- public Optional<WindowModel> getParent() {
|
181
|
|
- return parent;
|
182
|
|
- }
|
183
|
|
-
|
184
|
168
|
@Override
|
185
|
169
|
public String getIcon() {
|
186
|
170
|
return icon;
|
|
@@ -211,21 +195,6 @@ public abstract class FrameContainer implements WindowModel {
|
211
|
195
|
return writable;
|
212
|
196
|
}
|
213
|
197
|
|
214
|
|
- @Override
|
215
|
|
- public Collection<WindowModel> getChildren() {
|
216
|
|
- return Collections.unmodifiableCollection(children);
|
217
|
|
- }
|
218
|
|
-
|
219
|
|
- @Override
|
220
|
|
- public void addChild(final WindowModel child) {
|
221
|
|
- children.add(child);
|
222
|
|
- }
|
223
|
|
-
|
224
|
|
- @Override
|
225
|
|
- public void removeChild(final WindowModel child) {
|
226
|
|
- children.remove(child);
|
227
|
|
- }
|
228
|
|
-
|
229
|
198
|
/**
|
230
|
199
|
* Changes the name of this container, and fires a {@link FrameNameChangedEvent}.
|
231
|
200
|
*
|