站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc (Current Development Version)

SwitcherTableItem (Tab Control) - NetBeans API Javadoc (Current Development Version)

org.netbeans.swing.tabcontrol 1.8

org.netbeans.swing.popupswitcher
Class SwitcherTableItem

java.lang.Object
  extended by 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
 
Method Summary
 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 names.
 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
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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

Method Detail

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 names. Items which has null-name will be last.

Specified by:
compareTo in interface Comparable

org.netbeans.swing.tabcontrol 1.8

Built on May 28 2007.  |  Portions Copyright 1997-2007 Sun Microsystems, Inc. All rights reserved.