001 package com.croftsoft.core.animation.collector; 002 003 import java.awt.Rectangle; 004 005 import com.croftsoft.core.animation.RepaintCollector; 006 007 /********************************************************************* 008 * A Null Object RepaintCollector implemenation. 009 * 010 * @version 011 * 2002-12-01 012 * @since 013 * 2002-12-01 014 * @author 015 * <a href="https://www.croftsoft.com/">David Wallace Croft</a> 016 *********************************************************************/ 017 018 public class NullRepaintCollector 019 implements RepaintCollector 020 ////////////////////////////////////////////////////////////////////// 021 ////////////////////////////////////////////////////////////////////// 022 { 023 024 public static final NullRepaintCollector INSTANCE 025 = new NullRepaintCollector ( ); 026 027 private static final Rectangle [ ] EMPTY_ARRAY = new Rectangle [ 0 ]; 028 029 ////////////////////////////////////////////////////////////////////// 030 // accessor methods 031 ////////////////////////////////////////////////////////////////////// 032 033 public int getCount ( ) { return 0; } 034 035 public Rectangle [ ] getRepaintRegions ( ) { return EMPTY_ARRAY; } 036 037 ////////////////////////////////////////////////////////////////////// 038 // mutator methods 039 ////////////////////////////////////////////////////////////////////// 040 041 public void repaint ( int x, int y, int width, int height ) { } 042 043 public void repaint ( ) { } 044 045 public void reset ( ) { } 046 047 ////////////////////////////////////////////////////////////////////// 048 // private constructor method 049 ////////////////////////////////////////////////////////////////////// 050 051 private NullRepaintCollector ( ) { } 052 053 ////////////////////////////////////////////////////////////////////// 054 ////////////////////////////////////////////////////////////////////// 055 }