All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.sun.java.swing.JTabbedPane

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----com.sun.java.swing.JComponent
                           |
                           +----com.sun.java.swing.JTabbedPane

public class JTabbedPane
extends JComponent
A control that lets the user switch between a group of components by clicking on a title.


Variable Index

 o changeEvent
Only one ChangeEvent is needed per TabPane instance since the event's only (read-only) state is the source property.
 o changeListener
The changeListener is the listener we add to the model.
 o changeListenerList
 o model

Constructor Index

 o JTabbedPane()
Creates an empty TabbedPane.

Method Index

 o addChangeListener(ChangeListener)
 o addTab(String, Icon, Component)
Adds a component, represented by title and icon, either of which can be null.
 o addTab(String, Icon, Component, String)
 o componentAt(int)
Returns the component at index.
 o createChangeListener()
Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.
 o getModel()
Returns the model associated with the TabbedPane.
 o getSelectedIndex()
All of the Model methods are implemented by delegation.
 o getTabCount()
Returns the number of tabs.
 o getToolTipText(MouseEvent)
Returns the string to be used as the tooltip for event.
 o getUI()
Returns the TabbedPane's UI controller.
 o iconAt(int)
Returns the icon at index.
 o removeChangeListener(ChangeListener)
 o removeTabAt(int)
Removes the tab at index.
 o setModel(SingleSelectionModel)
Sets the model to be used with the TabbedPane.
 o setSelectedIndex(int)
 o setUI(TabbedPaneUI)
Sets the TabbedPane's UI controller.
 o titleAt(int)
Returns the title at index.
 o updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Variables

 o model
 protected SingleSelectionModel model
 o changeListener
 protected ChangeListener changeListener
The changeListener is the listener we add to the model. The changeListenerList is the listener list used by clients of the TabbedPane.

 o changeListenerList
 protected ChangeListener changeListenerList
 o changeEvent
 protected ChangeEvent changeEvent
Only one ChangeEvent is needed per TabPane instance since the event's only (read-only) state is the source property. The source of events generated here is always "this".

Constructors

 o JTabbedPane
 public JTabbedPane()
Creates an empty TabbedPane.

See Also:
addTab

Methods

 o getUI
 public TabbedPaneUI getUI()
Returns the TabbedPane's UI controller.

See Also:
setUI
 o setUI
 public void setUI(TabbedPaneUI ui)
Sets the TabbedPane's UI controller.

Parameters:
ui - the new UI object
See Also:
getUI
 o updateUI
 public void updateUI()
Called to replace the UI with the latest version from the default UIFactory.

Overrides:
updateUI in class JComponent
 o createChangeListener
 protected ChangeListener createChangeListener()
Subclasses that want to handle ChangeEvents differently can override this to return a subclass of ModelListener or another ChangeListener implementation.

 o addChangeListener
 public void addChangeListener(ChangeListener l)
 o removeChangeListener
 public void removeChangeListener(ChangeListener l)
 o getModel
 public SingleSelectionModel getModel()
Returns the model associated with the TabbedPane.

See Also:
setModel
 o setModel
 public void setModel(SingleSelectionModel model)
Sets the model to be used with the TabbedPane.

Parameters:
model - the model to be used
See Also:
getModel
 o getSelectedIndex
 public int getSelectedIndex()
All of the Model methods are implemented by delegation.

 o setSelectedIndex
 public void setSelectedIndex(int index)
 o addTab
 public void addTab(String title,
                    Icon icon,
                    Component component,
                    String tip)
 o addTab
 public void addTab(String title,
                    Icon icon,
                    Component component)
Adds a component, represented by title and icon, either of which can be null.

 o removeTabAt
 public void removeTabAt(int index)
Removes the tab at index.

 o getTabCount
 public int getTabCount()
Returns the number of tabs.

 o titleAt
 public String titleAt(int index)
Returns the title at index.

 o iconAt
 public Icon iconAt(int index)
Returns the icon at index.

 o getToolTipText
 public String getToolTipText(MouseEvent event)
Returns the string to be used as the tooltip for event.

Overrides:
getToolTipText in class JComponent
 o componentAt
 public Component componentAt(int index)
Returns the component at index.


All Packages  Class Hierarchy  This Package  Previous  Next  Index