001 package com.croftsoft.apps.chat.view;
002
003 import java.awt.*;
004 import java.util.*;
005 import javax.swing.JComponent;
006
007 import com.croftsoft.core.animation.ComponentAnimator;
008 import com.croftsoft.core.animation.animator.ModelAnimator;
009 import com.croftsoft.core.animation.animator.WorldAnimator;
010 import com.croftsoft.core.animation.model.ModelAccessor;
011 import com.croftsoft.core.animation.model.WorldAccessor;
012 import com.croftsoft.core.animation.painter.ColorPainter;
013 import com.croftsoft.core.awt.image.ImageCache;
014 import com.croftsoft.core.lang.NullArgumentException;
015 import com.croftsoft.core.media.sound.AudioClipCache;
016
017 import com.croftsoft.apps.chat.model.ChatModelAccessor;
018
019 /*********************************************************************
020 * ComponentAnimator that maps Models to views.
021 *
022 * @version
023 * 2003-06-11
024 * @since
025 * 2003-06-06
026 * @author
027 * <a href="http://www.CroftSoft.com/">David Wallace Croft</a>
028 *********************************************************************/
029
030 public final class ChatWorldAnimator
031 extends WorldAnimator
032 //////////////////////////////////////////////////////////////////////
033 //////////////////////////////////////////////////////////////////////
034 {
035
036 private final ImageCache imageCache;
037
038 //////////////////////////////////////////////////////////////////////
039 //////////////////////////////////////////////////////////////////////
040
041 public ChatWorldAnimator (
042 WorldAccessor worldAccessor,
043 ImageCache imageCache )
044 //////////////////////////////////////////////////////////////////////
045 {
046 super ( worldAccessor );
047
048 NullArgumentException.check ( this.imageCache = imageCache );
049 }
050
051 //////////////////////////////////////////////////////////////////////
052 //////////////////////////////////////////////////////////////////////
053
054 protected ComponentAnimator createComponentAnimator (
055 ModelAccessor modelAccessor )
056 //////////////////////////////////////////////////////////////////////
057 {
058 ChatModelAccessor chatModelAccessor
059 = ( ChatModelAccessor ) modelAccessor;
060
061 return new ChatModelAnimator ( chatModelAccessor, imageCache );
062 }
063
064 //////////////////////////////////////////////////////////////////////
065 //////////////////////////////////////////////////////////////////////
066 }