GlideTimelineItem - Global
-
- UpdatedJan 30, 2025
- 6 minutes to read
- Yokohama
- API reference
The GlideTimelineItem API extends the abstract ScheduleItem class to define additional properties that are specific to the time line.
A time line item is essentially any item that displays in a singular row across the time line. A GlideTimelineItem has zero or more associated spans (TimelineSpan objects).
GlideTimelineItem - GlideTimelineItem(String tableName)
Create a "dummy" GlideTimelineItem object.
This is useful for creating rows that do not allow any YMoving into; however, contain nested children (e.g. The top-level "Users" row in the Group Resource Timeline). The sys_id needs to be unique for DOM level functions to parse correctly. By default this object will not be "droppable" because a table name was not specified.
Name | Type | Description |
---|---|---|
tableName | String | The name of the table associated with current object. |
Type | Description |
---|---|
void |
GlideTimelineItem - GlideTimelineItem(String tableName, String sys_id)
Constructor that sets the required table and sys_id properties.
The rest of this object's properties should be set by the caller. By default, this object instance is "droppable" since a table name is specified.
Name | Type | Description |
---|---|---|
tableName | String | The name of the table associated with current object. |
sys_id | String | The sys ID for the object. |
Type | Description |
---|---|
void |
GlideTimelineItem - createTimelineSpan(String tableName)
Creates a new TimelineSpan object associated with the current instance object.
If no other TimelineSpan objects exist, the newly created object will share the same sys_id as current instance object. Otherwise, a randomly generated GUID will be used.
Name | Type | Description |
---|---|---|
tableName | String | The name of the table associated with current object. |
Type | Description |
---|---|
Object | The newly-created span object instance. |
GlideTimelineItem - createTimelineSpan(String tableName, String sys_id)
Creates a new TimelineSpan object associated with the current instance object using the specified table and sys_id.
Name | Type | Description |
---|---|---|
tableName | String | Name of the table associated with current object |
sys_id | String | Sys_id for the object. |
Type | Description |
---|---|
Object | Newly-created span object instance. |
Example
The following example shows how to use createTimelineSpan() to create a new TimelineSpan object.
GlideTimelineItem - getImage( )
Returns a string specifying the name of the image file associated with the current GlideTimelineItem.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The name of the image file associated with the current GlideTimelineItem. If no image is associated with the current item, an empty string ("") is returned. |
GlideTimelineItem - getIsDroppable( )
Indicates whether or not the current instance object should be allowed as a "drop zone" when moving timeline elements vertically.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
Boolean | True if droppable; false otherwise. |
GlideTimelineItem - getLeftLabelText( )
Returns the text to be displayed in the left pane (if enabled).
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The value of the text to be displayed in the left pane. |
GlideTimelineItem - getParent( )
Returns the unique sysId of the current GlideTimelineItem's parent object.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
String | The unique sysId of the current GlideTimelineItem's parent object. If the parent does not exist, this will return an empty string (""). |
GlideTimelineItem - getTimelineSpans( )
Returns all the TimelineSpan objects associated with the current instance in an ArrayList.
Name | Type | Description |
---|---|---|
none |
Type | Description |
---|---|
Object Array | The list of TimelineSpan objects associated with the current instance. |
GlideTimelineItem - isTextBold( )
Indicates if the left pane text is set to display using a bold style.
Name | Type | Description |
---|---|---|
None |
Type | Description |
---|---|
Boolean | Flag that indicates whether the text should be bold. Possible values:
|
Example
The following example checks if an incident's state is "New" and sets the item text to bold.
GlideTimelineItem - setImage(String strImageName)
Sets the name of the image file (including it's path) to use as the icon for the item in the left pane.
Name | Type | Description |
---|---|---|
strImageName | String | Name of the image, including its path. |
Type | Description |
---|---|
void |
Example
The following example shows how to use setImage() to define the image that should appear for the icon in the left pane.
GlideTimelineItem - setIsDraggable(Boolean b)
Sets whether or not the current instance object can be clicked and dragged into another GlideTimelineItem.
Name | Type | Description |
---|---|---|
b | Boolean | Flag that indicates whether the item can be moved using click and drag.
Valid values:
|
Type | Description |
---|---|
void |
Example
The following example shows how to use setIsDraggable() to enable the current object to be dragged into another GlideTimelineItem.
GlideTimelineItem - setLeftLabelText(String strText)
Specifies the text to display in the left pane for this item.
Name | Type | Description |
---|---|---|
strText | String | Text to display in the left pane for this item. |
Type | Description |
---|---|
void |
Example
The following example shows how to use setLeftLabelText() to set the text in the left pane.
GlideTimelineItem - setParent(String sysId)
Sets the parent of the current GlideTimelineItem.
Name | Type | Description |
---|---|---|
sysId | String | The sysID of the GlideTimelineItem that should become the parent of the current GlideTimelineItem. |
Type | Description |
---|---|
void |
GlideTimelineItem - setTextBold(Boolean b)
Specifies whether or not to bold the text style of the item in the left pane.
Name | Type | Description |
---|---|---|
b | Boolean | Flag that indicates whether the text in left pane should be bold. Valid
values:
|
Type | Description |
---|---|
void |
Example
The following example shows how to set the text in the left pane to bold.
On this page
- GlideTimelineItem - GlideTimelineItem(String tableName)
- GlideTimelineItem - GlideTimelineItem(String tableName, String sys_id)
- GlideTimelineItem - createTimelineSpan(String tableName)
- GlideTimelineItem - createTimelineSpan(String tableName, String sys_id)
- GlideTimelineItem - getImage( )
- GlideTimelineItem - getIsDroppable( )
- GlideTimelineItem - getLeftLabelText( )
- GlideTimelineItem - getParent( )
- GlideTimelineItem - getTimelineSpans( )
- GlideTimelineItem - isTextBold( )
- GlideTimelineItem - setImage(String strImageName)
- GlideTimelineItem - setIsDraggable(Boolean b)
- GlideTimelineItem - setLeftLabelText(String strText)
- GlideTimelineItem - setParent(String sysId)
- GlideTimelineItem - setTextBold(Boolean b)