You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by tk...@apache.org on 2002/01/03 13:27:26 UTC

cvs commit: xml-batik/sources/org/apache/batik/swing/gvt JGVTComponent.java

tkormann    02/01/03 04:27:26

  Modified:    sources/org/apache/batik/gvt CompositeShapePainter.java
               sources/org/apache/batik/swing/gvt JGVTComponent.java
  Log:
  - fix exceptions throwing. It seems it causes unexpected message in IDE.
  - remove useless comment
  
  Revision  Changes    Path
  1.11      +1 -2      xml-batik/sources/org/apache/batik/gvt/CompositeShapePainter.java
  
  Index: CompositeShapePainter.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/CompositeShapePainter.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- CompositeShapePainter.java	19 Dec 2001 16:17:41 -0000	1.10
  +++ CompositeShapePainter.java	3 Jan 2002 12:27:26 -0000	1.11
  @@ -20,7 +20,7 @@
    * A shape painter which consists of multiple shape painters.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: CompositeShapePainter.java,v 1.10 2001/12/19 16:17:41 tkormann Exp $
  + * @version $Id: CompositeShapePainter.java,v 1.11 2002/01/03 12:27:26 tkormann Exp $
    */
   public class CompositeShapePainter implements ShapePainter {
   
  @@ -105,7 +105,6 @@
        * Returns the area painted by this shape painter.
        */
       public Shape getPaintedArea(){
  -        // <!> FIX ME: Use of GeneralPath is a work around Area problems.
           if (painters != null) {
               Area paintedArea = new Area();
               for (int i=0; i < count; ++i) {
  
  
  
  1.23      +35 -35    xml-batik/sources/org/apache/batik/swing/gvt/JGVTComponent.java
  
  Index: JGVTComponent.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/swing/gvt/JGVTComponent.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- JGVTComponent.java	21 Dec 2001 14:40:31 -0000	1.22
  +++ JGVTComponent.java	3 Jan 2002 12:27:26 -0000	1.23
  @@ -53,7 +53,7 @@
    * This class represents a component which can display a GVT tree.
    *
    * @author <a href="mailto:stephane@hillion.org">Stephane Hillion</a>
  - * @version $Id: JGVTComponent.java,v 1.22 2001/12/21 14:40:31 hillion Exp $
  + * @version $Id: JGVTComponent.java,v 1.23 2002/01/03 12:27:26 tkormann Exp $
    */
   public class JGVTComponent extends JComponent {
   
  @@ -301,55 +301,55 @@
        * @param color the new color of the selection overlay
        */
       public void setSelectionOverlayColor(Color color) {
  -	if (textSelectionManager != null) {
  -	    textSelectionManager.setSelectionOverlayColor(color);
  -	}
  +        if (textSelectionManager != null) {
  +            textSelectionManager.setSelectionOverlayColor(color);
  +        }
       }
   
       /**
        * Returns the color of the selection overlay.
        */
       public Color getSelectionOverlayColor() {
  -	if (textSelectionManager != null) {
  -	    return textSelectionManager.getSelectionOverlayColor();
  -	} else {
  -	    throw new IllegalArgumentException("Selection is disabled");
  -	}
  +        if (textSelectionManager != null) {
  +            return textSelectionManager.getSelectionOverlayColor();
  +        } else {
  +            return null;
  +        }
       }
   
       /**
        * Sets the color of the outline of the selection overlay to the specified
        * color.
        *
  -     * @param color the new color of the outline of the selection overlay 
  +     * @param color the new color of the outline of the selection overlay
        */
       public void setSelectionOverlayStrokeColor(Color color) {
  -	if (textSelectionManager != null) {
  -	    textSelectionManager.setSelectionOverlayStrokeColor(color);
  -	}
  +        if (textSelectionManager != null) {
  +            textSelectionManager.setSelectionOverlayStrokeColor(color);
  +        }
       }
   
       /**
        * Returns the color of the outline of the selection overlay.
        */
       public Color getSelectionOverlayStrokeColor() {
  -	if (textSelectionManager != null) {
  -	    return textSelectionManager.getSelectionOverlayStrokeColor();
  -	} else {
  -	    throw new IllegalArgumentException("Selection is disabled");
  -	}
  +        if (textSelectionManager != null) {
  +            return textSelectionManager.getSelectionOverlayStrokeColor();
  +        } else {
  +            return null;
  +        }
       }
   
       /**
        * Sets whether or not the selection overlay will be painted in XOR mode,
        * depending on the specified parameter.
        *
  -     * @param state true implies the selection overlay will be in XOR mode 
  +     * @param state true implies the selection overlay will be in XOR mode
        */
       public void setSelectionOverlayXORMode(boolean state) {
  -	if (textSelectionManager != null) {
  -	    textSelectionManager.setSelectionOverlayXORMode(state);
  -	}
  +        if (textSelectionManager != null) {
  +            textSelectionManager.setSelectionOverlayXORMode(state);
  +        }
       }
   
       /**
  @@ -357,11 +357,11 @@
        * otherwise.
        */
       public boolean isSelectionOverlayXORMode() {
  -	if (textSelectionManager != null) {
  -	    return textSelectionManager.isSelectionOverlayXORMode();
  -	} else {
  -	    throw new IllegalArgumentException("Selection is disabled");
  -	}
  +        if (textSelectionManager != null) {
  +            return textSelectionManager.isSelectionOverlayXORMode();
  +        } else {
  +            return false;
  +        }
       }
   
       /**
  @@ -371,18 +371,18 @@
        * @param end the mark used to define where the selection ends
        */
       public void select(Mark start, Mark end) {
  -	if (textSelectionManager != null) {
  -	    textSelectionManager.setSelection(start, end);
  -	}
  +        if (textSelectionManager != null) {
  +            textSelectionManager.setSelection(start, end);
  +        }
       }
   
       /**
        * Deselects all.
        */
       public void deselectAll() {
  -	if (textSelectionManager != null) {
  -	    textSelectionManager.clearSelection();
  -	}
  +        if (textSelectionManager != null) {
  +            textSelectionManager.clearSelection();
  +        }
       }
   
       ////////////////////////////////////////////////////////////////////////
  @@ -491,7 +491,7 @@
        * Returns the initial transform.
        */
       public AffineTransform getInitialTransform() {
  -	return initialTransform;
  +        return initialTransform;
       }
   
       /**
  @@ -808,7 +808,7 @@
                   dispatchKeyPressed(e);
               }
           }
  -        
  +
           /**
            * Dispatches the event to the GVT tree.
            */
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org