com.intellij.navigation
Interface ItemPresentation

All Known Implementing Classes:
PresentationData

public interface ItemPresentation

The presentation of an item in a tree, list or similar view.

See Also:
TreeElement.getPresentation(), PresentationData

Method Summary
 javax.swing.Icon getIcon(boolean open)
          Returns the icon representing the object.
 java.lang.String getLocationString()
          Returns the location of the object (for example, the package of a class).
 java.lang.String getPresentableText()
          Returns the name of the object to be presented in most renderers across the program.
 TextAttributesKey getTextAttributesKey()
          Returns the text attributes for rendering the item text.
 

Method Detail

getPresentableText

java.lang.String getPresentableText()
Returns the name of the object to be presented in most renderers across the program.

Returns:
the object name.

getLocationString

@Nullable
java.lang.String getLocationString()
Returns the location of the object (for example, the package of a class). The location string is used by some renderers and usually displayed as grayed text next to the item name.

Returns:
the location description, or null if none is applicable.

getIcon

@Nullable
javax.swing.Icon getIcon(boolean open)
Returns the icon representing the object.

Parameters:
open - only meaningful when used in a tree renderers. false is passed when icon for other renderers is required.
Returns:
the icon instance, or null if no icon should be shown.

getTextAttributesKey

@Nullable
TextAttributesKey getTextAttributesKey()
Returns the text attributes for rendering the item text.

Returns:
the text attributrs, or null if default text attributes should be used