com.vaadin.client.ui.
Class VAccordion
- java.lang.Object
-
- com.google.gwt.user.client.ui.UIObject
-
- com.google.gwt.user.client.ui.Widget
-
- com.google.gwt.user.client.ui.Panel
-
- com.google.gwt.user.client.ui.ComplexPanel
-
- com.vaadin.client.ui.VTabsheetBase
-
- com.vaadin.client.ui.VAccordion
-
All Implemented Interfaces:
com.google.gwt.event.logical.shared.HasAttachHandlers
,com.google.gwt.event.shared.HasHandlers
,com.google.gwt.user.client.EventListener
,com.google.gwt.user.client.ui.HasEnabled
,com.google.gwt.user.client.ui.HasVisibility
,com.google.gwt.user.client.ui.HasWidgets
,com.google.gwt.user.client.ui.HasWidgets.ForIsWidget
,com.google.gwt.user.client.ui.IndexedPanel
,com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget
,com.google.gwt.user.client.ui.IsWidget
,Iterable<com.google.gwt.user.client.ui.Widget>
public class VAccordion extends VTabsheetBase
Widget class for the Accordion component. Displays one child item's contents at a time.
Author:
Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
VAccordion.StackItem
A StackItem has always two children, Child 0 is a VCaption, Child 1 is the actual child widget.
-
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled
-
-
Field Summary
Fields Modifier and Type Field Description static String
CLASSNAME
Default classname for this widget.
int
selectedItemIndex
For internal use only.
-
Fields inherited from class com.vaadin.client.ui.VTabsheetBase
activeTabIndex, client, connector, disabled, disabledTabKeys, readonly, tabKeys
-
-
Constructor Summary
Constructors Constructor Description VAccordion()
Constructs a widget for an Accordion.
-
Method Summary
All Methods Modifier and Type Method Description protected void
clearPaintables()
Deprecated.
This method is not called by the framework code anymore.void
close(VAccordion.StackItem item)
For internal use only.
VAccordion.StackItem
getOpenStackItem()
Returns the currently open stack item.
VAccordion.StackItem
getStackItem(int index)
For internal use only.
Iterable<VAccordion.StackItem>
getStackItems()
Returns an iterable over all the stack items.
ComponentConnector
getTab(int index)
Implement in extending classes.
int
getTabCount()
Implement in extending classes.
Iterator<com.google.gwt.user.client.ui.Widget>
getWidgetIterator()
void
onSelectTab(VAccordion.StackItem item)
Handle stack item selection.
void
open(int itemIndex)
For internal use only.
void
removeTab(int index)
Implement in extending classes.
void
renderTab(TabState tabState, int index)
Implement in extending classes.
void
selectTab(int index)
For internal use only.
void
setStyleName(String style)
void
setStylePrimaryName(String style)
void
setTabIndex(int tabIndex)
For internal use only.
protected void
updateStyleNames(String primaryStyleName)
Updates the primary style name base for all stack items.
-
Methods inherited from class com.vaadin.client.ui.VTabsheetBase
addTabKey, clearTabKeys, getConnectorForWidget, isDynamicHeight, isDynamicWidth, isEnabled, isTabCaptionsAsHtml, setActiveTabIndex, setClient, setConnector, setEnabled, setReadonly, setTabCaptionsAsHtml
-
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel
add, add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Panel
add, add, adopt, clear, doAttachChildren, doDetachChildren, orphan, remove
-
Methods inherited from class com.google.gwt.user.client.ui.Widget
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents, unsinkEvents
-
Methods inherited from class com.google.gwt.user.client.ui.UIObject
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, sinkBitlessEvent, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
-
-
-
Field Detail
-
CLASSNAME
public static final String CLASSNAME
Default classname for this widget.
See Also:
-
selectedItemIndex
public int selectedItemIndex
For internal use only. May be removed or replaced in the future.
-
-
Method Detail
-
renderTab
public void renderTab(TabState tabState, int index)
Description copied from class:
VTabsheetBase
Implement in extending classes. This method should render needed elements and set the visibility of the tab according to the 'visible' parameter. This method should not update the selection, the connector should handle that separately.
Specified by:
renderTab
in classVTabsheetBase
Parameters:
tabState
- shared state of a single tabindex
- the index of that tab
-
selectTab
public void selectTab(int index)
Description copied from class:
VTabsheetBase
For internal use only. May be removed or replaced in the future.
Specified by:
selectTab
in classVTabsheetBase
Parameters:
index
- the index of the tab to select
-
setStylePrimaryName
public void setStylePrimaryName(String style)
Overrides:
setStylePrimaryName
in classcom.google.gwt.user.client.ui.UIObject
-
setStyleName
public void setStyleName(String style)
Overrides:
setStyleName
in classcom.google.gwt.user.client.ui.UIObject
-
updateStyleNames
protected void updateStyleNames(String primaryStyleName)
Updates the primary style name base for all stack items.
Parameters:
primaryStyleName
- the new primary style name base
-
setTabIndex
public void setTabIndex(int tabIndex)
For internal use only. May be renamed or removed in a future release.
Sets the tabulator index for the active stack item. The active stack item represents the entire accordion in the browser's focus cycle (excluding any focusable elements within the content panel).
This value is delegated from the TabsheetState via AccordionState.
Parameters:
tabIndex
- tabulator index for the open stack itemSince:
8.1.7
-
open
public void open(int itemIndex)
For internal use only. May be removed or replaced in the future.
Parameters:
itemIndex
- the index of the stack item to open
-
close
public void close(VAccordion.StackItem item)
For internal use only. May be removed or replaced in the future.
Parameters:
item
- the stack item to close
-
onSelectTab
public void onSelectTab(VAccordion.StackItem item)
Handle stack item selection.
Parameters:
item
- the selected stack item
-
clearPaintables
@Deprecated protected void clearPaintables()
Deprecated.This method is not called by the framework code anymore.Clears current tabs and contents.
Specified by:
clearPaintables
in classVTabsheetBase
-
getWidgetIterator
public Iterator<com.google.gwt.user.client.ui.Widget> getWidgetIterator()
Specified by:
getWidgetIterator
in classVTabsheetBase
Returns:
a list of currently shown Widgets
-
getTabCount
public int getTabCount()
Description copied from class:
VTabsheetBase
Implement in extending classes. This method should return the number of tabs currently rendered.
Specified by:
getTabCount
in classVTabsheetBase
Returns:
the number of currently rendered tabs
-
removeTab
public void removeTab(int index)
Description copied from class:
VTabsheetBase
Implement in extending classes. This method should remove the rendered tab with the specified index.
Specified by:
removeTab
in classVTabsheetBase
Parameters:
index
- the index of the tab to remove
-
getTab
public ComponentConnector getTab(int index)
Description copied from class:
VTabsheetBase
Implement in extending classes. This method should return the connector corresponding to the given index.
Specified by:
getTab
in classVTabsheetBase
Parameters:
index
- the index of the tab whose connector to findReturns:
the connector of the queried tab, or
null
if not found
-
getStackItem
public VAccordion.StackItem getStackItem(int index)
For internal use only. May be removed or replaced in the future.
Parameters:
index
- the index of the stack item to getReturns:
the stack item
-
getStackItems
public Iterable<VAccordion.StackItem> getStackItems()
Returns an iterable over all the stack items.
Returns:
the iterable
-
getOpenStackItem
public VAccordion.StackItem getOpenStackItem()
Returns the currently open stack item.
Returns:
the open stack item, or
null
if one does not exist
-
-