[Tinyos-contrib-commits] CVS: tinyos-1.x/contrib/eyes/tools/java/de/tub/eyes/diagram NodeSurge.java, 1.1, 1.2

Till Wimmer twimmer at users.sourceforge.net
Mon Apr 24 07:09:14 PDT 2006


Update of /cvsroot/tinyos/tinyos-1.x/contrib/eyes/tools/java/de/tub/eyes/diagram
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27382

Modified Files:
	NodeSurge.java 
Log Message:
added set/get Visible methods; paint only when visible

Index: NodeSurge.java
===================================================================
RCS file: /cvsroot/tinyos/tinyos-1.x/contrib/eyes/tools/java/de/tub/eyes/diagram/NodeSurge.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** NodeSurge.java	19 Oct 2005 15:22:27 -0000	1.1
--- NodeSurge.java	24 Apr 2006 14:09:12 -0000	1.2
***************
*** 51,54 ****
--- 51,55 ----
      String name;
      Date date;
+     boolean visible = false;
  
      /**
***************
*** 140,143 ****
--- 141,147 ----
       */
      public void paint(Graphics g) {
+         if ( !visible )
+             return;
+         
          Graphics2D g2 = (Graphics2D) g;
          g2.setColor(node);
***************
*** 360,362 ****
--- 364,374 ----
          return new NodePS(this.x, this.y, this.diagram, this.date);
      }
+     
+     public void setVisible(boolean visible) {
+         this.visible = visible;
+     }
+     
+     public boolean getVisible() {
+         return this.visible;
+     }
  }



More information about the Tinyos-contrib-commits mailing list