public class VerticalNavigation extends Object implements Attachable
The vertical navigation consists of two parts:
The vertical navigation itself is not a child but a sibling of the root container. It gets attached / detached to
the DOM by calling attach() and detach().
There are two groups of methods:
add*(): Use these methods to add panes before the panes were added to the DOMinsert*(): Use these methods to add panes after the panes were added to the DOM| Constructor and Description |
|---|
VerticalNavigation() |
| Modifier and Type | Method and Description |
|---|---|
VerticalNavigation |
addPrimary(String id,
String text)
Adds a primary navigation item which acts a container for secondary navigation items.
|
VerticalNavigation |
addPrimary(String id,
String text,
String iconClass) |
VerticalNavigation |
addPrimary(String id,
String text,
String iconClass,
elemental2.dom.HTMLElement element) |
VerticalNavigation |
addPrimary(String id,
String text,
String iconClass,
org.jboss.gwt.elemento.core.IsElement element)
Adds a primary navigation item to the navigation which controls the visibility of the specified element.
|
VerticalNavigation |
addSecondary(String primaryId,
String id,
String text,
elemental2.dom.HTMLElement element)
Adds a secondary navigation item to the navigation which controls the visibility of the specified element.
|
void |
attach() |
void |
detach() |
void |
insertPrimary(String id,
String beforeId,
String text,
String iconClass) |
void |
insertPrimary(String id,
String beforeId,
String text,
String iconClass,
elemental2.dom.HTMLElement element) |
void |
insertPrimary(String id,
String beforeId,
String text,
String iconClass,
org.jboss.gwt.elemento.core.IsElement element)
Inserts a primary navigation item before the specified item.
|
void |
insertSecondary(String primaryId,
String id,
String beforeId,
String text,
elemental2.dom.HTMLElement element)
Inserts a secondary navigation item before the specified item.
|
void |
onShow(String id,
org.jboss.hal.spi.Callback callback) |
org.jboss.gwt.elemento.core.HasElements |
panes()
Returns the elements which were registered using the
add() methods. |
void |
setVisible(String id,
boolean visible)
Controls the visibility of the specified item.
|
void |
show(String id) |
void |
updateBadge(String id,
int count) |
public void attach()
attach in interface Attachablepublic void detach()
detach in interface Attachablepublic VerticalNavigation addPrimary(String id, String text)
public VerticalNavigation addPrimary(String id, String text, String iconClass)
public VerticalNavigation addPrimary(String id, String text, String iconClass, org.jboss.gwt.elemento.core.IsElement element)
Unlike similar UI elements such as Tabs the element is not added as a child of this
navigation. The element should be rather a child of the root container.
Please note
This method does not add the item to the DOM. This has to be done manually using something
like
HTMLElement root = row()
.add(column()
.addAll(navigation.panes()))
.asElement();
public VerticalNavigation addPrimary(String id, String text, String iconClass, elemental2.dom.HTMLElement element)
public void insertPrimary(String id, String beforeId, String text, String iconClass, org.jboss.gwt.elemento.core.IsElement element)
beforeId is null, the
item is inserted as last item. If there's not item with id beforeId, an error message is logged and
no item is inserted.
You must call this method after at least one item was added and before the navigation is attached.
Please note
Unlike addPrimary(String, String, String, IsElement), this method does add the item
to the DOM.
public void insertPrimary(String id, String beforeId, String text, String iconClass, elemental2.dom.HTMLElement element)
public VerticalNavigation addSecondary(String primaryId, String id, String text, elemental2.dom.HTMLElement element)
Unlike similar UI elements such as Tabs the element is not added as a child of this
navigation. The element should be rather a child of the root container.
Please note
This method does not add the item to the DOM. This has to be done manually using something
like
HTMLElement root = row()
.add(column()
.addAll(navigation.panes()))
.asElement();
public void insertSecondary(String primaryId, String id, String beforeId, String text, elemental2.dom.HTMLElement element)
beforeId is null,
the item is inserted as last item. If there's not item with id beforeId, an error message is logged
and no item is inserted.
You must call this method after at least one item was added and before the navigation is attached.
Please note
Unlike addSecondary(String, String, String, HTMLElement), this method does add the
item to the DOM.
public void show(String id)
public void setVisible(String id, boolean visible)
public void onShow(String id, org.jboss.hal.spi.Callback callback)
public void updateBadge(String id, int count)
public org.jboss.gwt.elemento.core.HasElements panes()
add() methods. Use this method to add those
elements to another container.Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.