Class Breadcrumb
- All Implemented Interfaces:
Animatable<Breadcrumb>,CanDrop<Breadcrumb>,Draggable<Breadcrumb>,HandleMouseEvents<Breadcrumb>,Scrollable<Breadcrumb>
Breadcrumb component
The component helps the user to track where they are in the application. The component is only usable, if the pages are opened with a page cache.
The component lists the pages, in the order they were opened (chronologically). Each element is clickable, and the user can navigate to those pages. Pages cached like this, will also store their state, so when the user navigates back to it through the Breadcrumb component it will be the same(for example, the scrollbar, the state and contents of the components will be the same).
Supported events:
AnimationStart
AnimationEnd,
MouseDown,
MouseDown,
MouseLeave,
MouseMove,
MouseOver,
MouseOut,
MouseUp,
Wheel,
Scrollable
Drop,
DragStart,
DragEnd
- Since:
- 4.0
- Author:
- JBStrap
-
Nested Class Summary
Nested Classes -
Field Summary
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition -
Constructor Summary
ConstructorsConstructorDescriptionCreates a breadcrumb componentBreadcrumb(String id) Creates a breadcrumb component with specified ID -
Method Summary
Modifier and TypeMethodDescriptionaddComponent(Component component) DO NOT USE THIS METHODvoidThe operations to be executed after the drawing of the componentOpen a new tab based on breadcrumbopenPage(String pageId, Parameters parameters) Open a new tab based on breadcrumbrefresh()Refreshes the componentbooleanwriteHTML(StringWriter writer) Creates the component's HTML equivalentMethods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponents, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, getComponents, getComponents, getComponentsByClass, getData, getDeniedRoles, getHandlers, getId, getLanguageCode, getName, getParent, getParent, getRegisteredEvents, getStyle, getStyleClasses, getTextAlign, getTextColor, getToolTip, getToolTipPosition, getTypeName, getUI, init, insertComponentAfter, insertComponentBefore, isAccess, isDrawn, isEnabled, isEventBubbling, isVisible, onHide, onHotKeyEventHandler, onShow, openTag, redraw, removeAllComponents, removeAllowedRole, removeAllStyleClasses, removeAttribute, removeComponent, removeComponent, removeComponents, removeDeniedRole, removeHandler, removeStyle, removeStyle, removeStyleClass, removeStyleClasses, replaceComponent, replaceStyleClass, runAfterDraw, runJavaScript, runJavaScript, runJavaScript, runOnHide, runOnShow, say, setAttribute, setBackgroundColor, setBorder, setBorderColor, setData, setDisplayType, setEnabled, setEventBubbling, setFlex, setFloating, setHeight100, setHeight25, setHeight50, setHeight75, setHeightAuto, setLanguage, setMargin, setName, setOverflow, setPadding, setParent, setScrollable, setSelectionType, setShadow, setStyle, setTextAlign, setTextColor, setToolTip, setToolTipPosition, setVisible, setWidth100, setWidth25, setWidth50, setWidth75, setWidthAuto, showNotification, showNotification, showProcessIndicator, toggleStyleClassMethods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBusMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jbstrap.ui.Animatable
addAnimationEndHandler, addAnimationStartHandler, getAnimation, removeAnimation, setAnimationMethods inherited from interface com.jbstrap.ui.CanDrop
addDropEventHandlerMethods inherited from interface com.jbstrap.ui.Draggable
addDragEndEventHandler, addDragStartEventHandler, setDraggableMethods inherited from interface com.jbstrap.ui.HandleMouseEvents
addMouseDownHandler, addMouseEnterHandler, addMouseLeaveHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandlerMethods inherited from interface com.jbstrap.ui.Scrollable
addScrollHandler
-
Constructor Details
-
Breadcrumb
public Breadcrumb()Creates a breadcrumb component -
Breadcrumb
Creates a breadcrumb component with specified ID- Parameters:
id- The component ID. The ID specified here will appear in the HTML tag as an ID attribute. If there are multiple components displayed, that have the same ID, the ID numbers will be numbered, in the order they are displayed. (For example, if the ID is 'COMPONENT' then it will be numbered like this: COMPONENT, COMPONENT_1, COMPONENT_2 etc.)
-
-
Method Details
-
afterDraw
public void afterDraw()Description copied from class:ComponentThe operations to be executed after the drawing of the componentBy default, this is an empty method. It has to be overwritten on a component or page if additional operations have to be executed after the drawing process. One such operation is data retrieval, which shouldn't run in constructors so that the user could see results of an operation or navigation process.
- Overrides:
afterDrawin classComponent<Breadcrumb>
-
refresh
Refreshes the component- Returns:
- The breadcrumb component
-
addComponent
DO NOT USE THIS METHOD
Adds a component to the Breadcrumb. This is an inherited method and is disabled in the Breadcrumb class. No additional components can be added to the Breadcrumb.
- Overrides:
addComponentin classComponent<Breadcrumb>- Parameters:
component- The component to be added- Returns:
- The component
- Throws:
UnsupportedOperationException- Every time this method is called
-
writeHTML
Creates the component's HTML equivalentThis method doesn't need to be used during application development. This method is used when developing a custom component. When creating a custom component, this method needs to be implemented. In the parameter (
StringWriterclass) the component's HTML equivalent must be specified, and the method has to return with a Boolean value. This boolean value determines if the component was drawn. If the user doesn't have access right to the component, or if the component couldn't be drawn, it should return withfalse. Otherwise, it must return withtrue.- Specified by:
writeHTMLin classComponent<Breadcrumb>- Returns:
- If the componentwas drawn,
true, otherwisefalse
-
openPage
Open a new tab based on breadcrumb- Parameters:
pageId- The target page id- Returns:
- The breadcrumb component
- Throws:
NullPointerException- If the specified page id wasnull, or if the page id was not found
-
openPage
Open a new tab based on breadcrumb- Parameters:
pageId- The target page idparameters- The parameters object for the target page- Returns:
- The breadcrumb component
- Throws:
NullPointerException- If the specified page id wasnull, or if the page id was not found
-