|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.opengl.gui.Component
com.threerings.opengl.gui.Container
com.threerings.opengl.gui.TabbedPane
public class TabbedPane
Displays one of a set of components (tabs) depending on which tab is selected.
| Field Summary | |
|---|---|
static String |
SELECTION_CHANGED
Deprecated. |
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
DEFAULT, DISABLED, HOVER |
| Fields inherited from interface com.threerings.opengl.gui.Selectable |
|---|
SELECT |
| Constructor Summary | |
|---|---|
TabbedPane(GlContext ctx)
Creates a tabbed pane with left justified buttons. |
|
TabbedPane(GlContext ctx,
GroupLayout.Justification tabAlign)
Creates a tabbed pane. |
|
TabbedPane(GlContext ctx,
GroupLayout.Justification tabAlign,
int gap)
Creates a tabbed pane. |
|
| Method Summary | |
|---|---|
void |
addTab(String title,
Component tab)
Adds a tab to the pane using the specified title with no close button. |
void |
addTab(String title,
Component tab,
boolean hasClose)
Adds a tab to the pane using the specified title. |
void |
addTab(String title,
Component tab,
boolean hasClose,
ConfigReference<StyleConfig> style)
Adds a tab to the pane using the specified title. |
Component |
getSelected()
Get the selected item, if any. |
int |
getSelectedIndex()
Get the index of the selected item, or -1. |
Component |
getSelectedTab()
Deprecated. |
int |
getSelectedTabIndex()
Deprecated. |
Component |
getTab(int idx)
Returns the tab at the specified index. |
ToggleButton |
getTabButton(Component tab)
Returns a reference to the tab button for the given tab. |
ToggleButton |
getTabButton(int idx)
Returns a reference to the tab button at the given index. |
int |
getTabCount()
Returns the number of tabs in this pane. |
int |
indexOfTab(Component tab)
Returns the index of the given tab. |
void |
removeAllTabs()
Removes all tabs. |
void |
removeTab(Component tab)
Removes the specified tab. |
void |
removeTab(int tabidx)
Removes the tab at the specified index. |
void |
removeTab(int tabidx,
boolean btnClose)
Removes the tab at the specified index. |
void |
replaceTab(Component otab,
Component ntab)
Replaces the specified tab component. |
void |
replaceTab(int tabidx,
Component ntab)
Replaces the tab component at the specified index. |
void |
selectTab(Component tab)
Deprecated. |
void |
selectTab(int tabidx)
Deprecated. |
void |
setGap(int gap)
Sets the gap between the tab buttons. |
void |
setSelected(Component tab)
Set the selected item. |
void |
setSelectedIndex(int index)
Set the index of the selected item. |
void |
setTabAlignment(GroupLayout.Justification tabAlign)
Sets the justification for the tab buttons. |
| Methods inherited from class com.threerings.opengl.gui.Container |
|---|
add, add, add, add, getComponent, getComponentCount, getComponentIndex, getHitComponent, getLayoutManager, remove, remove, removeAll, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final String SELECTION_CHANGED
| Constructor Detail |
|---|
public TabbedPane(GlContext ctx)
public TabbedPane(GlContext ctx,
GroupLayout.Justification tabAlign)
tabAlign - the justification for the tab buttons.
public TabbedPane(GlContext ctx,
GroupLayout.Justification tabAlign,
int gap)
tabAlign - the justification for the tab buttons.gap - the number of pixels space between each tab button.| Method Detail |
|---|
public void setTabAlignment(GroupLayout.Justification tabAlign)
public void setGap(int gap)
public void addTab(String title,
Component tab)
public void addTab(String title,
Component tab,
boolean hasClose)
public void addTab(String title,
Component tab,
boolean hasClose,
ConfigReference<StyleConfig> style)
public void replaceTab(Component otab,
Component ntab)
public void replaceTab(int tabidx,
Component ntab)
public void removeTab(Component tab)
public void removeTab(int tabidx)
public void removeTab(int tabidx,
boolean btnClose)
btnClose - set to true if the tab was removed by the close buttonpublic void removeAllTabs()
public int getTabCount()
public Component getSelected()
Selectable
getSelected in interface Selectable<Component>public void setSelected(Component tab)
Selectable
setSelected in interface Selectable<Component>public int getSelectedIndex()
Selectable
getSelectedIndex in interface Selectable<Component>public void setSelectedIndex(int index)
Selectable
setSelectedIndex in interface Selectable<Component>@Deprecated public void selectTab(Component tab)
@Deprecated public void selectTab(int tabidx)
@Deprecated public Component getSelectedTab()
@Deprecated public int getSelectedTabIndex()
public ToggleButton getTabButton(Component tab)
public ToggleButton getTabButton(int idx)
public Component getTab(int idx)
public int indexOfTab(Component tab)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||