src/share/classes/java/awt/image/ImageFilter.java

Print this page


   1 /*
   2  * Copyright (c) 1995, 2011, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 207      * An <code>ImageFilter</code> subclass might override this method or not,
 208      * depending on if and how it can send data in TDLR order.
 209      * Three possibilities exist:
 210      *
 211      * <ul>
 212      * <li>
 213      * Do not override this method.
 214      * This makes the subclass use the default implementation,
 215      * which is to
 216      * forward the request
 217      * to the indicated <code>ImageProducer</code>
 218      * using this filter as the requesting <code>ImageConsumer</code>.
 219      * This behavior
 220      * is appropriate if the filter can determine
 221      * that it will forward the pixels
 222      * in TDLR order if its upstream producer object
 223      * sends them in TDLR order.
 224      *
 225      * <li>
 226      * Override the method to simply send the data.
 227      * This is appropriate if the filter can handle the request itself —
 228      * for example,
 229      * if the generated pixels have been saved in some sort of buffer.
 230      *
 231      * <li>
 232      * Override the method to do nothing.
 233      * This is appropriate
 234      * if the filter cannot produce filtered data in TDLR order.
 235      * </ul>
 236      *
 237      * @see ImageProducer#requestTopDownLeftRightResend
 238      * @param ip the ImageProducer that is feeding this instance of
 239      * the filter - also the ImageProducer that the request should be
 240      * forwarded to if necessary
 241      * @exception NullPointerException if <code>ip</code> is null
 242      */
 243     public void resendTopDownLeftRight(ImageProducer ip) {
 244         ip.requestTopDownLeftRightResend(this);
 245     }
 246 
 247     /**
   1 /*
   2  * Copyright (c) 1995, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.  Oracle designates this
   8  * particular file as subject to the "Classpath" exception as provided
   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any


 207      * An <code>ImageFilter</code> subclass might override this method or not,
 208      * depending on if and how it can send data in TDLR order.
 209      * Three possibilities exist:
 210      *
 211      * <ul>
 212      * <li>
 213      * Do not override this method.
 214      * This makes the subclass use the default implementation,
 215      * which is to
 216      * forward the request
 217      * to the indicated <code>ImageProducer</code>
 218      * using this filter as the requesting <code>ImageConsumer</code>.
 219      * This behavior
 220      * is appropriate if the filter can determine
 221      * that it will forward the pixels
 222      * in TDLR order if its upstream producer object
 223      * sends them in TDLR order.
 224      *
 225      * <li>
 226      * Override the method to simply send the data.
 227      * This is appropriate if the filter can handle the request itself —
 228      * for example,
 229      * if the generated pixels have been saved in some sort of buffer.
 230      *
 231      * <li>
 232      * Override the method to do nothing.
 233      * This is appropriate
 234      * if the filter cannot produce filtered data in TDLR order.
 235      * </ul>
 236      *
 237      * @see ImageProducer#requestTopDownLeftRightResend
 238      * @param ip the ImageProducer that is feeding this instance of
 239      * the filter - also the ImageProducer that the request should be
 240      * forwarded to if necessary
 241      * @exception NullPointerException if <code>ip</code> is null
 242      */
 243     public void resendTopDownLeftRight(ImageProducer ip) {
 244         ip.requestTopDownLeftRightResend(this);
 245     }
 246 
 247     /**