com.intellij.openapi.editor.colors
Class TextAttributesKey

java.lang.Object
  extended by com.intellij.openapi.editor.colors.TextAttributesKey
All Implemented Interfaces:
java.lang.Comparable<TextAttributesKey>

public final class TextAttributesKey
extends java.lang.Object
implements java.lang.Comparable<TextAttributesKey>

A type of item with a distinct highlighting in an editor or in other views.


Method Summary
 int compareTo(TextAttributesKey key)
           
static TextAttributesKey createTextAttributesKey(java.lang.String externalName)
          Registers a text attribute key with the specified identifier.
static TextAttributesKey createTextAttributesKey(java.lang.String externalName, TextAttributes defaultAttributes)
          Registers a text attribute key with the specified identifier and default attributes.
static TextAttributesKey find(java.lang.String externalName)
           
 TextAttributes getDefaultAttributes()
          Returns the default text attributes associated with the key.
 java.lang.String getExternalName()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

find

@NotNull
public static TextAttributesKey find(java.lang.String externalName)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getExternalName

public java.lang.String getExternalName()

compareTo

public int compareTo(TextAttributesKey key)
Specified by:
compareTo in interface java.lang.Comparable<TextAttributesKey>

getDefaultAttributes

public TextAttributes getDefaultAttributes()
Returns the default text attributes associated with the key.

Returns:
the text attributes.

createTextAttributesKey

public static TextAttributesKey createTextAttributesKey(@NonNls
                                                        java.lang.String externalName,
                                                        TextAttributes defaultAttributes)
Registers a text attribute key with the specified identifier and default attributes.

Parameters:
externalName - the unique identifier of the key.
defaultAttributes - the default text attributes associated with the key.
Returns:
the new key instance, or an existing instance if the key with the same identifier was already registered.

createTextAttributesKey

public static TextAttributesKey createTextAttributesKey(@NonNls
                                                        java.lang.String externalName)
Registers a text attribute key with the specified identifier.

Parameters:
externalName - the unique identifier of the key.
Returns:
the new key instance, or an existing instance if the key with the same identifier was already registered.