NetworkTreeWindow.java 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package de.tu_darmstadt.tk.SmartHomeNetworkSim.view.popups;
  2. import java.awt.Container;
  3. import java.awt.Rectangle;
  4. import javax.swing.JFrame;
  5. import de.tu_darmstadt.tk.SmartHomeNetworkSim.control.Controller;
  6. import de.tu_darmstadt.tk.SmartHomeNetworkSim.view.util.Utility;
  7. /**
  8. * Frame which contains the Network Tree
  9. *
  10. * @author Andreas T. Meyer-Berg
  11. */
  12. public class NetworkTreeWindow extends JFrame {
  13. /**
  14. * Serial Version number
  15. */
  16. private static final long serialVersionUID = -4052775416023427170L;
  17. /**
  18. * Frame which contains the Network Tree
  19. * @param controller controller which should be used to get and edit the Model
  20. * @param parent Parent component, which opens this window
  21. */
  22. public NetworkTreeWindow(Controller controller, Container parent) {
  23. setBounds(new Rectangle(0, 0, 800, 600));
  24. setResizable(true);
  25. setTitle("Network Tree View");
  26. setIconImage(Utility.loadFile("images/smartHome_icon.png"));
  27. this.setContentPane(new NetworkTreePanel(controller,this));
  28. this.setLocationRelativeTo(parent);
  29. }
  30. }