|
@@ -9,12 +9,14 @@ import java.util.LinkedList;
|
|
|
import java.util.Observable;
|
|
|
import java.util.Observer;
|
|
|
|
|
|
+import javax.swing.ImageIcon;
|
|
|
import javax.swing.JFrame;
|
|
|
import javax.swing.JMenuItem;
|
|
|
import javax.swing.JPopupMenu;
|
|
|
import javax.swing.JScrollPane;
|
|
|
import javax.swing.JTree;
|
|
|
import javax.swing.SwingUtilities;
|
|
|
+import javax.swing.UIManager;
|
|
|
import javax.swing.event.TreeExpansionEvent;
|
|
|
import javax.swing.event.TreeSelectionEvent;
|
|
|
import javax.swing.event.TreeSelectionListener;
|
|
@@ -32,6 +34,7 @@ import de.tu_darmstadt.tk.SmartHomeNetworkSim.core.Link;
|
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.core.Port;
|
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.core.SmartDevice;
|
|
|
import de.tu_darmstadt.tk.SmartHomeNetworkSim.core.configuration.NetworkTreeNodeStatus;
|
|
|
+import de.tu_darmstadt.tk.SmartHomeNetworkSim.view.util.Utility;
|
|
|
|
|
|
/**
|
|
|
* Network Tree Panel which visualizes the Network as a Tree
|
|
@@ -250,6 +253,11 @@ public class NetworkTreePanel extends JScrollPane implements Observer {
|
|
|
super.windowClosing(e);
|
|
|
}
|
|
|
});
|
|
|
+
|
|
|
+ //Adds + - as icons for expanding and collapsing the tree
|
|
|
+ UIManager.put("Tree.expandedIcon", new ImageIcon(Utility.loadFile("images/treeMinus.gif")));
|
|
|
+ UIManager.put("Tree.collapsedIcon", new ImageIcon(Utility.loadFile("images/treePlus.gif")));
|
|
|
+
|
|
|
update(null, null);
|
|
|
}
|
|
|
|