Class Timeline
- All Implemented Interfaces:
Animatable<Timeline>
,CanDrop<Timeline>
,Clickable<Timeline>
,Draggable<Timeline>
,Fetchable<Timeline>
,HandleMouseEvents<Timeline>
,BasedOnDataDescriptor<Timeline>
,Filterable<Timeline>
,Scrollable<Timeline>
,Touchable<Timeline>
Timeline component
The component displays a timeline. Events and other information can be displayed in a chronological order for the user.
The component can read data from the database, and it can display them, using either the default or custom display method. If you need to create a custom timeline item builder class,
it must implement the TimelineItemCreator
interface, and the class must be specified for the component, by using the setItemCreator(TimelineItemCreator)
method. The custom builder class implementation can use any components, and these can be displayed on the individual items, so the items can have their own logic and custom operations.
The component supports multiple display types, that can be set and changed easily. These display types are contained in the Timeline.TimelineType
enum
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
- See Also:
-
Nested Class Summary
-
Field Summary
Fields inherited from class com.jbstrap.ui.Component
animation, attributes, backgroundColor, borderColor, color, defaultHotKeyHandler, handlers, hotKeys, styleClasses, textAlign, toolTip, toolTipPosition
-
Constructor Summary
ConstructorDescriptionTimeline()
Creates an empty, FLAT timeline componentTimeline
(DataDescriptor dataDescriptor, Timeline.TimelineType type) Creates a timeline component with the specified DataDescriptor and display typeTimeline
(DataDescriptor dataDescriptor, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and display typeTimeline
(DataDescriptor dataDescriptor, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor and item creator.Timeline
(DataDescriptor dataDescriptor, String language, Timeline.TimelineType type) Creates a timeline component with the specified DataDescriptor, language and display typeTimeline
(DataDescriptor dataDescriptor, String language, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, language, item creator and display typeTimeline
(DataDescriptor dataDescriptor, String language, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and language.Creates an empty timeline component with the specified display typeCreates an empty, FLAT timeline component, with the specified languageTimeline
(String id, DataDescriptor dataDescriptor, Timeline.TimelineType type) Creates a timeline component with the specified DataDescriptor and display typeTimeline
(String id, DataDescriptor dataDescriptor, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and display typeTimeline
(String id, DataDescriptor dataDescriptor, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor and item creator.Timeline
(String id, DataDescriptor dataDescriptor, String language, Timeline.TimelineType type) Creates a timeline component with the specified DataDescriptor, language and display typeTimeline
(String id, DataDescriptor dataDescriptor, String language, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, language, item creator and display typeTimeline
(String id, DataDescriptor dataDescriptor, String language, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and language.Timeline
(String language, Timeline.TimelineType type) Creates an empty timeline component with the specified display type and languageCreates an empty, FLAT timeline component, with the specified languageTimeline
(String id, String language, Timeline.TimelineType type) Creates an empty timeline component with the specified display type and language -
Method Summary
Modifier and TypeMethodDescriptionfinal Timeline
clear()
Clears every item from the timelineThis method implements actual data retrieval.final Timeline
Fetches data from the database.protected String
formatDate
(Date date) protected String
formatTime
(Date date) Gets the criteria that is used when querying data.Gets the component's DataDescriptorfinal String
Gets the name of the DataDescriptor column, that contains the timeline item's datafinal String
Gets the component's date formatfinal Criteria
Gets the default criteria, used during the data fetchfinal String
Gets the name of the DataDescriptor column, that contains the timeline item's descriptionfinal Criteria
Gets the (simple) filter criteria used when fetching datafinal String
Gets the name of the DataDescriptor column, that contains the timeline item's icon background colorfinal String
Gets the name of the DataDescriptor column, that contains the timeline item's icon nameSets the component's item creatorGets the component's ordering type.final String
Gets the component's time formatfinal String
Gets the name of the DataDescriptor column, that contains the timeline item's titlegetType()
Gets the timeline component's display typeboolean
Determines if the auto fetch is enabledvoid
onShow()
The operations to be executed after the component is displayed on the clientsetAutoFetchData
(boolean autoFetch) Sets if the auto data fetch is enabled.setCustomFetch
(FetchEvent fetchEvent) Sets a custom query.final Timeline
setDataDescriptor
(DataDescriptor dataDescriptor) Sets the component's DataDescriptorfinal Timeline
setDataDescriptor
(DataDescriptor dataDescriptor, TimelineItemCreator itemCreator) Sets the component's DataDescriptor and item creator classfinal Timeline
setDateColumnName
(String dateColumnName) Sets the name of the DataDescriptor column, that contains the timeline item's datasetDateFormat
(String dateFormat) Sets the date format used by the component.final Timeline
setDefaultCriteria
(Criteria defaultCriteria) Sets the default criteria, used during the data fetchfinal Timeline
setDetailColumnName
(String detailColumnName) Sets the name of the DataDescriptor column, that contains the timeline item's descriptionfinal Timeline
setFilterCriteria
(Criteria criteria) Sets the (simple) filter criteria used when fetching datafinal Timeline
setIconBackgroundColumnName
(String iconBackgroundColumnName) Sets the name of the DataDescriptor column, that contains the timeline item's icon background colorfinal Timeline
setIconColumnName
(String iconColumnName) Sets the name of the DataDescriptor column, that contains the timeline item's icon namefinal Timeline
setItemCreator
(TimelineItemCreator itemCreator) Sets the component's item creator classsetOrderType
(OrderType orderType) Sets the component's ordering type.setTimeFormat
(String timeFormat) Sets the time format used in the component.final Timeline
setTitleColumnName
(String titleColumnName) Sets the name of the DataDescriptor column, that contains the timeline item's titlefinal Timeline
setType
(Timeline.TimelineType type) Sets the display type of the timeline componentboolean
writeHTML
(StringWriter writer) Creates the component's HTML equivalentMethods inherited from class com.jbstrap.ui.Component
_hide, _setAttribute, addAllowedRole, addComponent, addComponent, addComponents, 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, 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, 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, toggleStyleClass
Methods inherited from class com.jbstrap.core.messagebus.MessageBus
closeMessageBus, messageBusOpened, openMessageBus, renewSubscription, sendMessageToMessageBus, subscribeMessageBus, unsubscribeAllListeners, unsubscribeMessageBus
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.jbstrap.ui.Animatable
addAnimationEndHandler, addAnimationStartHandler, getAnimation, removeAnimation, setAnimation
Methods inherited from interface com.jbstrap.ui.CanDrop
addDropEventHandler
Methods inherited from interface com.jbstrap.ui.Clickable
addClickHandler, addDoubleClickHandler
Methods inherited from interface com.jbstrap.ui.Draggable
addDragEndEventHandler, addDragStartEventHandler, setDraggable
Methods inherited from interface com.jbstrap.ui.Fetchable
addFetchDoneHandler, fireFetchDoneEvent
Methods inherited from interface com.jbstrap.ui.HandleMouseEvents
addMouseDownHandler, addMouseEnterHandler, addMouseLeaveHandler, addMouseMoveHandler, addMouseOutHandler, addMouseOverHandler, addMouseUpHandler, addMouseWheelHandler
Methods inherited from interface com.jbstrap.ui.Scrollable
addScrollHandler
Methods inherited from interface com.jbstrap.ui.Touchable
addTouchCancelHandler, addTouchEndHandler, addTouchMoveHandler, addTouchStartHandler
-
Constructor Details
-
Timeline
public Timeline()Creates an empty, FLAT timeline component -
Timeline
Creates an empty, FLAT timeline component, with the specified language- Parameters:
language
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.
-
Timeline
Creates an empty, FLAT timeline component, with the specified language- 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.)language
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.
-
Timeline
Creates an empty timeline component with the specified display type- Parameters:
type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
Creates an empty timeline component with the specified display type and language- Parameters:
language
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
Creates an empty timeline component with the specified display type and language- 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.)language
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
Creates a timeline component with the specified DataDescriptor and item creator.- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromitemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used- See Also:
-
Timeline
Creates a timeline component with the specified DataDescriptor and item creator.- 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.)dataDescriptor
- The DataDescriptor instance, from which the component can read data fromitemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used- See Also:
-
Timeline
Creates a timeline component with the specified DataDescriptor, item creator and language.- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromlanguage
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.itemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used- See Also:
-
Timeline
public Timeline(String id, DataDescriptor dataDescriptor, String language, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and language.- 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.)dataDescriptor
- The DataDescriptor instance, from which the component can read data fromlanguage
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.itemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used- See Also:
-
Timeline
Creates a timeline component with the specified DataDescriptor and display type- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromtype
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
Creates a timeline component with the specified DataDescriptor and display type- 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.)dataDescriptor
- The DataDescriptor instance, from which the component can read data fromtype
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
Creates a timeline component with the specified DataDescriptor, language and display type- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromlanguage
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
public Timeline(String id, DataDescriptor dataDescriptor, String language, Timeline.TimelineType type) Creates a timeline component with the specified DataDescriptor, language and display type- 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.)dataDescriptor
- The DataDescriptor instance, from which the component can read data fromlanguage
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used
-
Timeline
public Timeline(DataDescriptor dataDescriptor, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and display type- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromtype
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be useditemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used
-
Timeline
public Timeline(String id, DataDescriptor dataDescriptor, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, item creator and display type- 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.)dataDescriptor
- The DataDescriptor instance, from which the component can read data fromtype
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be useditemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used
-
Timeline
public Timeline(DataDescriptor dataDescriptor, String language, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, language, item creator and display type- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromlanguage
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be useditemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used
-
Timeline
public Timeline(String id, DataDescriptor dataDescriptor, String language, Timeline.TimelineType type, TimelineItemCreator itemCreator) Creates a timeline component with the specified DataDescriptor, language, item creator and display type- 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.)dataDescriptor
- The DataDescriptor instance, from which the component can read data fromlanguage
- The language code according to which the component is created. If not provided or the entered value is null, the component is created using the framework’s default language. The default language of the framework is set via the JBStrap parameterJBStrapParamType.DEFAULT_LANGUAGE
.type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be useditemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used
-
-
Method Details
-
setType
Sets the display type of the timeline component- Parameters:
type
- The display type to be used. The display types can be found in theTimeline.TimelineType
enum. Ifnull
, the default type,Timeline.TimelineType.FLAT
will be used- Returns:
- The timeline component
-
getType
Gets the timeline component's display type- Returns:
- The display type
-
setDateFormat
Sets the date format used by the component. By default, the component uses the framework's default date format. The framework's default date format can be set in theJBStrapParamType.DATE_FORMAT
JBStrap parameter- Parameters:
dateFormat
- The date format to be used by the component. Ifnull
, the component will not display dates- Returns:
- The timeline component
- Throws:
IllegalArgumentException
- If the specified format is an invalid date format
-
getDateFormat
Gets the component's date format- Returns:
- The used date format or
null
, if the component does not display dates
-
formatDate
- Parameters:
date
- The date to be formatted- Returns:
- The specified date, formatted, or an empty string, if the date specified was
null
, or if the date format set wasnull
-
setTimeFormat
Sets the time format used in the component. By default, the component uses the framework's default date format. The framework's default date format can be set in theJBStrapParamType.TIME_FORMAT
JBStrap parameter- Parameters:
timeFormat
- The time format. Ifnull
, no time will be displayed in the component- Returns:
- The timeline component
- Throws:
IllegalArgumentException
- Occurs if the the specified format is not valid
-
getTimeFormat
Gets the component's time format- Returns:
- The used time format or
null
, if the component does not display time
-
formatTime
- Parameters:
date
- The time to be formatted- Returns:
- The specified time, formatted, or an empty string, if the time specified was
null
, or if the time format set wasnull
-
getCriteria
Gets the criteria that is used when querying data. The returned filter criteria contains the default and simple filter criteria, with an "AND" connection.- Specified by:
getCriteria
in interfaceFilterable<Timeline>
- Returns:
- The used filter criteria or
null
if no criteria is used
-
setDefaultCriteria
Sets the default criteria, used during the data fetch- Parameters:
defaultCriteria
- The criteria to be used. Ifnull
, no default criteria will be used (but the other specified criteria will be used)- Returns:
- The timeline component
-
getDefaultCriteria
Gets the default criteria, used during the data fetch- Returns:
- The default criteria or
null
, if not specified
-
setFilterCriteria
Sets the (simple) filter criteria used when fetching data- Specified by:
setFilterCriteria
in interfaceFilterable<Timeline>
- Parameters:
criteria
- The filter criteria to be applied. Ifnull
, no criteria will be used, but the set default criteria will still apply- Returns:
- The timeline component
-
getFilterCriteria
Gets the (simple) filter criteria used when fetching data- Returns:
- The filter criteria, or
null
, if it wasn't set
-
setOrderType
Sets the component's ordering type. By default, the component displays items in a chronological order. The last item will be at the bottom of the component.- Parameters:
orderType
- The component's order type. The usable types are found in theOrderType
enum- Returns:
- The timeline component
-
getOrderType
Gets the component's ordering type.- Returns:
- The applied order type
-
setDataDescriptor
public final Timeline setDataDescriptor(DataDescriptor dataDescriptor, TimelineItemCreator itemCreator) Sets the component's DataDescriptor and item creator class- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data fromitemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used- Returns:
- The timeline component
-
setDataDescriptor
Sets the component's DataDescriptor- Specified by:
setDataDescriptor
in interfaceBasedOnDataDescriptor<Timeline>
- Parameters:
dataDescriptor
- The DataDescriptor instance, from which the component can read data from- Returns:
- The timeline component
-
setItemCreator
Sets the component's item creator class- Parameters:
itemCreator
- The timeline item creator class implementation. Ifnull
, the default creator class will be used- Returns:
- The timeline component
-
getDataDescriptor
Gets the component's DataDescriptor- Specified by:
getDataDescriptor
in interfaceBasedOnDataDescriptor<Timeline>
- Returns:
- The DataDescriptor instance, from which the component can read data from or
null
, if no DataDescriptor was set
-
getItemCreator
Sets the component's item creator- Returns:
- The instance of the timeline creator class
-
getDateColumnName
Gets the name of the DataDescriptor column, that contains the timeline item's data- Returns:
- The name of the DataDescriptor column, that contains the timeline item's data or
null
, if not set
-
setDateColumnName
Sets the name of the DataDescriptor column, that contains the timeline item's data- Parameters:
dateColumnName
- The name of the DataDescriptor column, that contains the timeline item's data- Returns:
- The timeline component
-
getTitleColumnName
Gets the name of the DataDescriptor column, that contains the timeline item's title- Returns:
- The name of the DataDescriptor column, that contains the timeline item's title or
null
, if not set
-
setTitleColumnName
Sets the name of the DataDescriptor column, that contains the timeline item's title- Parameters:
titleColumnName
- The name of the column that contains the timeline item's title- Returns:
- The timeline component
-
getDetailColumnName
Gets the name of the DataDescriptor column, that contains the timeline item's description- Returns:
- The name of the DataDescriptor column, that contains the timeline item's description or
null
if not set
-
setDetailColumnName
Sets the name of the DataDescriptor column, that contains the timeline item's description- Parameters:
detailColumnName
- The name of the DataDescriptor column, that contains the timeline item's description- Returns:
- The timeline component
-
getIconColumnName
Gets the name of the DataDescriptor column, that contains the timeline item's icon name- Returns:
- The name of the DataDescriptor column, that contains the timeline item's icon name
-
setIconColumnName
Sets the name of the DataDescriptor column, that contains the timeline item's icon name- Parameters:
iconColumnName
- The name of the DataDescriptor column, that contains the timeline item's icon name- Returns:
- The timeline component
-
getIconBackgroundColumnName
Gets the name of the DataDescriptor column, that contains the timeline item's icon background color- Returns:
- The name of the DataDescriptor column, that contains the timeline item's icon background color
-
setIconBackgroundColumnName
Sets the name of the DataDescriptor column, that contains the timeline item's icon background color- Parameters:
iconBackgroundColumnName
- The name of the DataDescriptor column, that contains the timeline item's icon background color- Returns:
- The timeline component
-
clear
Clears every item from the timeline- Returns:
- The timeline component
-
fetchData
Fetches data from the database. Applies the default and simple criteria, with an "AND" connection- Specified by:
fetchData
in interfaceFetchable<Timeline>
- Specified by:
fetchData
in interfaceFilterable<Timeline>
- Returns:
- The component
- Throws:
UnsupportedOperationException
- If no DataDescriptor is set, or if no date column name is specified
-
setAutoFetchData
Sets if the auto data fetch is enabled. If enabled, the data is fetched automatically after the component is displayed. By default, this functionality is enabled.- Specified by:
setAutoFetchData
in interfaceFetchable<Timeline>
- Specified by:
setAutoFetchData
in interfaceFilterable<Timeline>
- Parameters:
autoFetch
- Iftrue
, the data fetch is automatic, otherwise not. Iffalse
, the fetch must be handled by the program logic, by calling thefetchData()
method- Returns:
- The component
-
isAutoFetchData
public boolean isAutoFetchData()Determines if the auto fetch is enabled- Specified by:
isAutoFetchData
in interfaceFetchable<Timeline>
- Specified by:
isAutoFetchData
in interfaceFilterable<Timeline>
- Returns:
- If
true
, the automatic data fetch is enabled, otherwise not.
-
onShow
public void onShow()Description copied from class:Component
The operations to be executed after the component is displayed on the clientBy 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 component is displayed. This method is nearly identical to the afterDraw() method, they differ in when they are executed. This method runs after the component is displayed on the client. Meaning that it is executed even if the component isn't redrawn, but only set to be visible after being hidden.
-
writeHTML
Description copied from class:Component
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 (
StringWriter
class) 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
. -
setCustomFetch
Sets a custom query. When calling the fetchData method, the specifiedFetchEvent
implementation is called, then callback methods are run on records returned by the
onFetch
method.- Parameters:
fetchEvent
- Custom query implementation
-
fetch
public List<Record> fetch(int startRow, int endRow, Criteria criteria, List<Order> orders, Client client) throws FindException, DataAccessException Description copied from interface:Fetchable
This method implements actual data retrieval. TheFetchable.fetchData()
function runs callback methods on the returned records.- Specified by:
fetch
in interfaceFetchable<Timeline>
- Parameters:
startRow
- The first row of the query that appears in the returned listendRow
- The last row of the query that appears in the returned listcriteria
- The criteria used during the query Ifnull
, no criteria will be used, every record is queried.orders
- The orderings that will be applied to the query results. Ifnull
, the data will not be ordered.client
- The client that started the query. Ifnull
, the query will happen without checking for access rights.- Returns:
- The list of records that meet the specified filter criteria.
- Throws:
FindException
- Occurs if an error was encountered during the queryDataAccessException
- Occurs if the user in the specified client has no access to read the data
-