Gridarta Editor
ErrorEntry.java
Go to the documentation of this file.
1
/*
2
* Gridarta MMORPG map editor for Crossfire, Daimonin and similar games.
3
* Copyright (C) 2000-2015 The Gridarta Developers.
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License as published by
7
* the Free Software Foundation; either version 2 of the License, or
8
* (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License along
16
* with this program; if not, write to the Free Software Foundation, Inc.,
17
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18
*/
19
20
package
net.sf.gridarta.gui.dialog.errorview;
21
22
import
javax.swing.tree.DefaultMutableTreeNode;
23
import
javax.swing.tree.DefaultTreeModel;
24
import
javax.swing.tree.MutableTreeNode;
25
import
org.jetbrains.annotations.NotNull;
26
31
public
class
ErrorEntry
extends
DefaultMutableTreeNode {
32
36
private
static
final
long
serialVersionUID
= 1L;
37
41
@NotNull
42
private
final
DefaultTreeModel
treeModel
;
43
50
public
ErrorEntry
(@NotNull
final
DefaultTreeModel
treeModel
, @NotNull
final
String name,
final
boolean
allowsChildren) {
51
super(name, allowsChildren);
52
this.treeModel =
treeModel
;
53
}
54
55
@Override
56
public
void
add
(@NotNull
final
MutableTreeNode newChild) {
57
super.add(newChild);
58
treeModel
.nodesWereInserted(
this
,
new
int
[] { getChildCount() - 1, });
59
}
60
61
}
net.sf.gridarta.gui.dialog.errorview.ErrorEntry.treeModel
final DefaultTreeModel treeModel
Definition:
ErrorEntry.java:42
net.sf.gridarta.gui.dialog.errorview.ErrorEntry.add
void add(@NotNull final MutableTreeNode newChild)
Definition:
ErrorEntry.java:56
net.sf.gridarta.gui.dialog.errorview.ErrorEntry.ErrorEntry
ErrorEntry(@NotNull final DefaultTreeModel treeModel, @NotNull final String name, final boolean allowsChildren)
Definition:
ErrorEntry.java:50
net.sf.gridarta.gui.dialog.errorview.ErrorEntry.serialVersionUID
static final long serialVersionUID
Definition:
ErrorEntry.java:36
net.sf.gridarta.gui.dialog.errorview.ErrorEntry
Definition:
ErrorEntry.java:31
src
gridarta
src
main
java
net
sf
gridarta
gui
dialog
errorview
ErrorEntry.java
Generated by
1.8.17