public final class ClassPackageListItem extends ListDataItem
| Modifier and Type | Class and Description |
|---|---|
static class |
ClassPackageListItem.Type |
| Modifier and Type | Field and Description |
|---|---|
static oracle.jdeveloper.dialogs.ClassPackageListItem.ClassPackageSorter |
COMPARATOR
A Comparator that orders
ClassPackageListItem objects by
their display name in case-insensitive order. |
| Constructor and Description |
|---|
ClassPackageListItem(java.lang.String fullyQualifiedName,
ClassPackageListItem.Type type)
Creates a ClassPackageListItem with the fully-qualified class or package
name and sets the type to match the object's type.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(java.lang.Object object)
Compares this object with the specified object for order.
|
boolean |
equals(java.lang.Object object) |
java.lang.String |
getDisplayText()
Fetches a displayable text for this item that can be used as
the visible text within a list cell.
|
javax.swing.Icon |
getIcon()
Fetches an icon associated with this type of data item that
can pictorially provide some information for this data item.
|
java.lang.String |
getName()
Fetches the display name of this data item.
|
ClassPackageListItem.Type |
getType() |
int |
hashCode() |
java.lang.String |
toString() |
compareInsensitive, compareSensitive, getAccessibleTextpublic static final oracle.jdeveloper.dialogs.ClassPackageListItem.ClassPackageSorter COMPARATOR
ClassPackageListItem objects by
their display name in case-insensitive order. Package items are sorted
to the end.public ClassPackageListItem(java.lang.String fullyQualifiedName,
ClassPackageListItem.Type type)
fullyQualifiedName - a class or package name, should not be nulltype - the item type - this should not be nullpublic javax.swing.Icon getIcon()
ListDataItemgetIcon in class ListDataItempublic java.lang.String getDisplayText()
ListDataItemListDataItemCellRenderer, this display text is
what is rendered visibly.getDisplayText in class ListDataItempublic java.lang.String getName()
ListDataItem
For example, let's suppose a data item represents a Java method. Its
internal name might be "String.substring()", while its display name
as returned by this method getName() might be
"substring", while its displayable text might be
"substring() returns String".
When sorting ListDataItems using its
Comparable implementation, it is the display name as
returned by getName() that is used for sorting purposes,
not the displayable text.
getName in class ListDataItempublic ClassPackageListItem.Type getType()
public int compareTo(java.lang.Object object)
ListDataItemAlthough this method is not declared final, it is recommended that subclasses do not override it unless they define another abstract class which overrides this routine for ALL subsequent data items. It could be pretty confusing (and unpredictable) otherwise if there are different data item classes with different compareTo() implementations.
compareTo in interface java.lang.ComparablecompareTo in class ListDataItemobject - the Object to be compared.public java.lang.String toString()
toString in class java.lang.Objectpublic boolean equals(java.lang.Object object)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object