Revision: 706
Author: allain.lalonde
Date: Tue Oct 13 18:38:51 2009
Log: Adding P3DRectExample to examples
http://code.google.com/p/piccolo2d/source/detail?r=706

Added:
   
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/P3DRectExample.java
Modified:
   
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/ActivityExample.java
   
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/ExampleRunner.java

=======================================
--- /dev/null
+++  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/P3DRectExample.java
     
Tue Oct 13 18:38:51 2009
@@ -0,0 +1,35 @@
+package edu.umd.cs.piccolo.examples;
+
+import java.awt.Color;
+
+import edu.umd.cs.piccolo.PCanvas;
+import edu.umd.cs.piccolox.PFrame;
+import edu.umd.cs.piccolox.nodes.P3DRect;
+
+public class P3DRectExample extends PFrame {
+
+    public P3DRectExample() {
+        this(null);
+    }
+
+    public P3DRectExample(final PCanvas aCanvas) {
+        super("P3DRect Example", false, aCanvas);
+    }
+
+    public void initialize() {
+        final P3DRect rect1 = new P3DRect(50, 50, 100, 100);
+        rect1.setPaint(new Color(239, 235, 222));
+        getCanvas().getLayer().addChild(rect1);
+
+        final P3DRect rect2 = new P3DRect(50, 50, 100, 100);
+        rect2.setPaint(new Color(239, 235, 222));
+        rect2.translate(110, 0);
+        rect2.setRaised(false);
+        getCanvas().getLayer().addChild(rect2);
+    }
+
+    public static void main(String[] args) {
+        new P3DRectExample();
+    }
+
+}
=======================================
---  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/ActivityExample.java
    
Tue Jul 28 12:46:54 2009
+++  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/ActivityExample.java
    
Tue Oct 13 18:38:51 2009
@@ -41,10 +41,6 @@
   * This example shows how create and schedule activities.
   */
  public class ActivityExample extends PFrame {
-
-    /**
-     *
-     */
      private static final long serialVersionUID = 1L;

      public ActivityExample() {
=======================================
---  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/ExampleRunner.java
      
Thu Aug 20 13:59:03 2009
+++  
/piccolo2d.java/trunk/examples/src/main/java/edu/umd/cs/piccolo/examples/ExampleRunner.java
      
Tue Oct 13 18:38:51 2009
@@ -110,7 +110,7 @@
                  HandleExample.class, HelloWorldExample.class,  
HierarchyZoomExample.class, HtmlViewExample.class,
                  KeyEventFocusExample.class, LayoutExample.class,  
LensExample.class, NavigationExample.class,
                  NodeCacheExample.class, NodeEventExample.class,  
NodeExample.class, NodeLinkExample.class,
-                PanToExample.class, PathExample.class,  
PositionExample.class, PositionPathActivityExample.class,
+                P3DRectExample.class, PanToExample.class,  
PathExample.class, PositionExample.class, PositionPathActivityExample.class,
                  PulseExample.class, ScrollingExample.class,  
SelectionExample.class, ShadowExample.class,
                  SquiggleExample.class, StickyExample.class,  
StickyHandleLayerExample.class, StrokeExample.class,
                  TextExample.class, TooltipExample.class,  
TwoCanvasExample.class, WaitForActivitiesExample.class });
@@ -125,12 +125,7 @@
      private JButton buildExampleButton(final Class exampleClass) {
          final String fullClassName = exampleClass.getName();
          final String simpleClassName =  
fullClassName.substring(fullClassName.lastIndexOf('.') + 1);
-        return new JButton(new AbstractAction(simpleClassName) {
-            /**
-             *
-             */
-            private static final long serialVersionUID = 1L;
-
+        return new JButton(new AbstractAction(simpleClassName) {
              public void actionPerformed(final ActionEvent event) {
                  try {
                      final PFrame example = (PFrame)  
exampleClass.newInstance();

--~--~---------~--~----~------------~-------~--~----~
Piccolo2D Developers Group: http://groups.google.com/group/piccolo2d-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to