AttributeList.java revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* ident "%Z%%M% %I% %E% SMI"
*
* Copyright (c) 2000 by Sun Microsystems, Inc.
* All rights reserved.
*/
/*
* Copyright (C) 1996 Active Software, Inc.
* All rights reserved.
*
* @(#) AttributeList.java 1.31 - last change made 07/25/97
*/
/**
* Class for storing information about the attributes available on a
* particular type of GUI object.
*
* @version 1.31, 07/25/97
*/
public class AttributeList implements Cloneable {
private Hashtable aliasTable;
public AttributeList() {
aliasTable = new Hashtable();
}
}
if (a == null)
else
}
int flags) {
flags)));
}
}
public Enumeration aliasKeys() {
return aliasTable.keys();
}
}
return s2;
}
}
}
return attr;
}
}
}
/**
* Returns an enumeration of attributes with the given flags.
*/
Attribute s;
s = (Attribute) e.nextElement();
set.addElement(s);
}
}
}
/**
* Returns an enumeration of attributes that do not have
* the given flags.
*/
Attribute s;
s = (Attribute) e.nextElement();
set.addElement(s);
}
}
}
/**
* Returns an enumeration of all elements in the attribute list.
*/
public Enumeration elements() {
}
/**
* Returns the number of elements in the attribute list.
*/
public int size() {
}
/**
* Merge the contents of the given list with this one. New elements
* by the same name will overwrite old ones. Attributes are cloned
* before merging with this list.
*/
{
}
/* JSTYLED */
e.hasMoreElements(); ) {
}
}
}
/**
* Returns an alphabetized enumeration of attributes.
*/
for (; e.hasMoreElements(); ) {
int i;
for (i = 0; i < v.size(); i++) {
if (((Attribute)
{
v.insertElementAt(a, i);
break;
}
}
if (i >= v.size()) {
v.addElement(a);
}
}
return (v.elements());
}
/**
* Clones the attribute list. The attributes in the list
* are cloned, but the attribute's value is not cloned (see
* the comment for the clone method in Attribute).
*
* @see Attribute
*/
return (retval);
}
}
}
}
}