KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jdesktop > jdnc > markup > attr > AppAttributes


1 /*
2  * $Id: AppAttributes.java,v 1.1.1.1 2004/06/16 01:43:40 davidson1 Exp $
3  *
4  * Copyright 2004 Sun Microsystems, Inc., 4150 Network Circle,
5  * Santa Clara, California 95054, U.S.A. All rights reserved.
6  */

7
8 package org.jdesktop.jdnc.markup.attr;
9
10 import org.jdesktop.swing.Application;
11
12 import net.openmarkup.ApplierException;
13 import net.openmarkup.AttributeApplier;
14 import net.openmarkup.Realizable;
15
16 /**
17  * @author Amy Fowler
18  */

19 public class AppAttributes {
20     public static final AttributeApplier titleApplier = new AttributeApplier() {
21         public void apply(Realizable target, String JavaDoc namespaceURI,
22                           String JavaDoc attributeName, String JavaDoc attributeValue) throws ApplierException {
23             Application app = (Application) target.getObject();
24             app.setTitle(attributeValue);
25         }
26     };
27
28     public static final AttributeApplier versionStringApplier = new AttributeApplier() {
29         public void apply(Realizable target, String JavaDoc namespaceURI,
30                           String JavaDoc attributeName, String JavaDoc attributeValue) throws ApplierException {
31             Application app = (Application) target.getObject();
32             app.setVersionString(attributeValue);
33         }
34     };
35      // ...
36
}
37
Popular Tags