You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pivot.apache.org by sm...@apache.org on 2009/08/31 17:35:12 UTC
svn commit: r809627 - in /incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk:
ApplicationContext.java BrowserApplicationContext.java Container.java
DesktopApplicationContext.java
Author: smartini
Date: Mon Aug 31 15:35:11 2009
New Revision: 809627
URL: http://svn.apache.org/viewvc?rev=809627&view=rev
Log:
add some missing override, in some cases on methods of inner classes (not shown in eclipse warnings)
Modified:
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java
incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java?rev=809627&r1=809626&r2=809627&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java Mon Aug 31 15:35:11 2009
@@ -128,6 +128,7 @@
}
}
+ @Override
public void dragExit(DropTargetEvent event) {
// Clear mouse location
mouseLocation = null;
@@ -146,6 +147,7 @@
dropDescendant = null;
}
+ @Override
public void dragOver(DropTargetDragEvent event) {
java.awt.Point location = event.getLocation();
@@ -190,6 +192,7 @@
}
}
+ @Override
public void dropActionChanged(DropTargetDragEvent event) {
userDropAction = getDropAction(event.getDropAction());
@@ -213,6 +216,7 @@
}
}
+ @Override
public void drop(DropTargetDropEvent event) {
java.awt.Point location = event.getLocation();
dropDescendant = getDropDescendant(location.x, location.y);
@@ -615,26 +619,31 @@
awtDragSource.startDrag(trigger, java.awt.Cursor.getDefaultCursor(),
null, null, localManifestAdapter, new DragSourceListener() {
+ @Override
public void dragEnter(DragSourceDragEvent event) {
DragSourceContext context = event.getDragSourceContext();
context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
}
+ @Override
public void dragExit(DragSourceEvent event) {
DragSourceContext context = event.getDragSourceContext();
context.setCursor(java.awt.Cursor.getDefaultCursor());
}
+ @Override
public void dragOver(DragSourceDragEvent event) {
DragSourceContext context = event.getDragSourceContext();
context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
}
+ @Override
public void dropActionChanged(DragSourceDragEvent event) {
DragSourceContext context = event.getDragSourceContext();
context.setCursor(getDropCursor(getDropAction(event.getDropAction())));
}
+ @Override
public void dragDropEnd(DragSourceDropEvent event) {
DragSourceContext context = event.getDragSourceContext();
context.setCursor(java.awt.Cursor.getDefaultCursor());
@@ -1305,26 +1314,32 @@
*/
public static final class ResourceCacheDictionary
implements Dictionary<URL, Object>, Iterable<URL> {
+ @Override
public Object get(URL key) {
return resourceCache.get(key);
}
+ @Override
public Object put(URL key, Object value) {
return resourceCache.put(key, value);
}
+ @Override
public Object remove(URL key) {
return resourceCache.remove(key);
}
+ @Override
public boolean containsKey(URL key) {
return resourceCache.containsKey(key);
}
+ @Override
public boolean isEmpty() {
return resourceCache.isEmpty();
}
+ @Override
public Iterator<URL> iterator() {
return new ImmutableIterator<URL>(resourceCache.iterator());
}
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java?rev=809627&r1=809626&r2=809627&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java Mon Aug 31 15:35:11 2009
@@ -39,6 +39,7 @@
*/
public static final class HostApplet extends Applet {
private class InitCallback implements Runnable {
+ @Override
public void run() {
// Set the origin
URL codeBase = getCodeBase();
@@ -118,6 +119,7 @@
}
private class StartCallback implements Runnable {
+ @Override
public void run() {
// Load the application
Application application = null;
@@ -154,6 +156,7 @@
}
private class StopCallback implements Runnable {
+ @Override
public void run() {
Application application = applicationContext.getApplication();
if (application != null) {
@@ -167,6 +170,7 @@
}
private class DestroyCallback implements Runnable {
+ @Override
public void run() {
hostApplets.remove(HostApplet.this);
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java?rev=809627&r1=809626&r2=809627&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java Mon Aug 31 15:35:11 2009
@@ -37,24 +37,28 @@
implements Sequence<Component>, Iterable<Component> {
private static class ContainerListenerList extends ListenerList<ContainerListener>
implements ContainerListener {
+ @Override
public void componentInserted(Container container, int index) {
for (ContainerListener listener : this) {
listener.componentInserted(container, index);
}
}
+ @Override
public void componentsRemoved(Container container, int index, Sequence<Component> components) {
for (ContainerListener listener : this) {
listener.componentsRemoved(container, index, components);
}
}
+ @Override
public void contextKeyChanged(Container container, String previousContextKey) {
for (ContainerListener listener : this) {
listener.contextKeyChanged(container, previousContextKey);
}
}
+ @Override
public void focusTraversalPolicyChanged(Container container,
FocusTraversalPolicy previousFocusTraversalPolicy) {
for (ContainerListener listener : this) {
@@ -65,6 +69,7 @@
private static class ContainerMouseListenerList extends ListenerList<ContainerMouseListener>
implements ContainerMouseListener {
+ @Override
public boolean mouseMove(Container container, int x, int y) {
boolean consumed = false;
@@ -75,6 +80,7 @@
return consumed;
}
+ @Override
public boolean mouseDown(Container container, Mouse.Button button, int x, int y) {
boolean consumed = false;
@@ -85,6 +91,7 @@
return consumed;
}
+ @Override
public boolean mouseUp(Container container, Mouse.Button button, int x, int y) {
boolean consumed = false;
@@ -95,6 +102,7 @@
return consumed;
}
+ @Override
public boolean mouseWheel(Container container, Mouse.ScrollType scrollType,
int scrollAmount, int wheelRotation, int x, int y) {
boolean consumed = false;
@@ -122,6 +130,7 @@
private ContainerListenerList containerListeners = new ContainerListenerList();
private ContainerMouseListenerList containerMouseListeners = new ContainerMouseListenerList();
+ @Override
public final int add(Component component) {
int i = getLength();
insert(component, i);
@@ -129,6 +138,7 @@
return i;
}
+ @Override
public void insert(Component component, int index) {
if (component == null) {
throw new IllegalArgumentException("component is null.");
@@ -154,10 +164,12 @@
containerListeners.componentInserted(Container.this, index);
}
+ @Override
public Component update(int index, Component component) {
throw new UnsupportedOperationException();
}
+ @Override
public final int remove(Component component) {
int index = indexOf(component);
if (index != -1) {
@@ -167,6 +179,7 @@
return index;
}
+ @Override
public Sequence<Component> remove(int index, int count) {
Sequence<Component> removed = components.remove(index, count);
@@ -219,18 +232,22 @@
}
}
+ @Override
public Component get(int index) {
return components.get(index);
}
+ @Override
public int indexOf(Component component) {
return components.indexOf(component);
}
+ @Override
public int getLength() {
return components.getLength();
}
+ @Override
public Iterator<Component> iterator() {
return new ImmutableIterator<Component>(components.iterator());
}
Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java
URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java?rev=809627&r1=809626&r2=809627&view=diff
==============================================================================
--- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java (original)
+++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java Mon Aug 31 15:35:11 2009
@@ -113,6 +113,7 @@
// Create the proxy handler
InvocationHandler handler = new InvocationHandler() {
+ @Override
public Object invoke(Object proxy, Method method, Object[] args)
throws Throwable {
String methodName = method.getName();
@@ -370,6 +371,7 @@
};
Window.getWindowClassListeners().add(new WindowClassListener() {
+ @Override
public void activeWindowChanged(Window previousActiveWindow) {
if (previousActiveWindow != null) {
Window previousRootOwner = previousActiveWindow.getRootOwner();
@@ -385,6 +387,7 @@
if (updateFrameTitleBarCallback == null) {
updateFrameTitleBarCallback = new Runnable() {
+ @Override
public void run() {
Window activeWindow = Window.getActiveWindow();
if (activeWindow == null) {
Re: svn commit: r809627
Posted by Sandro Martini <sa...@gmail.com>.
Oh, sorry, I'll try tomorrow before next commits ...
Bye
Re: svn commit: r809627
Posted by Greg Brown <gk...@mac.com>.
OK, great. Can you just make sure that you run the trim-whitespace
target before you check in?
On Aug 31, 2009, at 11:48 AM, Sandro Martini wrote:
> Hi Greg,
> the defaults in NB 6.7.1 are: expand tabs with spaces, and default
> 4 ... :-)
>
> Bye
Re: svn commit: r809627
Posted by Sandro Martini <sa...@gmail.com>.
Hi Greg,
the defaults in NB 6.7.1 are: expand tabs with spaces, and default 4 ... :-)
Bye
Re: svn commit: r809627
Posted by Greg Brown <gk...@mac.com>.
Sandro,
Just a reminder to ensure that you trim any trailing whitespace before
checking in your changes. You can use the trim-whitespace Ant target
if your editor doesn't support it.
It looks like you are already doing this, but also make sure that your
editor is using spaces, not tabs, and an indent width of 4.
Thanks,
Greg
On Aug 31, 2009, at 11:35 AM, smartini@apache.org wrote:
> Author: smartini
> Date: Mon Aug 31 15:35:11 2009
> New Revision: 809627
>
> URL: http://svn.apache.org/viewvc?rev=809627&view=rev
> Log:
> add some missing override, in some cases on methods of inner classes
> (not shown in eclipse warnings)
>
> Modified:
> incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> ApplicationContext.java
> incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> BrowserApplicationContext.java
> incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java
> incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> DesktopApplicationContext.java
>
> Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> ApplicationContext.java
> URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/ApplicationContext.java?rev=809627&r1=809626&r2=809627&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> ApplicationContext.java (original)
> +++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> ApplicationContext.java Mon Aug 31 15:35:11 2009
> @@ -128,6 +128,7 @@
> }
> }
>
> + @Override
> public void dragExit(DropTargetEvent event) {
> // Clear mouse location
> mouseLocation = null;
> @@ -146,6 +147,7 @@
> dropDescendant = null;
> }
>
> + @Override
> public void dragOver(DropTargetDragEvent event) {
> java.awt.Point location = event.getLocation();
>
> @@ -190,6 +192,7 @@
> }
> }
>
> + @Override
> public void dropActionChanged(DropTargetDragEvent event) {
> userDropAction = getDropAction(event.getDropAction());
>
> @@ -213,6 +216,7 @@
> }
> }
>
> + @Override
> public void drop(DropTargetDropEvent event) {
> java.awt.Point location = event.getLocation();
> dropDescendant = getDropDescendant(location.x,
> location.y);
> @@ -615,26 +619,31 @@
>
> awtDragSource.startDrag(trigger,
> java.awt.Cursor.getDefaultCursor(),
> null, null, localManifestAdapter, new
> DragSourceListener() {
> + @Override
> public void dragEnter(DragSourceDragEvent event) {
> DragSourceContext context =
> event.getDragSourceContext();
>
> context
> .setCursor(getDropCursor(getDropAction(event.getDropAction())));
> }
>
> + @Override
> public void dragExit(DragSourceEvent event) {
> DragSourceContext context =
> event.getDragSourceContext();
>
> context.setCursor(java.awt.Cursor.getDefaultCursor());
> }
>
> + @Override
> public void dragOver(DragSourceDragEvent event) {
> DragSourceContext context =
> event.getDragSourceContext();
>
> context
> .setCursor(getDropCursor(getDropAction(event.getDropAction())));
> }
>
> + @Override
> public void dropActionChanged(DragSourceDragEvent
> event) {
> DragSourceContext context =
> event.getDragSourceContext();
>
> context
> .setCursor(getDropCursor(getDropAction(event.getDropAction())));
> }
>
> + @Override
> public void dragDropEnd(DragSourceDropEvent event) {
> DragSourceContext context =
> event.getDragSourceContext();
>
> context.setCursor(java.awt.Cursor.getDefaultCursor());
> @@ -1305,26 +1314,32 @@
> */
> public static final class ResourceCacheDictionary
> implements Dictionary<URL, Object>, Iterable<URL> {
> + @Override
> public Object get(URL key) {
> return resourceCache.get(key);
> }
>
> + @Override
> public Object put(URL key, Object value) {
> return resourceCache.put(key, value);
> }
>
> + @Override
> public Object remove(URL key) {
> return resourceCache.remove(key);
> }
>
> + @Override
> public boolean containsKey(URL key) {
> return resourceCache.containsKey(key);
> }
>
> + @Override
> public boolean isEmpty() {
> return resourceCache.isEmpty();
> }
>
> + @Override
> public Iterator<URL> iterator() {
> return new
> ImmutableIterator<URL>(resourceCache.iterator());
> }
>
> Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> BrowserApplicationContext.java
> URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/BrowserApplicationContext.java?rev=809627&r1=809626&r2=809627&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> BrowserApplicationContext.java (original)
> +++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> BrowserApplicationContext.java Mon Aug 31 15:35:11 2009
> @@ -39,6 +39,7 @@
> */
> public static final class HostApplet extends Applet {
> private class InitCallback implements Runnable {
> + @Override
> public void run() {
> // Set the origin
> URL codeBase = getCodeBase();
> @@ -118,6 +119,7 @@
> }
>
> private class StartCallback implements Runnable {
> + @Override
> public void run() {
> // Load the application
> Application application = null;
> @@ -154,6 +156,7 @@
> }
>
> private class StopCallback implements Runnable {
> + @Override
> public void run() {
> Application application =
> applicationContext.getApplication();
> if (application != null) {
> @@ -167,6 +170,7 @@
> }
>
> private class DestroyCallback implements Runnable {
> + @Override
> public void run() {
> hostApplets.remove(HostApplet.this);
>
>
> Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> Container.java
> URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/Container.java?rev=809627&r1=809626&r2=809627&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> Container.java (original)
> +++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> Container.java Mon Aug 31 15:35:11 2009
> @@ -37,24 +37,28 @@
> implements Sequence<Component>, Iterable<Component> {
> private static class ContainerListenerList extends
> ListenerList<ContainerListener>
> implements ContainerListener {
> + @Override
> public void componentInserted(Container container, int
> index) {
> for (ContainerListener listener : this) {
> listener.componentInserted(container, index);
> }
> }
>
> + @Override
> public void componentsRemoved(Container container, int
> index, Sequence<Component> components) {
> for (ContainerListener listener : this) {
> listener.componentsRemoved(container, index,
> components);
> }
> }
>
> + @Override
> public void contextKeyChanged(Container container, String
> previousContextKey) {
> for (ContainerListener listener : this) {
> listener.contextKeyChanged(container,
> previousContextKey);
> }
> }
>
> + @Override
> public void focusTraversalPolicyChanged(Container container,
> FocusTraversalPolicy previousFocusTraversalPolicy) {
> for (ContainerListener listener : this) {
> @@ -65,6 +69,7 @@
>
> private static class ContainerMouseListenerList extends
> ListenerList<ContainerMouseListener>
> implements ContainerMouseListener {
> + @Override
> public boolean mouseMove(Container container, int x, int y) {
> boolean consumed = false;
>
> @@ -75,6 +80,7 @@
> return consumed;
> }
>
> + @Override
> public boolean mouseDown(Container container, Mouse.Button
> button, int x, int y) {
> boolean consumed = false;
>
> @@ -85,6 +91,7 @@
> return consumed;
> }
>
> + @Override
> public boolean mouseUp(Container container, Mouse.Button
> button, int x, int y) {
> boolean consumed = false;
>
> @@ -95,6 +102,7 @@
> return consumed;
> }
>
> + @Override
> public boolean mouseWheel(Container container,
> Mouse.ScrollType scrollType,
> int scrollAmount, int wheelRotation, int x, int y) {
> boolean consumed = false;
> @@ -122,6 +130,7 @@
> private ContainerListenerList containerListeners = new
> ContainerListenerList();
> private ContainerMouseListenerList containerMouseListeners = new
> ContainerMouseListenerList();
>
> + @Override
> public final int add(Component component) {
> int i = getLength();
> insert(component, i);
> @@ -129,6 +138,7 @@
> return i;
> }
>
> + @Override
> public void insert(Component component, int index) {
> if (component == null) {
> throw new IllegalArgumentException("component is null.");
> @@ -154,10 +164,12 @@
> containerListeners.componentInserted(Container.this, index);
> }
>
> + @Override
> public Component update(int index, Component component) {
> throw new UnsupportedOperationException();
> }
>
> + @Override
> public final int remove(Component component) {
> int index = indexOf(component);
> if (index != -1) {
> @@ -167,6 +179,7 @@
> return index;
> }
>
> + @Override
> public Sequence<Component> remove(int index, int count) {
> Sequence<Component> removed = components.remove(index, count);
>
> @@ -219,18 +232,22 @@
> }
> }
>
> + @Override
> public Component get(int index) {
> return components.get(index);
> }
>
> + @Override
> public int indexOf(Component component) {
> return components.indexOf(component);
> }
>
> + @Override
> public int getLength() {
> return components.getLength();
> }
>
> + @Override
> public Iterator<Component> iterator() {
> return new
> ImmutableIterator<Component>(components.iterator());
> }
>
> Modified: incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> DesktopApplicationContext.java
> URL: http://svn.apache.org/viewvc/incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/DesktopApplicationContext.java?rev=809627&r1=809626&r2=809627&view=diff
> =
> =
> =
> =
> =
> =
> =
> =
> ======================================================================
> --- incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> DesktopApplicationContext.java (original)
> +++ incubator/pivot/trunk/wtk/src/org/apache/pivot/wtk/
> DesktopApplicationContext.java Mon Aug 31 15:35:11 2009
> @@ -113,6 +113,7 @@
>
> // Create the proxy handler
> InvocationHandler handler = new
> InvocationHandler() {
> + @Override
> public Object invoke(Object
> proxy, Method method, Object[] args)
> throws Throwable {
> String methodName =
> method.getName();
> @@ -370,6 +371,7 @@
> };
>
> Window.getWindowClassListeners().add(new
> WindowClassListener() {
> + @Override
> public void activeWindowChanged(Window
> previousActiveWindow) {
> if (previousActiveWindow != null) {
> Window previousRootOwner =
> previousActiveWindow.getRootOwner();
> @@ -385,6 +387,7 @@
>
> if (updateFrameTitleBarCallback == null) {
> updateFrameTitleBarCallback = new Runnable() {
> + @Override
> public void run() {
> Window activeWindow =
> Window.getActiveWindow();
> if (activeWindow == null) {
>
>