当前页面:
在线文档首页 >
NetBeans API Javadoc (Current Development Version)
SwitcherTableItem (Tab Control) - NetBeans API Javadoc (Current Development Version)
org.netbeans.swing.popupswitcher
Class SwitcherTableItem
java.lang.Object
org.netbeans.swing.popupswitcher.SwitcherTableItem
- All Implemented Interfaces:
- Comparable
public class SwitcherTableItem
- extends Object
- implements Comparable
Represents one item in SwitcherTable.
- See Also:
SwitcherTable
Nested Class Summary |
static interface |
SwitcherTableItem.Activatable
This interface has to be implemented and passed to the
SwitcherTableItem constructor. |
Constructor Summary |
SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name)
Creates a new instance of SwitcherTableItem |
SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name,
Icon icon)
Creates a new instance of SwitcherTableItem |
SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name,
String htmlName,
Icon icon,
boolean active)
Creates a new instance of SwitcherTableItem |
SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name,
String htmlName,
Icon icon,
boolean active,
String description)
Creates a new instance of SwitcherTableItem |
SwitcherTableItem
public SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name)
- Creates a new instance of SwitcherTableItem
SwitcherTableItem
public SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name,
Icon icon)
- Creates a new instance of SwitcherTableItem
SwitcherTableItem
public SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name,
String htmlName,
Icon icon,
boolean active)
- Creates a new instance of SwitcherTableItem
SwitcherTableItem
public SwitcherTableItem(SwitcherTableItem.Activatable activatable,
String name,
String htmlName,
Icon icon,
boolean active,
String description)
- Creates a new instance of SwitcherTableItem
activate
public void activate()
- Calls
activate()
method of Activatable
interface
which has to be passed in a constructor.
- See Also:
SwitcherTableItem.Activatable.activate()
getName
public String getName()
- Returns item's name
getHtmlName
public String getHtmlName()
- Returns item's html name.
getDescription
public String getDescription()
- Return item's description - the text which can be used for arbitrary
purpose. E.g.
KeyboardPopupSwitcher uses it for statusbar
text.
getIcon
public Icon getIcon()
- Returns item's icon
getActivatable
public SwitcherTableItem.Activatable getActivatable()
- Returns item's activatable object
isActive
public boolean isActive()
- Returns whether this item is active or not.
toString
public String toString()
- Returns human readable description of this item
- Overrides:
toString
in class Object
equals
public boolean equals(Object o)
- Returns true if the
name
and activatable
are the
same as passed one.
- Overrides:
equals
in class Object
hashCode
public int hashCode()
- Returns a hash code value for the item.
- Overrides:
hashCode
in class Object
- Returns:
- int hashcode
compareTo
public int compareTo(Object o)
- Compares items based on theirs
name
s. Items which has
null-name will be last.
- Specified by:
compareTo
in interface Comparable