Class TimelineItem
- All Implemented Interfaces:
Animatable<TimelineItem>,CanDrop<TimelineItem>,Clickable<TimelineItem>,Draggable<TimelineItem>,HandleMouseEvents<TimelineItem>,Scrollable<TimelineItem>,Touchable<TimelineItem>
Timeline item component
The component cannot be used on its own. It represents the item of a Timeline component. This is where the item's data and settings can be set,
but it cannot be used on its own, it cannot be displayed on its own.
Supported events:
AnimationStart
AnimationEnd,
Click,
DoubleClick,
MouseDown,
MouseDown,
MouseLeave,
MouseMove,
MouseOver,
MouseOut,
MouseUp,
Wheel,
Scrollable
TouchCancel,
TouchEnd,
TouchMove,
TouchStart,
Drop,
DragStart,
DragEnd
- Since:
- 4.0
- Author:
- JBStrap
-
Field Summary
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition -
Constructor Summary
ConstructorsConstructorDescriptionTimelineItem(String id, Date date, Icon icon, String title) Creates a timeline item based on the specified date and title, with the specified iconTimelineItem(String id, Date date, String title) Creates a timeline item based on the specified date and titleTimelineItem(Date date, Icon icon, String title) Creates a timeline item based on the specified date and title, with the specified iconTimelineItem(Date date, String title) Creates a timeline item based on the specified date and title -
Method Summary
Modifier and TypeMethodDescriptionaddComponent(Component<?> component) Adds a component to the timeline itemaddComponents(Component<?>... components) Adds multiple components to the timeline itemGets a list of the components that are on the timeline itemGets the item's icon background color.Gets the item's icon color.removeComponent(Component<?> component) Removes the specified component from the timeline itemremoveComponents(Component<?>... components) Removes the specified components from the timeline itemsetIconBackgroundColor(Color color) Sets the item's icon background color.setIconColor(Color color) Sets the item's icon color.booleanwriteHTML(StringWriter writer) Creates the component's HTML equivalentMethods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addDeniedRole, addHandler, addStyle, addStyleClass, addStyleClasses, afterDraw, clearfix, closeTag, combinateAccess, containsStyle, containsStyleClass, draw, drawSubComponents, error, flattendComponentTree, getAccess, getAccessMode, getAllowedRoles, getAttribute, getAttributes, getBackgroundColor, getBorderColor, getClient, getComponentById, 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, 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.Clickable
addClickHandler, addDoubleClickHandlerMethods 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
addScrollHandlerMethods inherited from interface com.jbstrap.ui.Touchable
addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler
-
Constructor Details
-
TimelineItem
Creates a timeline item based on the specified date and title- Parameters:
date- The item datetitle- Item title. Ifnull, no title will be used- Throws:
NullPointerException- If the date isnull
-
TimelineItem
Creates a timeline item based on the specified date and title- 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.)date- The item datetitle- Item title. Ifnull, no title will be used- Throws:
NullPointerException- If the date isnull
-
TimelineItem
Creates a timeline item based on the specified date and title, with the specified icon- Parameters:
date- The item dateicon- The item's icon. The usable icons can be found in theIconenum. Ifnull, no icon will be usedtitle- Item title. Ifnull, no title will be used- Throws:
NullPointerException- If the date isnull
-
TimelineItem
Creates a timeline item based on the specified date and title, with the specified icon- 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.)date- The item dateicon- The item's icon. The usable icons can be found in theIconenum. Ifnull, no icon will be usedtitle- Item title. Ifnull, no title will be used- Throws:
NullPointerException- If the date isnull
-
-
Method Details
-
setIconBackgroundColor
Sets the item's icon background color.- Parameters:
color- The icon background color- Returns:
- A time line item
-
getIconColor
Gets the item's icon color.- Returns:
- The icon color, in the format it was specified in, or
null, if none was set
-
setIconColor
Sets the item's icon color.- Parameters:
color- The icon color- Returns:
- A time line item
-
getIconBackgroundColor
Gets the item's icon background color.- Returns:
- The background color, in the format it was specified in, or
null, if none was set
-
addComponent
Adds a component to the timeline item- Overrides:
addComponentin classComponent<TimelineItem>- Parameters:
component- The component instance to be added to the timeline item- Returns:
- The timeline item
-
addComponents
Adds multiple components to the timeline item- Overrides:
addComponentsin classComponent<TimelineItem>- Parameters:
components- The component instances to be added to the timeline item- Returns:
- The timeline item
-
removeComponent
Removes the specified component from the timeline item- Overrides:
removeComponentin classComponent<TimelineItem>- Parameters:
component- The component instance to be removed from the timeline item- Returns:
- The timeline item
-
removeComponents
Removes the specified components from the timeline item- Overrides:
removeComponentsin classComponent<TimelineItem>- Parameters:
components- The component instances to be removed from the timeline item- Returns:
- The timeline item
-
getComponents
Gets a list of the components that are on the timeline item- Overrides:
getComponentsin classComponent<TimelineItem>- Returns:
- A list containing the timeline item's components. If there are none, the list will be empty
-
writeHTML
Description copied from class:ComponentCreates 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<TimelineItem>- Returns:
- If the componentwas drawn,
true, otherwisefalse
-