Package com.ardor3d.extension.ui
Class UITabbedPane
java.lang.Object
com.ardor3d.scenegraph.Spatial
com.ardor3d.scenegraph.Node
com.ardor3d.extension.ui.UIComponent
com.ardor3d.extension.ui.UIContainer
com.ardor3d.extension.ui.UIPanel
com.ardor3d.extension.ui.UITabbedPane
- All Implemented Interfaces:
UIKeyHandler
,Hintable
,Savable
A container similar to Swing's
JTabbedPane
in which multiple components may be contained and
viewed one at a time using a set of navigation buttons.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
An enum describing the edge on which to place tab buttons. -
Field Summary
Fields inherited from class com.ardor3d.extension.ui.UIContainer
_textureRenderer, STANDIN_TEXTURE_SIZE
Fields inherited from class com.ardor3d.extension.ui.UIComponent
_tooltipPopTime, _tooltipText, DEFAULT_FOREGROUND_COLOR
Fields inherited from class com.ardor3d.scenegraph.Spatial
_controllers, _delegateMap, _dirtyMark, _frustumIntersects, _listener, _localTransform, _name, _parent, _queueDistance, _renderStateList, _sceneHints, _userData, _worldBound, _worldTransform, ON_DIRTY_ATTACHED, ON_DIRTY_BOUNDING, ON_DIRTY_RENDERSTATE, ON_DIRTY_TRANSFORM, ON_DIRTY_TRANSFORM_ONLY
-
Constructor Summary
ConstructorDescriptionUITabbedPane
(UITabbedPane.TabPlacement placement) Construct a new Tabbed Pane with the given tab placement. -
Method Summary
Modifier and TypeMethodDescriptionvoid
add
(UIComponent component) Adds the given component to this tabbed pane with no icon and "unnamed" as the tab label.void
add
(UIComponent component, String label) Adds the given component to this tabbed pane using the given tab label text and no icon.void
add
(UIComponent component, String label, SubTex icon) Adds the given component to this tabbed pane using the given tab label text and icon.int
getTabButton
(int index) getTabContents
(int index) int
void
layout()
Override this to perform actual layout.void
removeTab
(int index) Remove the tab at the given tab index.void
setCurrentTab
(int index) Set the currently viewed component to the one at the given tab index.void
setCurrentTab
(UITab tab) Set the currently viewed component to the one associated with the given tab.Methods inherited from class com.ardor3d.extension.ui.UIContainer
attachedToHud, clearStandin, contains, contains, detachAllChildren, detachedFromHud, draw, drawComponent, fireComponentDirty, fireStyleChanged, getLayout, getMinificationFilter, getUIComponent, isDirty, isDoClip, isDrawingStandin, isUseStandin, remove, removeAllComponents, setDirty, setDoClip, setLayout, setMinificationFilter, setUseStandin, updateMinimumSizeFromContents
Methods inherited from class com.ardor3d.extension.ui.UIComponent
addFontStyle, applySkin, cancelTooltipTimer, centerOn, centerOn, clearFontStyle, clearMaximumContentSize, clearMinimumContentSize, compact, fitComponentIn, gainedFocus, getBackdrop, getBorder, getCombinedOpacity, getContentHeight, getContentWidth, getCurrentOpacity, getDefaultFontFamily, getDefaultFontSize, getDefaultFontStyles, getFontStyles, getForegroundColor, getHud, getHudX, getHudY, getKeyFocusTarget, getLayoutData, getLocalComponentHeight, getLocalComponentWidth, getLocalFontStyles, getLocalForegroundColor, getLocalOpacity, getLocalX, getLocalY, getMargin, getMaximumContentHeight, getMaximumContentWidth, getMaximumLocalComponentHeight, getMaximumLocalComponentWidth, getMinimumContentHeight, getMinimumContentWidth, getMinimumLocalComponentHeight, getMinimumLocalComponentWidth, getPadding, getRelativeComponentBounds, getRelativeMaxComponentBounds, getRelativeMinComponentBounds, getTooltipPopTime, getTooltipText, getTopLevelComponent, getTotalBottom, getTotalLeft, getTotalRight, getTotalTop, hasVirginContentArea, insideMargin, isAttachedToHUD, isConsumeKeyEvents, isConsumeMouseEvents, isEnabled, isUseTransparency, isVisible, keyHeld, keyPressed, keyReleased, lostFocus, mouseClicked, mouseDeparted, mouseEntered, mouseMoved, mousePressed, mouseReleased, mouseWheel, pack, postdrawComponent, predrawComponent, requestFocus, setBackdrop, setBorder, setConsumeKeyEvents, setConsumeMouseEvents, setContentHeight, setContentSize, setContentWidth, setDefaultFontFamily, setDefaultFontSize, setDefaultFontStyles, setEnabled, setFontStyles, setForegroundColor, setHudX, setHudXY, setHudY, setKeyFocusTarget, setLayoutData, setLayoutMinimumContentSize, setLocalComponentHeight, setLocalComponentSize, setLocalComponentWidth, setLocalX, setLocalXY, setLocalY, setMargin, setMaximumContentHeight, setMaximumContentSize, setMaximumContentWidth, setMinimumContentHeight, setMinimumContentSize, setMinimumContentWidth, setOpacity, setPadding, setTooltipPopTime, setTooltipText, setUseTransparency, setVirginContentArea, setVisible, updateWorldTransform, updateWorldTransform, validateContentSize
Methods inherited from class com.ardor3d.scenegraph.Node
acceptVisitor, attachChild, attachChildAt, detachChild, detachChildAt, detachChildNamed, getChild, getChild, getChildIndex, getChildren, getClassTag, getNumberOfChildren, hasChild, makeCopy, makeInstanced, propagateDirtyDown, read, sortLights, swapChildren, updateChildren, updateWorldBound, updateWorldRenderStates, write
Methods inherited from class com.ardor3d.scenegraph.Spatial
addController, addTranslation, addTranslation, applyWorldRenderStates, clearControllers, clearDirty, clearDirty, clearRenderState, getController, getControllerCount, getControllers, getCurrentRenderDelegate, getLastFrustumIntersection, getListener, getLocalLastFrustumIntersection, getLocalRenderState, getLocalRenderStates, getName, getParent, getParentHintable, getRenderDelegate, getRotation, getScale, getSceneHints, getTransform, getTranslation, getUserData, getWorldBound, getWorldRotation, getWorldScale, getWorldTransform, getWorldTranslation, hasAncestor, isDirty, localToWorld, markDirty, markDirty, onDraw, propagateBoundToRoot, propagateDirtyUp, propagateStatesFromRoot, propageEventUp, removeController, removeController, removeFromParent, setLastFrustumIntersection, setListener, setName, setParent, setRenderDelegate, setRenderState, setRotation, setRotation, setScale, setScale, setScale, setTransform, setTranslation, setTranslation, setUserData, setWorldRotation, setWorldRotation, setWorldScale, setWorldScale, setWorldScale, setWorldTransform, setWorldTranslation, setWorldTranslation, toString, updateControllers, updateGeometricState, updateGeometricState, updateWorldRenderStates, worldToLocal
-
Constructor Details
-
UITabbedPane
Construct a new Tabbed Pane with the given tab placement.- Parameters:
placement
- which edge to place the tab buttons on
-
-
Method Details
-
getTabPlacement
- Returns:
- which edge we place the tab buttons on
-
getCurrentTab
public int getCurrentTab()- Returns:
- the index of the currently viewed tab or -1 if nothing is currently viewed.
-
getTabButton
- Parameters:
index
- the index- Returns:
- the tab button at the given index.
-
getTabContents
- Parameters:
index
- the index- Returns:
- the component contents for the given tab index.
-
layout
public void layout()Description copied from class:UIComponent
Override this to perform actual layout.- Overrides:
layout
in classUIContainer
-
getTabCount
public int getTabCount()- Returns:
- the number of components/tabs in this tabbed pane.
-
getViewedComponent
- Returns:
- the currently viewed tab's component. If no component is viewed, null is returned.
-
add
Adds the given component to this tabbed pane with no icon and "unnamed" as the tab label.- Overrides:
add
in classUIContainer
- Parameters:
component
- the component to add
-
add
Adds the given component to this tabbed pane using the given tab label text and no icon.- Parameters:
component
- the component to addlabel
- the text of the tab label
-
add
Adds the given component to this tabbed pane using the given tab label text and icon.- Parameters:
component
- the component to addlabel
- the text of the tab labelicon
- the icon of the tab label
-
removeTab
public void removeTab(int index) Remove the tab at the given tab index.- Parameters:
index
- the tab index
-
setCurrentTab
Set the currently viewed component to the one associated with the given tab.- Parameters:
tab
- the tab
-
setCurrentTab
public void setCurrentTab(int index) Set the currently viewed component to the one at the given tab index.- Parameters:
index
- the tab index
-