NetworkTreeNodeStatus.java 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. package de.tu_darmstadt.tk.SmartHomeNetworkSim.core.configuration;
  2. /**
  3. * Status of node in the NetworkTree, stores information like if it is visible, expanded and which object is represented
  4. *
  5. * @author Andreas T. Meyer-Berg
  6. */
  7. public class NetworkTreeNodeStatus {
  8. /**
  9. * Is the TreeNode expanded
  10. */
  11. private boolean expanded;
  12. /**
  13. * Is the object visible or hidden
  14. */
  15. private boolean visible;
  16. /**
  17. * Object which is represented
  18. */
  19. private Object nodeObject;
  20. /**
  21. * Creates a new NetorkTreeNodeStatus for the object o, which is visible and not expanded
  22. * @param o Object for the new status
  23. */
  24. public NetworkTreeNodeStatus(Object o) {
  25. nodeObject = o;
  26. visible = true;
  27. expanded = false;
  28. }
  29. /**
  30. * @return the expanded
  31. */
  32. public boolean isExpanded() {
  33. return expanded;
  34. }
  35. /**
  36. * @param expanded the expanded to set
  37. */
  38. public void setExpanded(boolean expanded) {
  39. this.expanded = expanded;
  40. }
  41. /**
  42. * @return the visible
  43. */
  44. public boolean isVisible() {
  45. return visible;
  46. }
  47. /**
  48. * @param visible the visible to set
  49. */
  50. public void setVisible(boolean visible) {
  51. this.visible = visible;
  52. }
  53. /**
  54. * @return the nodeObject
  55. */
  56. public Object getNodeObject() {
  57. return nodeObject;
  58. }
  59. /**
  60. * @param nodeObject the nodeObject to set
  61. */
  62. public void setNodeObject(Object nodeObject) {
  63. this.nodeObject = nodeObject;
  64. }
  65. }