KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * BrushPersistenceDelegate.java
3  *
4  * Created on Nov 1, 2005, 9:54 PM
5  */

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

19 public class BrushPersistenceDelegate extends DefaultPersistenceDelegate {
20
21     /**
22      * {@inheritDoc}
23      */

24     @Override JavaDoc
25     protected Expression instantiate(final Object JavaDoc oldInstance, @SuppressWarnings JavaDoc("unused") final Encoder out) {
26         Brush brush = (Brush) oldInstance;
27         return new Expression(brush, brush.getClass(), "new", new Object JavaDoc[] {
28                 brush.getPaint(), brush.getComposite(), brush.getStroke()
29         });
30     }
31
32 }
33
Popular Tags