KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > thoughtriver > open > vectorvisuals > persistence > TexturePaintPersistenceDelegate


1 /*
2  * TexturePaintPersistenceDelegate.java
3  *
4  * Created on Nov 2, 2005, 2:31 PM
5  */

6 package com.thoughtriver.open.vectorvisuals.persistence;
7
8 import java.awt.*;
9 import java.beans.*;
10
11 /**
12  * This delegate provides persistence capability for <CODE>TexturePaint</CODE>
13  * instances.
14  *
15  * @author Brandon Franklin
16  * @version $Date: 2006/11/25 09:08:28 $
17  */

18 public class TexturePaintPersistenceDelegate extends DefaultPersistenceDelegate {
19
20     /**
21      * {@inheritDoc}
22      */

23     @Override JavaDoc
24     protected Expression instantiate(final Object JavaDoc oldInstance, @SuppressWarnings JavaDoc("unused") final Encoder out) {
25         TexturePaint texture = (TexturePaint) oldInstance;
26         return new Expression(texture, texture.getClass(), "new", new Object JavaDoc[] {
27                 texture.getImage(), texture.getAnchorRect()
28         });
29     }
30
31 }
32
Popular Tags