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.
-
changeEvent
- Only one ChangeEvent is needed per TabPane instance since the
event's only (read-only) state is the source property.
-
changeListener
- The changeListener is the listener we add to the
model.
-
changeListenerList
-
-
model
-
-
JTabbedPane()
- Creates an empty TabbedPane.
-
addChangeListener(ChangeListener)
-
-
addTab(String, Icon, Component)
- Adds a component, represented by title and icon, either of
which can be null.
-
addTab(String, Icon, Component, String)
-
-
componentAt(int)
- Returns the component at index.
-
createChangeListener()
- Subclasses that want to handle ChangeEvents differently
can override this to return a subclass of ModelListener or
another ChangeListener implementation.
-
getModel()
- Returns the model associated with the TabbedPane.
-
getSelectedIndex()
- All of the Model methods are implemented by delegation.
-
getTabCount()
- Returns the number of tabs.
-
getToolTipText(MouseEvent)
- Returns the string to be used as the tooltip for event.
-
getUI()
- Returns the TabbedPane's UI controller.
-
iconAt(int)
- Returns the icon at index.
-
removeChangeListener(ChangeListener)
-
-
removeTabAt(int)
- Removes the tab at index.
-
setModel(SingleSelectionModel)
- Sets the model to be used with the TabbedPane.
-
setSelectedIndex(int)
-
-
setUI(TabbedPaneUI)
- Sets the TabbedPane's UI controller.
-
titleAt(int)
- Returns the title at index.
-
updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
model
protected SingleSelectionModel model
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.
changeListenerList
protected ChangeListener changeListenerList
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".
JTabbedPane
public JTabbedPane()
- Creates an empty TabbedPane.
- See Also:
- addTab
getUI
public TabbedPaneUI getUI()
- Returns the TabbedPane's UI controller.
- See Also:
- setUI
setUI
public void setUI(TabbedPaneUI ui)
- Sets the TabbedPane's UI controller.
- Parameters:
- ui - the new UI object
- See Also:
- getUI
updateUI
public void updateUI()
- Called to replace the UI with the latest version from the
default UIFactory.
- Overrides:
- updateUI in class JComponent
createChangeListener
protected ChangeListener createChangeListener()
- Subclasses that want to handle ChangeEvents differently
can override this to return a subclass of ModelListener or
another ChangeListener implementation.
addChangeListener
public void addChangeListener(ChangeListener l)
removeChangeListener
public void removeChangeListener(ChangeListener l)
getModel
public SingleSelectionModel getModel()
- Returns the model associated with the TabbedPane.
- See Also:
- setModel
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
getSelectedIndex
public int getSelectedIndex()
- All of the Model methods are implemented by delegation.
setSelectedIndex
public void setSelectedIndex(int index)
addTab
public void addTab(String title,
Icon icon,
Component component,
String tip)
addTab
public void addTab(String title,
Icon icon,
Component component)
- Adds a component, represented by title and icon, either of
which can be null.
removeTabAt
public void removeTabAt(int index)
- Removes the tab at index.
getTabCount
public int getTabCount()
- Returns the number of tabs.
titleAt
public String titleAt(int index)
- Returns the title at index.
iconAt
public Icon iconAt(int index)
- Returns the icon at index.
getToolTipText
public String getToolTipText(MouseEvent event)
- Returns the string to be used as the tooltip for event.
- Overrides:
- getToolTipText in class JComponent
componentAt
public Component componentAt(int index)
- Returns the component at index.
All Packages Class Hierarchy This Package Previous Next Index