javax.swing.text
Class StyleContext.KeyBuilder

java.lang.Object
  extended byjavax.swing.text.StyleContext.KeyBuilder
Enclosing class:
StyleContext

class StyleContext.KeyBuilder
extends Object

Sorts the key strings so that they can be very quickly compared in the attribute set searchs.


Field Summary
private  Vector data
           
private  Vector keys
           
 
Constructor Summary
(package private) StyleContext.KeyBuilder()
           
 
Method Summary
 void addAttribute(Object key, Object value)
          Adds a key/value to the set.
 void addAttributes(AttributeSet attr)
          Adds a set of key/value pairs to the set.
 Object[] createTable()
          Creates a table of sorted key/value entries suitable for creation of an instance of SmallAttributeSet.
(package private)  int getCount()
          The number of key/value pairs contained in the current key being forged.
 void initialize(AttributeSet a)
           
private  void initialize(Object[] sorted)
          Initialize with a set of already sorted keys (data from an existing SmallAttributeSet).
 void removeAttribute(Object key)
          Removes the given name from the set.
 void removeAttributes(AttributeSet attr)
          Removes the set of matching attributes from the set.
 void removeAttributes(Enumeration names)
          Removes the set of keys from the set.
private  void removeSearchAttribute(Object ikey, Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

keys

private Vector keys

data

private Vector data
Constructor Detail

StyleContext.KeyBuilder

StyleContext.KeyBuilder()
Method Detail

initialize

public void initialize(AttributeSet a)

initialize

private void initialize(Object[] sorted)
Initialize with a set of already sorted keys (data from an existing SmallAttributeSet).


createTable

public Object[] createTable()
Creates a table of sorted key/value entries suitable for creation of an instance of SmallAttributeSet.


getCount

int getCount()
The number of key/value pairs contained in the current key being forged.


addAttribute

public void addAttribute(Object key,
                         Object value)
Adds a key/value to the set.


addAttributes

public void addAttributes(AttributeSet attr)
Adds a set of key/value pairs to the set.


removeAttribute

public void removeAttribute(Object key)
Removes the given name from the set.


removeAttributes

public void removeAttributes(Enumeration names)
Removes the set of keys from the set.


removeAttributes

public void removeAttributes(AttributeSet attr)
Removes the set of matching attributes from the set.


removeSearchAttribute

private void removeSearchAttribute(Object ikey,
                                   Object value)