| java.lang.Object org.netbeans.swing.tabcontrol.TabData
TabData | final public class TabData implements Comparable(Code) | | 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 their equals() 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.
author: Tim Boudreau See Also: TabDataModel See Also: DefaultTabDataModel |
Constructor Summary | |
public | TabData(Object userObject, Icon i, String caption, String tooltip) Create a new TabData object.
Parameters: userObject - The object or component that should be displayed whenthe tab is selected. |
NO_ICON | final static Icon NO_ICON(Code) | | An empty icon to be used when null is passed for the icon - internally we
don't support null icons, but Components may legally have them
|
TabData | public TabData(Object userObject, Icon i, String caption, String tooltip)(Code) | | Create a new TabData object.
Parameters: userObject - The object or component that should be displayed whenthe tab is selected. For use in TabbedContainer, thisshould be an instance of java.awt.Component Parameters: i - The icon for the tab Parameters: caption - The caption for the tab Parameters: tooltip - The tooltip for the tab |
compareTo | public int compareTo(Object o)(Code) | | Compares the text based on java.lang.String's implementation of
Comparable.
|
equals | public boolean equals(Object o)(Code) | | Returns true if the text and component properties of this TabData object
match the passed one. Tooltip and icon equality are not evaluated.
|
getComponent | public Component getComponent()(Code) | | The component for the tab. Returns null if the user object is not an
instance of Component.
The component |
getIcon | public Icon getIcon()(Code) | | The icon for the tab. Note that this method is guaranteed to return
non-null - if the icon specified is null, a 0-width, 0-height icon whose
paintIcon method is a no-op will be returned.
The icon |
getText | public String getText()(Code) | | The text for the tab
The text |
getTooltip | public String getTooltip()(Code) | | The tooltip for the tab
The tooltip text |
hashCode | public int hashCode()(Code) | | Munges the text and component hash codes
|
toString | public String toString()(Code) | | Get a string representation of this object
String representation of this object |
|
|