KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Id: SorterAttributes.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 java.awt.Color JavaDoc;
11
12 import org.jdesktop.swing.decorator.Sorter;
13 import org.jdesktop.swing.decorator.ConditionalHighlighter;
14 import org.jdesktop.swing.decorator.Highlighter;
15 import net.openmarkup.AttributeApplier;
16 import net.openmarkup.Realizable;
17
18 /**
19  * Flyweight implementations for sorter attribute appliers.
20  *
21  * @author Ramesh Gupta
22  */

23 public class SorterAttributes {
24     public static final AttributeApplier directionApplier = new AttributeApplier() {
25         /**
26         * @tolerant
27          */

28         public void apply(Realizable target, String JavaDoc namespaceURI,
29                           String JavaDoc attributeName, String JavaDoc attributeValue) {
30             ((Sorter) target.getObject()).setAscending(
31                 !attributeValue.equals("descending"));
32         }
33     };
34 }
35
Popular Tags