harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aiva...@apache.org
Subject svn commit: r568553 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
Date Wed, 22 Aug 2007 10:50:27 GMT
Author: aivanov
Date: Wed Aug 22 03:50:27 2007
New Revision: 568553

URL: http://svn.apache.org/viewvc?rev=568553&view=rev
Log:
Fixing compiler warnings: removed unused fields and added @Override annotations.

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java?rev=568553&r1=568552&r2=568553&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/text/html/ImageView.java
Wed Aug 22 03:50:27 2007
@@ -46,9 +46,6 @@
 import org.apache.harmony.x.swing.text.html.HTMLIconFactory;
 
 public class ImageView extends View {
-    private static Icon loadingImageIcon;
-    private static Icon noImageIcon;
-
     private AttributeSet attrs;
 
     private BackgroundImageLoader loader;
@@ -94,6 +91,7 @@
         return synchronous;
     }
 
+    @Override
     public float getPreferredSpan(final int axis) {
         if (loader.isError()) {
             String alt = getAltText();
@@ -120,6 +118,7 @@
         return loader.getHeight() + 2 * border + 2 * vSpace;
     }
 
+    @Override
     public String getToolTipText(final float x, final float y,
                                  final Shape shape) {
         return getAltText();
@@ -130,6 +129,7 @@
                        .getAttribute(HTML.Attribute.ALT);
     }
 
+    @Override
     public void paint(final Graphics g, final Shape shape) {
         
         Rectangle rc = shape.getBounds();
@@ -188,6 +188,7 @@
         g.drawImage(getImage(), rc.x + hSpace + border, rc.y + vSpace + border, rc.width,
rc.height, loader);
     }
 
+    @Override
     public Shape modelToView(final int pos, final Shape shape, final Bias bias)
         throws BadLocationException {
 
@@ -198,6 +199,7 @@
         return new Rectangle(rc.x + rc.width, rc.y, 0, rc.height);
     }
 
+    @Override
     public int viewToModel(final float x, final float y, final Shape shape,
                            final Bias[] bias) {
 
@@ -210,6 +212,7 @@
         return getEndOffset();
     }
 
+    @Override
     public float getAlignment(final int axis) {
         if (axis == Y_AXIS) {
             return 1;
@@ -217,10 +220,12 @@
         return super.getAlignment(axis);
     }
 
+    @Override
     public AttributeSet getAttributes() {
         return attrs;
     }
 
+    @Override
     public void changedUpdate(final DocumentEvent event, final Shape shape,
                               final ViewFactory factory) {
         setPropertiesFromAttributes();
@@ -278,11 +283,13 @@
     private void createImage(final int desiredWidth, final int desiredHeight) {
         loader = new BackgroundImageLoader(getImageURL(), synchronous,
                                            desiredWidth, desiredHeight) {
+            @Override
             protected void onReady() {
                 super.onReady();
                 update();
             }
 
+            @Override
             protected void onError() {
                 super.onError();
                 update();



Mime
View raw message