|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.swing.tabcontrol.TabData
public final class TabData
Class representing data needed to represent a component in a tab. While immutable to client code, changes to the data model may change the values returned by the methods of this class. TabData objects are the data component of TabDataModel.
TabData objects implement theirequals()
and
hashCode
contract based on the equality of the user object and
the text. The icon and the tooltip text are not considered when testing
equality.
TabDataModel
,
DefaultTabDataModel
Constructor Summary | |
---|---|
TabData(Object userObject,
Icon i,
String caption,
String tooltip)
Create a new TabData object. |
Method Summary | |
---|---|
int |
compareTo(Object o)
Compares the text based on java.lang.String's implementation of Comparable. |
boolean |
equals(Object o)
Returns true if the text and component properties of this TabData object match the passed one. |
Component |
getComponent()
The component for the tab. |
Icon |
getIcon()
The icon for the tab. |
String |
getText()
The text for the tab |
String |
getTooltip()
The tooltip for the tab |
Object |
getUserObject()
|
int |
hashCode()
Munges the text and component hash codes |
String |
toString()
Get a string representation of this object |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TabData(Object userObject, Icon i, String caption, String tooltip)
userObject
- The object or component that should be displayed when
the tab is selected. For use in TabbedContainer, this
should be an instance of java.awt.Component
i
- The icon for the tabcaption
- The caption for the tabtooltip
- The tooltip for the tabMethod Detail |
---|
public Object getUserObject()
public Component getComponent()
public Icon getIcon()
public String getText()
public String getTooltip()
public String toString()
public boolean equals(Object o)
public int hashCode()
public int compareTo(Object o)
compareTo
in interface Comparable
|
org.netbeans.swing.tabcontrol 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |