|
|||||||||
| 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.
| Nested Class Summary | |
|---|---|
protected static class |
TabbedPane.Tab
|
| Nested classes/interfaces inherited from class com.threerings.opengl.gui.Container |
|---|
Container.ChildOp |
| Field Summary | |
|---|---|
protected Container |
_buttons
|
protected Button |
_close
|
protected ActionListener |
_closer
|
protected ActionListener |
_selector
|
protected int |
_selidx
|
protected ArrayList<TabbedPane.Tab> |
_tabs
|
protected Container |
_top
|
static String |
SELECTION_CHANGED
Deprecated. |
| Fields inherited from class com.threerings.opengl.gui.Container |
|---|
_children, _layout |
| Fields inherited from class com.threerings.opengl.gui.Component |
|---|
_alpha, _backgrounds, _borders, _colors, _ctx, _cursor, _enabled, _height, _hover, _hoverable, _insets, _listeners, _parent, _preferredSize, _properties, _rect, _styleConfigs, _tipmouse, _tiptext, _tooltipStyle, _transferHandler, _valid, _visible, _width, _x, _y, DEFAULT, DISABLED, HOVER, STATE_COUNT, STATE_PCLASSES |
| 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. |
protected String |
getDefaultStyleConfig()
Returns the name of the default config to be used for all instances of this component. |
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. |
protected void |
selectTab(int tabidx,
long when,
int modifiers)
Selects the tab with the specified index. |
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. |
protected void |
tabWasRemoved(Component tab,
boolean btnClose)
Called when a tab was removed. |
protected void |
updateClose(boolean showClose)
Updates the visibility of the close tab button. |
| Methods inherited from class com.threerings.opengl.gui.Container |
|---|
add, add, add, add, applyOperation, computePreferredSize, getComponent, getComponentCount, getComponentIndex, getFirstDescendantFocus, getHitComponent, getLastDescendantFocus, getLayoutManager, getNextFocus, getPreviousFocus, layout, remove, remove, removeAll, renderComponent, replace, setAlpha, setEnabled, setHoverable, setLayoutManager, validate, wasAdded, wasRemoved |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
@Deprecated public static final String SELECTION_CHANGED
protected ActionListener _selector
protected ActionListener _closer
protected ArrayList<TabbedPane.Tab> _tabs
protected int _selidx
protected Container _top
protected Container _buttons
protected Button _close
| 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)
protected void selectTab(int tabidx,
long when,
int modifiers)
protected void updateClose(boolean showClose)
protected void tabWasRemoved(Component tab,
boolean btnClose)
btnClose - set to true if the tab was removed by the close buttonprotected String getDefaultStyleConfig()
Component
getDefaultStyleConfig in class Container
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||