diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-06 08:55:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-12 09:41:28 +0200 |
commit | 0477e6c39b7ce8b7f6560fbf222c19fe4f358dc8 (patch) | |
tree | 218eba20dd23c6a865cf01aa7532bf1261a69bc8 /bean | |
parent | e2e55a7c49079dfd896da6515b98d451e4c8735b (diff) |
java: add @Override annotation to overriding methods
Change-Id: I086964c6f6ce52c60c52b6dbc445d3c21d22c80a
Diffstat (limited to 'bean')
-rw-r--r-- | bean/com/sun/star/beans/LocalOfficeWindow.java | 4 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/CallWatchThread.java | 1 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeConnection.java | 1 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/LocalOfficeWindow.java | 2 | ||||
-rw-r--r-- | bean/com/sun/star/comp/beans/OOoBean.java | 3 | ||||
-rw-r--r-- | bean/qa/complex/bean/OOoBeanTest.java | 1 | ||||
-rw-r--r-- | bean/test/Test.java | 1 | ||||
-rw-r--r-- | bean/test/applet/oooapplet/OOoViewer.java | 8 |
8 files changed, 21 insertions, 0 deletions
diff --git a/bean/com/sun/star/beans/LocalOfficeWindow.java b/bean/com/sun/star/beans/LocalOfficeWindow.java index 8ea7ad6a2eac..2db466a96bf0 100644 --- a/bean/com/sun/star/beans/LocalOfficeWindow.java +++ b/bean/com/sun/star/beans/LocalOfficeWindow.java @@ -157,6 +157,7 @@ public class LocalOfficeWindow class ComponentEventHandler extends java.awt.event.ComponentAdapter { + @Override public void componentHidden( java.awt.event.ComponentEvent e) { // only when we become invisible, we might lose our system window @@ -167,6 +168,7 @@ public class LocalOfficeWindow {} // ignore } + @Override public void componentShown( java.awt.event.ComponentEvent e) { // only when we become visible, we get a system window @@ -175,6 +177,7 @@ public class LocalOfficeWindow } /// Overriding java.awt.Component.setVisible() due to Java bug (no showing event). + @Override public void setVisible( boolean b ) { super.setVisible(b); @@ -277,6 +280,7 @@ public class LocalOfficeWindow throw new InterruptedException(); } + @Override public void run() { while ( aWatchedThread != null ) diff --git a/bean/com/sun/star/comp/beans/CallWatchThread.java b/bean/com/sun/star/comp/beans/CallWatchThread.java index 31f3a8cdb1e0..b9de0a826384 100644 --- a/bean/com/sun/star/comp/beans/CallWatchThread.java +++ b/bean/com/sun/star/comp/beans/CallWatchThread.java @@ -74,6 +74,7 @@ public class CallWatchThread extends Thread notify(); } + @Override public void run() { dbgPrint( "CallWatchThread(" + this + ".run(" + aTag + ") ***** STARTED *****" ); diff --git a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java index c06dd2daba31..1094a7bae81c 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeConnection.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeConnection.java @@ -739,6 +739,7 @@ public class LocalOfficeConnection start(); } + @Override public void run() { java.io.BufferedReader r = new java.io.BufferedReader( new java.io.InputStreamReader(m_in) ); diff --git a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java index eae4ea5df338..2058860ece8e 100644 --- a/bean/com/sun/star/comp/beans/LocalOfficeWindow.java +++ b/bean/com/sun/star/comp/beans/LocalOfficeWindow.java @@ -158,6 +158,7 @@ public class LocalOfficeWindow /// Overriding java.awt.Component.setVisible() due to Java bug (no showing event). + @Override public void setVisible( boolean b ) { super.setVisible(b); @@ -220,6 +221,7 @@ public class LocalOfficeWindow /** We make sure that the office window is notified that the parent * will be removed. */ + @Override public void removeNotify() { try { diff --git a/bean/com/sun/star/comp/beans/OOoBean.java b/bean/com/sun/star/comp/beans/OOoBean.java index 1635717fd156..75931911c683 100644 --- a/bean/com/sun/star/comp/beans/OOoBean.java +++ b/bean/com/sun/star/comp/beans/OOoBean.java @@ -288,6 +288,7 @@ public class OOoBean final OfficeConnection iConn = getOOoConnection(); Thread aConnectorThread = new Thread() { + @Override public void run() { com.sun.star.lang.XMultiComponentFactory aFactory = @@ -1306,6 +1307,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar"); /** @deprecated */ + @Override public void paint( java.awt.Graphics aGraphics ) { } @@ -1429,6 +1431,7 @@ xLayoutManager.showElement("private:resource/menubar/menubar"); } /// watching the connection + @Override public void run() { dbgPrint( "EventListener(" + aTag + ").run()" ); diff --git a/bean/qa/complex/bean/OOoBeanTest.java b/bean/qa/complex/bean/OOoBeanTest.java index da83a9bdf04a..d565cd2fff34 100644 --- a/bean/qa/complex/bean/OOoBeanTest.java +++ b/bean/qa/complex/bean/OOoBeanTest.java @@ -669,6 +669,7 @@ public class OOoBeanTest setLayout(new BorderLayout()); add(b, BorderLayout.CENTER); } + @Override public Dimension getPreferredSize() { return new Dimension(200, 200); diff --git a/bean/test/Test.java b/bean/test/Test.java index 94f277069ce5..ea3a0e25b3d6 100644 --- a/bean/test/Test.java +++ b/bean/test/Test.java @@ -38,6 +38,7 @@ public class Test f.validate(); f.addWindowListener(new WindowAdapter() { + @Override public void windowClosing( java.awt.event.WindowEvent e){ b.stopOOoConnection(); System.exit(0); diff --git a/bean/test/applet/oooapplet/OOoViewer.java b/bean/test/applet/oooapplet/OOoViewer.java index 2395edf8c983..4fdf1c07d089 100644 --- a/bean/test/applet/oooapplet/OOoViewer.java +++ b/bean/test/applet/oooapplet/OOoViewer.java @@ -32,6 +32,7 @@ public class OOoViewer extends Applet { Object m_objBean; + @Override public void init() { try { if (m_loader == null) { @@ -59,6 +60,7 @@ public class OOoViewer extends Applet { } } + @Override public void start() { try { Class beanClass = m_loader.loadClass("com.sun.star.comp.beans.OOoBean"); @@ -94,6 +96,7 @@ public class OOoViewer extends Applet { validate(); } + @Override public void stop() { try { Method methStop = m_objBean.getClass().getMethod( @@ -110,9 +113,11 @@ public class OOoViewer extends Applet { } + @Override public void destroy() { } + @Override public void paint(Graphics g) { } } @@ -126,6 +131,7 @@ final class CustomURLClassLoader extends URLClassLoader { super( urls ); } + @Override protected Class findClass( String name ) throws ClassNotFoundException { // This is only called via this.loadClass -> super.loadClass -> // this.findClass, after this.loadClass has already called @@ -136,6 +142,7 @@ final class CustomURLClassLoader extends URLClassLoader { + @Override protected Class loadClass( String name, boolean resolve ) throws ClassNotFoundException { @@ -163,6 +170,7 @@ final class CustomURLClassLoader extends URLClassLoader { resourcePaths.add(rurl); } + @Override public URL getResource(String name) { if (resourcePaths == null) return null; |