Class WNavigationBar
public class WNavigationBar extends WTemplate
Note: WNavigationBar
is currently only styled in the Bootstrap themes.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WTemplate
WTemplate.Function, WTemplate.Functions, WTemplate.WidgetIdMode
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WObject
WObject.FormData
-
Field Summary
Fields inherited from class eu.webtoolkit.jwt.WInteractWidget
dragTouchEndSlot_, dragTouchSlot_
-
Constructor Summary
Constructors Constructor Description WNavigationBar()
Constructor.WNavigationBar(WContainerWidget parent)
Constructor. -
Method Summary
Modifier and Type Method Description void
addFormField(WWidget widget)
Adds a form field to the navigation bar.void
addFormField(WWidget widget, AlignmentFlag alignment)
Adds a form field to the navigation bar.void
addMenu(WMenu menu)
Adds a menu to the navigation bar.void
addMenu(WMenu menu, AlignmentFlag alignment)
Adds a menu to the navigation bar.void
addSearch(WLineEdit field)
Adds a search widget to the navigation bar.void
addSearch(WLineEdit field, AlignmentFlag alignment)
Adds a search widget to the navigation bar.void
addWidget(WWidget widget)
Adds a widget to the navigation bar.void
addWidget(WWidget widget, AlignmentFlag alignment)
Adds a widget to the navigation bar.protected WInteractWidget
getCreateCollapseButton()
protected WInteractWidget
getCreateExpandButton()
void
setResponsive(boolean responsive)
Sets whether the navigation bar will respond to screen size.void
setTitle(java.lang.CharSequence title)
Sets a title.void
setTitle(java.lang.CharSequence title, WLink link)
Sets a title.Methods inherited from class eu.webtoolkit.jwt.WTemplate
addFunction, applyArguments, bindEmpty, bindInt, bindString, bindString, bindWidget, clear, conditionValue, enableAjax, format, format, format, format, getConditionsSet, getErrorText, getTemplateText, getWidgetIdMode, getWidgets, handleUnresolvedVariable, hasInternalPathEncoding, isEncodeTemplateText, refresh, remove, renderTemplate, renderTemplateText, reset, resolveFunction, resolveString, resolveWidget, setCondition, setEncodeTemplateText, setInternalPathEncoding, setTemplateText, setTemplateText, setWidgetIdMode, takeWidget, varName
Methods inherited from class eu.webtoolkit.jwt.WInteractWidget
clicked, doubleClicked, enterPressed, escapePressed, gestureChanged, gestureEnded, gestureStarted, getMouseOverDelay, isEnabled, keyPressed, keyWentDown, keyWentUp, load, mouseDragged, mouseMoved, mouseWentDown, mouseWentOut, mouseWentOver, mouseWentUp, mouseWheel, propagateSetEnabled, setDraggable, setDraggable, setDraggable, setDraggable, setMouseOverDelay, setPopup, touchEnded, touchMoved, touchStarted, unsetDraggable
Methods inherited from class eu.webtoolkit.jwt.WWebWidget
addStyleClass, blurred, callJavaScriptMember, childrenChanged, createDomElement, doJavaScript, escapeText, escapeText, escapeText, escapeText, find, findById, focussed, getAttributeValue, getBaseZIndex, getChildren, getClearSides, getDecorationStyle, getDomChanges, getFloatSide, getHeight, getHtmlTagName, getId, getJavaScriptMember, getLineHeight, getMargin, getMaximumHeight, getMaximumWidth, getMinimumHeight, getMinimumWidth, getOffset, getPositionScheme, getScrollVisibilityMargin, getStyleClass, getTabIndex, getToolTip, getVerticalAlignment, getVerticalAlignmentLength, getWidth, hasFocus, hasStyleClass, isCanReceiveFocus, isDisabled, isHidden, isHiddenKeepsGeometry, isInline, isLoaded, isPopup, isRendered, isScrollVisibilityEnabled, isScrollVisible, isSetFirstFocus, isThemeStyleEnabled, isVisible, jsStringLiteral, jsStringLiteral, parentResized, parentResized, propagateSetVisible, removeScript, removeStyleClass, render, resize, scrollVisibilityChanged, setAttributeValue, setBaseZIndex, setCanReceiveFocus, setClearSides, setDecorationStyle, setDeferredToolTip, setDisabled, setFloatSide, setFocus, setHidden, setHiddenKeepsGeometry, setHtmlTagName, setId, setInline, setJavaScriptMember, setLineHeight, setLoadLaterWhenInvisible, setMargin, setMaximumSize, setMinimumSize, setOffsets, setPositionScheme, setScrollVisibilityEnabled, setScrollVisibilityMargin, setSelectable, setStyleClass, setTabIndex, setThemeStyleEnabled, setToolTip, setVerticalAlignment, updateSignalConnection, voidEventSignal
Methods inherited from class eu.webtoolkit.jwt.WWidget
acceptDrops, acceptDrops, addCssRule, addCssRule, addJSignal, addStyleClass, animateHide, animateShow, boxBorder, boxPadding, createJavaScript, disable, dropEvent, enable, getDropTouch, getJsRef, getParent, hide, htmlText, isExposed, isLayoutSizeAware, layoutSizeChanged, needsRerender, positionAt, positionAt, removeChild, removeStyleClass, render, resize, scheduleRender, scheduleRender, scheduleRender, setClearSides, setDeferredToolTip, setFocus, setHeight, setHidden, setLayoutSizeAware, setMargin, setMargin, setMargin, setMargin, setMargin, setObjectName, setOffsets, setOffsets, setOffsets, setOffsets, setOffsets, setToolTip, setVerticalAlignment, setWidth, show, stopAcceptDrops, toggleStyleClass, toggleStyleClass, tr
Methods inherited from class eu.webtoolkit.jwt.WObject
addChild, getObjectName, setFormData
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Constructor Details
-
WNavigationBar
Constructor. -
WNavigationBar
public WNavigationBar()Constructor.
-
-
Method Details
-
setTitle
Sets a title.The title may optionally link to a 'homepage'.
-
setTitle
public final void setTitle(java.lang.CharSequence title)Sets a title. -
setResponsive
public void setResponsive(boolean responsive)Sets whether the navigation bar will respond to screen size.For screens that are less wide, the navigation bar can be rendered different (more compact and allowing for vertical menu layouts).
-
addMenu
Adds a menu to the navigation bar.Typically, a navigation bar will contain at least one menu which implements the top-level navigation options allowed by the navigation bar.
The menu may be aligned to the left or to the right of the navigation bar.
-
addMenu
Adds a menu to the navigation bar. -
addFormField
Adds a form field to the navigation bar.In some cases, one may want to add a few form fields to the navigation bar (e.g. for a compact login option).
-
addFormField
Adds a form field to the navigation bar. -
addSearch
Adds a search widget to the navigation bar.This is not so different from
addFormField()
, except that the form field may be styled differently to indicate a search function. -
addSearch
Adds a search widget to the navigation bar. -
addWidget
Adds a widget to the navigation bar.Any other widget may be added to the navigation bar, although they may require special CSS style to blend well with the navigation bar style.
-
addWidget
Adds a widget to the navigation bar. -
getCreateCollapseButton
-
getCreateExpandButton
-