|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
lapisx.swing.DisappearingTabbedPane
A wrapper class for JTabbedPane that hides the tabs when there is only one tab. Otherwise a similar interface to JTabbedPane.
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
JComponent.AccessibleJComponent |
Nested classes inherited from class java.awt.Container |
Container.AccessibleAWTContainer |
Nested classes inherited from class java.awt.Component |
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
Field Summary | |
static Debug |
debug
|
Fields inherited from class javax.swing.JComponent |
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DisappearingTabbedPane()
Make a DisappearingTabbedPane with same defaults as new JTabbedPane(). |
|
DisappearingTabbedPane(int tabPlacement)
Make a DisappearingTabbedPane with given tab placement. |
|
DisappearingTabbedPane(JTabbedPane tabs)
Make a DisappearingTabbedPane that encapsulates the given JTabbedPane. |
Method Summary | |
void |
addTab(String title,
Component comp)
Add a tab. |
boolean |
containsComp(Component pane)
returns true if pane already exists in tabbed pane |
Component |
getSelectedComponent()
Get the selected tab (returns null if there is no tab). |
int |
getTabCount()
Get number of tabs. |
static void |
main(String[] args)
|
void |
remove(Component comp)
Remove a tab. |
void |
setSelectedComponent(Component comp)
Select a tab (bringing it to top). |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static Debug debug
Constructor Detail |
public DisappearingTabbedPane()
public DisappearingTabbedPane(int tabPlacement)
tabPlacement
- one of SwingConstants.TOP, BOTTOM, LEFT, RIGHTpublic DisappearingTabbedPane(JTabbedPane tabs)
tabs
- JTabbedPane that will be added to the new
DisappearingTabbedPaneMethod Detail |
public void addTab(String title, Component comp)
title
- Title shown on tabcomp
- Component displayed in tabpublic boolean containsComp(Component pane)
public void remove(Component comp)
comp
- Component to removepublic void setSelectedComponent(Component comp)
comp
- Component to selectpublic Component getSelectedComponent()
public int getTabCount()
public static void main(String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |