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 2001/01/29 08:09:55 UTC

cvs commit: xml-batik/sources/org/apache/batik/gvt/event GraphicsNodeEventFilter.java

tkormann    01/01/28 23:09:54

  Modified:    sources/org/apache/batik/gvt AbstractGraphicsNode.java
                        CompositeGraphicsNode.java GraphicsNode.java
  Removed:     sources/org/apache/batik/bridge
                        GraphicsNodeEventFilterBridge.java
               sources/org/apache/batik/gvt/event
                        GraphicsNodeEventFilter.java
  Log:
  clean and remove unused classes, interfaces and references in GraphicsNode
  
  Revision  Changes    Path
  1.6       +5 -52     xml-batik/sources/org/apache/batik/gvt/AbstractGraphicsNode.java
  
  Index: AbstractGraphicsNode.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/AbstractGraphicsNode.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractGraphicsNode.java	2001/01/26 19:04:30	1.5
  +++ AbstractGraphicsNode.java	2001/01/29 07:09:37	1.6
  @@ -10,7 +10,6 @@
   
   import java.awt.AlphaComposite;
   import java.awt.Composite;
  -import java.awt.Cursor;
   import java.awt.Graphics2D;
   import java.awt.RenderingHints;
   import java.awt.Shape;
  @@ -37,7 +36,6 @@
   import org.apache.batik.ext.awt.image.renderable.Filter;
   import org.apache.batik.ext.awt.image.renderable.PadMode;
   import org.apache.batik.gvt.event.GraphicsNodeEvent;
  -import org.apache.batik.gvt.event.GraphicsNodeEventFilter;
   import org.apache.batik.gvt.event.GraphicsNodeKeyEvent;
   import org.apache.batik.gvt.event.GraphicsNodeKeyListener;
   import org.apache.batik.gvt.event.GraphicsNodeMouseEvent;
  @@ -50,7 +48,7 @@
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
    * @author <a href="mailto:etissandier@ilog.fr">Emmanuel Tissandier</a>
    * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
  - * @version $Id: AbstractGraphicsNode.java,v 1.5 2001/01/26 19:04:30 tkormann Exp $
  + * @version $Id: AbstractGraphicsNode.java,v 1.6 2001/01/29 07:09:37 tkormann Exp $
    */
   public abstract class AbstractGraphicsNode implements GraphicsNode {
   
  @@ -65,21 +63,11 @@
       protected EventListenerList listeners;
   
       /**
  -     * The filter used to filter graphics node events.
  -     */
  -    protected GraphicsNodeEventFilter eventFilter;
  -
  -    /**
        * The hit detector used to filter mouse events.
        */
       protected GraphicsNodeHitDetector hitDetector;
   
       /**
  -     * The cursor attached to this graphics node.
  -     */
  -    protected Cursor cursor;
  -
  -    /**
        * The transform of this graphics node.
        */
       protected AffineTransform transform;
  @@ -141,21 +129,6 @@
       //
   
       /**
  -     * Sets the cursor of this node.
  -     * @param newCursor the new cursor of this node
  -     */
  -    public void setCursor(Cursor newCursor) {
  -        this.cursor = newCursor;
  -    }
  -
  -    /**
  -     * Returns the cursor of this node.
  -     */
  -    public Cursor getCursor() {
  -        return cursor;
  -    }
  -
  -    /**
        * Sets the transform of this node.
        * @param newTransform the new transform of this node
        */
  @@ -329,11 +302,8 @@
           // first, make sure we haven't been interrupted
           if (Thread.currentThread().isInterrupted()) {
               throw new InterruptedException();
  -        }
  -        if (!isVisible) {
  -            // Exit if the visible flag is off
  -            return;
           }
  +
           //
           // Set up graphic context. It is important to setup the
           // transform first, because the clip is defined in this
  @@ -567,21 +537,6 @@
       }
   
       /**
  -     * Sets the graphics node event filter of this node.
  -     * @param evtFilter the new graphics node event filter
  -     */
  -    public void setGraphicsNodeEventFilter(GraphicsNodeEventFilter evtFilter) {
  -        this.eventFilter = evtFilter;
  -    }
  -
  -    /**
  -     * Returns the graphics node event filter of this node.
  -     */
  -    public GraphicsNodeEventFilter getGraphicsNodeEventFilter() {
  -        return eventFilter;
  -    }
  -
  -    /**
        * Sets the hit detector for this node.
        * @param hitDetector the new hit detector
        */
  @@ -687,8 +642,8 @@
                       listeners[i].mouseReleased(evt);
                   }
                   break;
  -                default:
  -                    throw new Error("Unknown Mouse Event type: "+evt.getID());
  +            default:
  +                throw new Error("Unknown Mouse Event type: "+evt.getID());
               }
           }
           evt.consume();
  @@ -731,11 +686,9 @@
       /**
        * Returns true is this node accepts the specified event, false otherwise.
        * @param evt the event to check
  +     * @return always true at this time
        */
       protected boolean acceptEvent(GraphicsNodeEvent evt) {
  -        if (eventFilter != null) {
  -            return eventFilter.accept(this, evt);
  -        }
           return true;
       }
   
  
  
  
  1.5       +26 -5     xml-batik/sources/org/apache/batik/gvt/CompositeGraphicsNode.java
  
  Index: CompositeGraphicsNode.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/CompositeGraphicsNode.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CompositeGraphicsNode.java	2001/01/26 19:04:31	1.4
  +++ CompositeGraphicsNode.java	2001/01/29 07:09:39	1.5
  @@ -32,7 +32,7 @@
    * A CompositeGraphicsNode is a graphics node that can contain graphics nodes.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: CompositeGraphicsNode.java,v 1.4 2001/01/26 19:04:31 tkormann Exp $
  + * @version $Id: CompositeGraphicsNode.java,v 1.5 2001/01/29 07:09:39 tkormann Exp $
    */
   public class CompositeGraphicsNode extends AbstractGraphicsNode
           implements List {
  @@ -257,6 +257,9 @@
           return null;
       }
   
  +    /**
  +     * Returns the bounds of this node in the GVT tree's space.
  +     */
       protected Rectangle2D getGlobalBounds(GraphicsNodeRenderContext rc) {
           if (count == 0) {
               return null;
  @@ -269,6 +272,15 @@
           }
       }
   
  +    /**
  +     * Returns the bounds of the area covered by this node's
  +     * primitive paint.
  +     * <b>Note</b>: The boundaries of some nodes (notably, text element nodes)
  +     * cannot be precisely determined independent of their
  +     * GraphicsNodeRenderContext.
  +     *
  +     * @param rc the GraphicsNodeRenderContext for which this dimension applies
  +      */
       public Rectangle2D getPrimitiveBounds(GraphicsNodeRenderContext rc) {
           if (primitiveBounds == null) {
               Rectangle2D bounds = null, nodeBounds = null;
  @@ -298,6 +310,16 @@
           return primitiveBounds;
       }
   
  +    /**
  +     * Returns the bounds of the area covered by this node, without
  +     * taking any of its rendering attribute into account, i.e., exclusive
  +     * of any clipping, masking, filtering or stroking, for example.
  +     * <b>Note</b>: The boundaries of some nodes (notably, text element nodes)
  +     * cannot be precisely determined independent of their
  +     * GraphicsNodeRenderContext.
  +     *
  +     * @param rc the GraphicsNodeRenderContext for which this dimension applies
  +      */
       public Rectangle2D getGeometryBounds(GraphicsNodeRenderContext rc){
           Rectangle2D b = null;
           if(geometryBounds == null){
  @@ -337,6 +359,9 @@
           return b;
       }
   
  +    /**
  +     * Not supported operation.
  +     */
       public Shape getOutline(GraphicsNodeRenderContext rc) {
           // <!> FIXME : TODO
           throw new Error("Not yet implemented");
  @@ -774,8 +799,6 @@
   
       /**
        * An implementation of the java.util.Iterator interface.
  -     *
  - * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
        */
       private class Itr implements Iterator {
   
  @@ -842,8 +865,6 @@
   
       /**
        * An implementation of the java.util.ListIterator interface.
  -     *
  - * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
        */
       private class ListItr extends Itr implements ListIterator {
   
  
  
  
  1.17      +3 -27     xml-batik/sources/org/apache/batik/gvt/GraphicsNode.java
  
  Index: GraphicsNode.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/GraphicsNode.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- GraphicsNode.java	2001/01/26 19:04:31	1.16
  +++ GraphicsNode.java	2001/01/29 07:09:41	1.17
  @@ -9,7 +9,6 @@
   package org.apache.batik.gvt;
   
   import java.awt.Composite;
  -import java.awt.Cursor;
   import java.awt.Graphics2D;
   import java.awt.RenderingHints;
   import java.awt.Shape;
  @@ -21,7 +20,6 @@
   import org.apache.batik.ext.awt.image.renderable.Clip;
   import org.apache.batik.ext.awt.image.renderable.Filter;
   import org.apache.batik.gvt.event.GraphicsNodeEvent;
  -import org.apache.batik.gvt.event.GraphicsNodeEventFilter;
   import org.apache.batik.gvt.event.GraphicsNodeKeyEvent;
   import org.apache.batik.gvt.event.GraphicsNodeKeyListener;
   import org.apache.batik.gvt.event.GraphicsNodeMouseEvent;
  @@ -35,7 +33,7 @@
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
    * @author <a href="mailto:etissandier@ilog.fr">Emmanuel Tissandier</a>
  - * @version $Id: GraphicsNode.java,v 1.16 2001/01/26 19:04:31 tkormann Exp $
  + * @version $Id: GraphicsNode.java,v 1.17 2001/01/29 07:09:41 tkormann Exp $
    */
   public interface GraphicsNode {
   
  @@ -44,17 +42,6 @@
       //
   
       /**
  -     * Sets the cursor of this node.
  -     * @param newCursor the new cursor of this node
  -     */
  -    void setCursor(Cursor newCursor);
  -
  -    /**
  -     * Returns the cursor of this node.
  -     */
  -    Cursor getCursor();
  -
  -    /**
        * Sets the transform of this node.
        * @param newTransform the new transform of this node
        */
  @@ -216,17 +203,6 @@
       void removeGraphicsNodeKeyListener(GraphicsNodeKeyListener l);
   
       /**
  -     * Sets the graphics node event filter of this node.
  -     * @param evtFilter the new graphics node event filter
  -     */
  -    void setGraphicsNodeEventFilter(GraphicsNodeEventFilter evtFilter);
  -
  -    /**
  -     * Returns the graphics node event filter of this node.
  -     */
  -    GraphicsNodeEventFilter getGraphicsNodeEventFilter();
  -
  -    /**
        * Sets the hit detector for this node.
        * @param hitDetector the new hit detector
        */
  @@ -294,7 +270,7 @@
        * GraphicsNodeRenderContext.
        *
        * @param rc the GraphicsNodeRenderContext for which this dimension applies
  -      */
  +     */
       Rectangle2D getPrimitiveBounds(GraphicsNodeRenderContext rc);
   
       /**
  @@ -306,7 +282,7 @@
        * GraphicsNodeRenderContext.
        *
        * @param rc the GraphicsNodeRenderContext for which this dimension applies
  -      */
  +     */
       Rectangle2D getGeometryBounds(GraphicsNodeRenderContext rc);
   
       /**