public class SwitcherTableItem extends Object implements Comparable
SwitcherTable
.SwitcherTable
Modifier and Type | Class and Description |
---|---|
static interface |
SwitcherTableItem.Activatable
This interface has to be implemented and passed to the
SwitcherTableItem constructor. |
Constructor and Description |
---|
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
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
Calls
activate() method of Activatable interface
which has to be passed in a constructor. |
int |
compareTo(Object o)
Compares items based on theirs
name s. |
boolean |
equals(Object o)
Returns true if the
name and activatable are the
same as passed one. |
SwitcherTableItem.Activatable |
getActivatable()
Returns item's activatable object
|
String |
getDescription()
Return item's description - the text which can be used for arbitrary
purpose.
|
String |
getHtmlName()
Returns item's html name.
|
Icon |
getIcon()
Returns item's icon
|
String |
getName()
Returns item's name
|
int |
hashCode()
Returns a hash code value for the item.
|
boolean |
isActive()
Returns whether this item is active or not.
|
String |
toString()
Returns human readable description of this item
|
public SwitcherTableItem(SwitcherTableItem.Activatable activatable, String name)
public SwitcherTableItem(SwitcherTableItem.Activatable activatable, String name, Icon icon)
public SwitcherTableItem(SwitcherTableItem.Activatable activatable, String name, String htmlName, Icon icon, boolean active)
public SwitcherTableItem(SwitcherTableItem.Activatable activatable, String name, String htmlName, Icon icon, boolean active, String description)
public void activate()
activate()
method of Activatable
interface
which has to be passed in a constructor.SwitcherTableItem.Activatable.activate()
public String getName()
public String getHtmlName()
public String getDescription()
KeyboardPopupSwitcher
uses it for statusbar
text.public Icon getIcon()
public SwitcherTableItem.Activatable getActivatable()
public boolean isActive()
public String toString()
public boolean equals(Object o)
name
and activatable
are the
same as passed one.public int hashCode()
public int compareTo(Object o)
name
s. Items which has
null-name will be last.compareTo
in interface Comparable