|
47 | 47 | import com.vaadin.flow.component.dependency.JsModule;
|
48 | 48 | import com.vaadin.flow.component.menubar.MenuBar;
|
49 | 49 | import com.vaadin.flow.component.tabs.Tab;
|
| 50 | +import com.vaadin.flow.component.tabs.Tabs; |
50 | 51 | import com.vaadin.flow.router.RouterLink;
|
51 | 52 | import com.vaadin.flow.shared.Registration;
|
52 | 53 | import java.io.Serializable;
|
|
65 | 66 | * Tabs when you want to allow in-place navigation within a certain part of the UI, instead of
|
66 | 67 | * showing everything at once or forcing the user to navigate between different views.
|
67 | 68 | *
|
68 |
| - * <p>{@link Tab} components can be added to this component with the {@link #add(Tab...)} method or |
69 |
| - * the {@link #Tabs(Tab...)} constructor. The Tab components added to it can be selected with the |
70 |
| - * {@link #setSelectedIndex(int)} or {@link #setSelectedTab(Tab)} methods. The first added {@link |
71 |
| - * Tab} component will be automatically selected, firing a {@link SelectedChangeEvent}, unless |
72 |
| - * autoselection is explicitly disabled with {@link #Tabs(boolean, Tab...)}, or {@link |
73 |
| - * #setAutoselect(boolean)}. Removing the selected tab from the component changes the selection to |
74 |
| - * the next available tab. |
| 69 | + * <p> |
| 70 | + * {@link Tab} components can be added to this component with the {@link #add(Tab...)} method or the |
| 71 | + * {@link Tabs#Tabs(Tab...)} constructor. The Tab components added to it can be selected with the |
| 72 | + * {@link #setSelectedIndex(int)} or {@link #setSelectedTab(Tab)} methods. The first added |
| 73 | + * {@link Tab} component will be automatically selected, firing a {@link SelectedChangeEvent}, |
| 74 | + * unless autoselection is explicitly disabled with {@link Tabs#Tabs(boolean, Tab...)}, or |
| 75 | + * {@link #setAutoselect(boolean)}. Removing the selected tab from the component changes the |
| 76 | + * selection to the next available tab. |
75 | 77 | *
|
76 |
| - * <p><strong>Note:</strong> Adding or removing Tab components via the Element API, eg. {@code |
| 78 | + * <p> |
| 79 | + * <strong>Note:</strong> Adding or removing Tab components via the Element API, eg. {@code |
77 | 80 | * tabs.getElement().insertChild(0, tab.getElement()); }, doesn't update the selected index, so it
|
78 | 81 | * may cause the selected tab to change unexpectedly.
|
79 | 82 | */
|
@@ -160,10 +163,11 @@ public EnhancedTabs(boolean autoselect, Tab... tabs) {
|
160 | 163 | /**
|
161 | 164 | * Adds the given tabs to the component.
|
162 | 165 | *
|
163 |
| - * <p>The first added {@link Tab} component will be automatically selected, unless auto-selection |
164 |
| - * is explicitly disabled with {@link #Tabs(boolean, Tab...)}, or {@link #setAutoselect(boolean)}. |
165 |
| - * If a selection change listener has been added before adding the tabs, it will be notified with |
166 |
| - * the auto-selected tab. |
| 166 | + * <p> |
| 167 | + * The first added {@link Tab} component will be automatically selected, unless auto-selection is |
| 168 | + * explicitly disabled with {@link Tabs#Tabs(boolean, Tab...)}, or |
| 169 | + * {@link #setAutoselect(boolean)}. If a selection change listener has been added before adding |
| 170 | + * the tabs, it will be notified with the auto-selected tab. |
167 | 171 | *
|
168 | 172 | * @param tabs the tabs to enclose
|
169 | 173 | */
|
|
0 commit comments