public class PresentationData extends java.lang.Object implements ColoredItemPresentation, ComparableObject, LocationPresentation
ItemPresentation interface.ComparableObject.Impl| Modifier and Type | Field and Description |
|---|---|
protected java.util.List<PresentableNodeDescriptor.ColoredFragment> |
myColoredText |
NONEDEFAULT_LOCATION_PREFIX, DEFAULT_LOCATION_SUFFIX| Constructor and Description |
|---|
PresentationData()
Creates an instance with no parameters specified.
|
PresentationData(java.lang.String presentableText,
java.lang.String locationString,
javax.swing.Icon openIcon,
javax.swing.Icon closedIcon,
TextAttributesKey attributesKey)
Deprecated.
|
PresentationData(java.lang.String presentableText,
java.lang.String locationString,
javax.swing.Icon icon,
TextAttributesKey attributesKey)
Creates an instance with the specified parameters.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addText(PresentableNodeDescriptor.ColoredFragment coloredFragment) |
void |
addText(java.lang.String text,
SimpleTextAttributes attributes) |
void |
applyFrom(PresentationData from) |
void |
clear() |
void |
clearText() |
PresentationData |
clone() |
void |
copyFrom(PresentationData from) |
boolean |
equals(java.lang.Object obj) |
java.util.List<PresentableNodeDescriptor.ColoredFragment> |
getColoredText() |
java.lang.Object [] |
getEqualityObjects() |
java.awt.Color |
getForcedTextForeground() |
javax.swing.Icon |
getIcon(boolean open)
Returns the icon representing the object.
|
java.lang.String |
getLocationPrefix() |
java.lang.String |
getLocationString()
Returns the location of the object (for example, the package of a class).
|
java.lang.String |
getLocationSuffix() |
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.
|
java.lang.String |
getTooltip() |
int |
hashCode() |
boolean |
hasSeparatorAbove() |
boolean |
isChanged() |
void |
setAttributesKey(TextAttributesKey attributesKey)
Sets the attributes for rendering the item text.
|
void |
setChanged(boolean changed) |
void |
setClosedIcon(javax.swing.Icon closedIcon)
Deprecated.
Different icons for open/closed no longer supported. Use setIcon instead
Sets the icon shown for the node when it is collapsed in a tree, or when it is displayed
in a non-tree view.
|
void |
setForcedTextForeground(java.awt.Color forcedTextForeground) |
void |
setIcon(javax.swing.Icon icon) |
void |
setIcons(javax.swing.Icon icon)
Deprecated.
Different icons for open/closed no longer supported. Use setIcon instead.
Sets both the open and closed icons of the node to the specified icon.
|
void |
setLocationString(java.lang.String locationString)
Sets the location of the object (for example, the package of a class).
|
void |
setOpenIcon(javax.swing.Icon openIcon)
Deprecated.
Different icons for open/closed no longer supported. This function is no op.
Sets the icon shown for the node when it is expanded in the tree.
|
void |
setPresentableText(java.lang.String presentableText)
Sets the name of the object to be presented in most renderers across the program.
|
void |
setSeparatorAbove(boolean b) |
void |
setTooltip(java.lang.String tooltip) |
void |
updateFrom(ItemPresentation presentation)
Copies the presentation parameters from the specified presentation instance.
|
protected final java.util.List<PresentableNodeDescriptor.ColoredFragment> myColoredText
public PresentationData(java.lang.String presentableText,
java.lang.String locationString,
javax.swing.Icon icon,
TextAttributesKey attributesKey)
presentableText - the name of the object to be presented in most renderers across the program.locationString - 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.icon - the icon shown for the node when it is collapsed in a tree, or when it is displayed
in a non-tree view.attributesKey - the attributes for rendering the item text.@Deprecated
public PresentationData(java.lang.String presentableText,
java.lang.String locationString,
javax.swing.Icon openIcon,
javax.swing.Icon closedIcon,
TextAttributesKey attributesKey)
PresentationData(String, String, Icon, TextAttributesKey) instead.public PresentationData()
public javax.swing.Icon getIcon(boolean open)
ItemPresentationgetIcon in interface ItemPresentationopen - Used to mean if open/close icons for tree renderer. No longer in use. The parameter is only there for API compatibility reason.public java.awt.Color getForcedTextForeground()
public void setForcedTextForeground(java.awt.Color forcedTextForeground)
public java.lang.String getLocationString()
ItemPresentationgetLocationString in interface ItemPresentationpublic java.lang.String getPresentableText()
ItemPresentationgetPresentableText in interface ItemPresentationpublic void setIcon(javax.swing.Icon icon)
public void setLocationString(java.lang.String locationString)
locationString - the location of the object.public void setPresentableText(java.lang.String presentableText)
presentableText - the name of the object.@Deprecated public void setClosedIcon(javax.swing.Icon closedIcon)
closedIcon - the closed icon for the node.setIcons(Icon)@Deprecated public void setOpenIcon(javax.swing.Icon openIcon)
openIcon - the open icon for the node.setIcons(Icon)@Deprecated public void setIcons(javax.swing.Icon icon)
icon - the icon for the node.setOpenIcon(Icon),
setClosedIcon(Icon)public void updateFrom(ItemPresentation presentation)
presentation - the instance to copy the parameters from.public boolean hasSeparatorAbove()
public void setSeparatorAbove(boolean b)
public TextAttributesKey getTextAttributesKey()
ColoredItemPresentationgetTextAttributesKey in interface ColoredItemPresentationpublic void setAttributesKey(TextAttributesKey attributesKey)
attributesKey - the attributes for rendering the item text.public java.lang.String getTooltip()
public void setTooltip(java.lang.String tooltip)
public boolean isChanged()
public void setChanged(boolean changed)
public java.util.List<PresentableNodeDescriptor.ColoredFragment> getColoredText()
public void addText(PresentableNodeDescriptor.ColoredFragment coloredFragment)
public void addText(java.lang.String text,
SimpleTextAttributes attributes)
public void clearText()
public void clear()
public java.lang.Object [] getEqualityObjects()
getEqualityObjects in interface ComparableObjectpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic void copyFrom(PresentationData from)
public PresentationData clone()
clone in class java.lang.Objectpublic void applyFrom(PresentationData from)
public java.lang.String getLocationPrefix()
getLocationPrefix in interface LocationPresentationpublic java.lang.String getLocationSuffix()
getLocationSuffix in interface LocationPresentation