Patch: add new methods to xlib peers

Thomas Fitzsimmons fitzsim@redhat.com
Tue Aug 30 23:39:00 GMT 2005


Hi,

On Tue, 2005-08-30 at 19:15 -0400, Scott Gilbertson wrote:
> Couldn't ClasspathToolkit just have "return null" (or otherwise "default")
> implementations?

No.  These are additions to the java.awt.peer interfaces, so classes
that implement these peer interfaces must implement these methods.
Changes to java.awt.peer will be quite infrequent; maybe one set of
changes every four years.

Tom

>   That way it isn't necessary to change the peers every time
> a new method is added, provided the new method isn't essential for
> functionality that's already working with that peer.
> 
> ----- Original Message ----- 
> From: "Thomas Fitzsimmons" <fitzsim@redhat.com>
> To: <java-patches@gcc.gnu.org>
> Sent: Tuesday, August 30, 2005 5:37 PM
> Subject: Patch: add new methods to xlib peers
> 
> 
> > Hi,
> >
> > This patch adds to the xlib peers stubs for the new peer methods
> > introduced in GNU Classpath.  This should be applied during the next
> > merge.
> >
> > Tom
> >
> > 2005-08-30  Thomas Fitzsimmons  <fitzsim@redhat.com>
> >
> > * gnu/awt/xlib/XCanvasPeer.java: Add new peer methods.
> > * gnu/awt/xlib/XFramePeer.java: Likewise.
> > * gnu/awt/xlib/XGraphicsConfiguration.java: Likewise.
> >
> >
> 
> 
> ----------------------------------------------------------------------------
> ----
> 
> 
> > Index: gnu/awt/xlib/XCanvasPeer.java
> > ===================================================================
> > RCS file: /cvs/gcc/gcc/libjava/gnu/awt/xlib/XCanvasPeer.java,v
> > retrieving revision 1.9
> > diff -u -r1.9 XCanvasPeer.java
> > --- gnu/awt/xlib/XCanvasPeer.java 15 Jul 2005 16:07:17 -0000 1.9
> > +++ gnu/awt/xlib/XCanvasPeer.java 30 Aug 2005 21:31:44 -0000
> > @@ -527,5 +527,63 @@
> >        window.map();
> >      }
> >    }
> > -}
> >
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public boolean isRestackSupported ()
> > +  {
> > +    return false;
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void cancelPendingPaint (int x, int y, int width, int height)
> > +  {
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void restack ()
> > +  {
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public Rectangle getBounds ()
> > +  {
> > +    return null;
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void reparent (ContainerPeer parent)
> > +  {
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void setBounds (int x, int y, int width, int height, int z)
> > +  {
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public boolean isReparentSupported ()
> > +  {
> > +    return false;
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void layout ()
> > +  {
> > +  }
> > +}
> > Index: gnu/awt/xlib/XFramePeer.java
> > ===================================================================
> > RCS file: /cvs/gcc/gcc/libjava/gnu/awt/xlib/XFramePeer.java,v
> > retrieving revision 1.5
> > diff -u -r1.5 XFramePeer.java
> > --- gnu/awt/xlib/XFramePeer.java 15 Jul 2005 16:07:18 -0000 1.5
> > +++ gnu/awt/xlib/XFramePeer.java 30 Aug 2005 21:31:44 -0000
> > @@ -190,4 +190,26 @@
> >    public void beginLayout () { }
> >    public void endLayout () { }
> >    public boolean isPaintPending () { return false; }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void setBoundsPrivate (int x, int y, int width, int height)
> > +  {
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public void updateAlwaysOnTop()
> > +  {
> > +  }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public boolean requestWindowFocus ()
> > +  {
> > +    return false;
> > +  }
> >  }
> > Index: gnu/awt/xlib/XGraphicsConfiguration.java
> > ===================================================================
> > RCS file: /cvs/gcc/gcc/libjava/gnu/awt/xlib/XGraphicsConfiguration.java,v
> > retrieving revision 1.7
> > diff -u -r1.7 XGraphicsConfiguration.java
> > --- gnu/awt/xlib/XGraphicsConfiguration.java 15 Jul 2005 16:07:18 -0000
> 1.7
> > +++ gnu/awt/xlib/XGraphicsConfiguration.java 30 Aug 2005 21:31:44 -0000
> > @@ -538,4 +538,13 @@
> >      }
> >      return cm.getDataElement (unnormalizedComponents, 0);
> >    }
> > +
> > +  /**
> > +   * @since 1.5
> > +   */
> > +  public VolatileImage createCompatibleVolatileImage (int width, int
> height,
> > +                                                      int transparency)
> > +  {
> > +    return null;
> > +  }
> >  }
> >
> 



More information about the Java-patches mailing list