站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

AttributesUtilities (Editor Settings) - NetBeans API Javadoc (Current Development Version)

org.netbeans.modules.editor.settings/1 1.9

org.netbeans.api.editor.settings
Class AttributesUtilities

java.lang.Object
  extended by org.netbeans.api.editor.settings.AttributesUtilities

public final class AttributesUtilities
extends Object

A collection of utility menthods for working with AttributeSets.


Method Summary
static AttributeSet createComposite(AttributeSet... sets)
          Creates a proxy AttributeSet that will delegate to the AttributeSets passed in as a parameter.
static AttributeSet createImmutable(AttributeSet... sets)
          Creates an immutable AttributeSet as a copy of AttributeSets passed into this method.
static AttributeSet createImmutable(Object... keyValuePairs)
          Creates an immutable AttributeSet, which will contain the keyValuePairs attributes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

createImmutable

public static AttributeSet createImmutable(Object... keyValuePairs)
Creates an immutable AttributeSet, which will contain the keyValuePairs attributes. If the pairs contain attributes with the same name the resulting AttributeSet will return value of the first attribute it will find going through the pairs in the order as they were passed in.

Parameters:
keyValuePairs - The contents of the AttributeSet created by this method. This parameter should list pairs of key-value objects; each pair defining one attribute.
Returns:
The new immutable AttributeSet.

createImmutable

public static AttributeSet createImmutable(AttributeSet... sets)
Creates an immutable AttributeSet as a copy of AttributeSets passed into this method. If the AttributeSets contain attributes with the same name the resulting AttributeSet will return value of the first attribute it will find going through the sets in the order as they were passed in.

Parameters:
sets - The AttributeSets which attributes will become a contents of the newly created AttributeSet.
Returns:
The new immutable AttributeSet.

createComposite

public static AttributeSet createComposite(AttributeSet... sets)
Creates a proxy AttributeSet that will delegate to the AttributeSets passed in as a parameter. If the AttributeSets contain attributes with the same name the composite AttributeSet will return value of the first attribute it will find going through the sets in the order as they were passed in.

Parameters:
sets - The AttributeSets to delegate to.
Returns:
The new composite AttributeSet that will delegate to the sets passed in.

org.netbeans.modules.editor.settings/1 1.9

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.