You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by tv...@apache.org on 2009/05/12 23:15:28 UTC

svn commit: r774093 - /incubator/pivot/trunk/tutorials/src/pivot/tutorials/Demo.java

Author: tvolkert
Date: Tue May 12 21:15:27 2009
New Revision: 774093

URL: http://svn.apache.org/viewvc?rev=774093&view=rev
Log:
Made tutorial demo not keep a reference to the Display 

Modified:
    incubator/pivot/trunk/tutorials/src/pivot/tutorials/Demo.java

Modified: incubator/pivot/trunk/tutorials/src/pivot/tutorials/Demo.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/tutorials/src/pivot/tutorials/Demo.java?rev=774093&r1=774092&r2=774093&view=diff
==============================================================================
--- incubator/pivot/trunk/tutorials/src/pivot/tutorials/Demo.java (original)
+++ incubator/pivot/trunk/tutorials/src/pivot/tutorials/Demo.java Tue May 12 21:15:27 2009
@@ -274,7 +274,7 @@
                         if (button == Mouse.Button.RIGHT
                             || (button == Mouse.Button.LEFT
                                 && Keyboard.isPressed(Keyboard.Modifier.CTRL))) {
-                            menuPopup.open(window, component.mapPointToAncestor(display, x, y));
+                            menuPopup.open(window, component.mapPointToAncestor(component.getDisplay(), x, y));
                         }
 
                         return false;
@@ -675,8 +675,6 @@
         }
     }
 
-    private Display display = null;
-
     @Load(name="demo.wtkx") private Window window;
     @Bind(property="window") private Rollup buttonsRollup;
     @Bind(property="window") private Rollup listsRollup;
@@ -696,8 +694,7 @@
         DesktopApplicationContext.main(Demo.class, args);
     }
 
-    @SuppressWarnings("unchecked")
-    public void startup(final Display display, Dictionary<String, String> properties) throws Exception {
+    public void startup(Display display, Dictionary<String, String> properties) throws Exception {
         // NOTE This is commented out because it takes a non-negligible amount
         // of time to execute
         /*
@@ -706,8 +703,6 @@
         terraTheme.loadScheme(schemeLocation);
         */
 
-        this.display = display;
-
         bind();
 
         buttonsRollup.getRollupStateListeners().add(new ButtonsRollupStateHandler());