Timeline

Inheritance: java.lang.Object

public class Timeline

Summary description of Timeline View Due to MS Excel, Excel 2003 does not support Timeline

Example

         Workbook book = new Workbook();
         Worksheet sheet = book.getWorksheets().get(0);
         Cells cells = sheet.getCells();
         cells.get(0, 0).setValue("fruit");
         cells.get(1, 0).setValue("grape");
         cells.get(2, 0).setValue("blueberry");
         cells.get(3, 0).setValue("kiwi");
         cells.get(4, 0).setValue("cherry");
 
         //Create date style
         Style dateStyle = new CellsFactory().createStyle();
         dateStyle.setCustom("m/d/yyyy");
         cells.get(0, 1).setValue("date");
         cells.get(1, 1).setValue(new DateTime(2021, 2, 5));
         cells.get(2, 1).setValue(new DateTime(2022, 3, 8));
         cells.get(3, 1).setValue(new DateTime(2023, 4, 10));
         cells.get(4, 1).setValue(new DateTime(2024, 5, 16));
         //Set date style
         cells.get(1, 1).setStyle(dateStyle);
         cells.get(2, 1).setStyle(dateStyle);
         cells.get(3, 1).setStyle(dateStyle);
         cells.get(4, 1).setStyle(dateStyle);
 
         cells.get(0, 2).setValue("amount");
         cells.get(1, 2).setValue(50);
         cells.get(2, 2).setValue(60);
         cells.get(3, 2).setValue(70);
         cells.get(4, 2).setValue(80);
 
         PivotTableCollection pivots = sheet.getPivotTables();
         //Add a PivotTable
         int pivotIndex = pivots.add("=Sheet1!A1:C5", "A12", "TestPivotTable");
         PivotTable pivot = pivots.get(pivotIndex);
         pivot.addFieldToArea(PivotFieldType.ROW, "fruit");
         pivot.addFieldToArea(PivotFieldType.COLUMN, "date");
         pivot.addFieldToArea(PivotFieldType.DATA, "amount");
         pivot.setPivotTableStyleType(PivotTableStyleType.PIVOT_TABLE_STYLE_MEDIUM_10);
 
         //Refresh PivotTable data
         pivot.refreshData();
         pivot.calculateData();
 
         //Add a new Timeline using PivotTable as data source
         sheet.getTimelines().add(pivot, 10, 5, "date");
 
         //Get Timeline object
         Timeline timelineObj = sheet.getTimelines().get(0);
 
         //do your business
 
         book.save("out.xlsx");

Methods

MethodDescription
equals(Object arg0)
getCaption()Gets the caption of this Timeline.
getClass()
getCurrentLevel()The current time level of the Timeline.
getHeightPixel()Returns or sets the height of the specified timeline, in pixels.
getLeftPixel()Returns or sets the horizontal offset of timeline shape from its left column, in pixels.
getName()Returns or sets the name of the specified Timeline
getSelectionLevel()Gets the time level at which the current selection was made for the Timeline.
getShape()Returns the TimelineShape object associated with this Timeline.
getShowHeader()Indicates whether to display the header.
getShowHorizontalScrollbar()Indicates whether to display the horizontal ccroll bar.
getShowSelectionLabel()Indicates whether to display the selction label.
getShowTimeLevel()Indicates whether to display the time level.
getStartDate()Gets the start date of the timespan scrolling position of this Timeline.
getTopPixel()Returns or sets the vertical offset of timeline shape from its top row, in pixels.
getWidthPixel()Returns or sets the width of the specified timeline, in pixels.
hashCode()
notify()
notifyAll()
setCaption(String value)Sets the caption of this Timeline.
setCurrentLevel(int value)The current time level of the Timeline.
setHeightPixel(int value)Returns or sets the height of the specified timeline, in pixels.
setLeftPixel(int value)Returns or sets the horizontal offset of timeline shape from its left column, in pixels.
setName(String value)Returns or sets the name of the specified Timeline
setSelectionLevel(int value)Sets the time level at which the current selection was made for the Timeline.
setShowHeader(boolean value)Indicates whether to display the header.
setShowHorizontalScrollbar(boolean value)Indicates whether to display the horizontal ccroll bar.
setShowSelectionLabel(boolean value)Indicates whether to display the selction label.
setShowTimeLevel(boolean value)Indicates whether to display the time level.
setStartDate(DateTime value)Sets the start date of the timespan scrolling position of this Timeline.
setTopPixel(int value)Returns or sets the vertical offset of timeline shape from its top row, in pixels.
setWidthPixel(int value)Returns or sets the width of the specified timeline, in pixels.
toString()
wait()
wait(long arg0)
wait(long arg0, int arg1)

equals(Object arg0)

public boolean equals(Object arg0)

Parameters:

ParameterTypeDescription
arg0java.lang.Object

Returns: boolean

getCaption()

public String getCaption()

Gets the caption of this Timeline.

Example

         //Set the caption of this Timeline.
         timelineObj.setCaption("timeline caption test");

Returns: java.lang.String

getClass()

public final native Class<?> getClass()

Returns: java.lang.Class

getCurrentLevel()

public int getCurrentLevel()

The current time level of the Timeline.

See TimelineLevelType.

Returns: int

getHeightPixel()

public int getHeightPixel()

Returns or sets the height of the specified timeline, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Height property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Returns: int

getLeftPixel()

public int getLeftPixel()

Returns or sets the horizontal offset of timeline shape from its left column, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Left property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Returns: int

getName()

public String getName()

Returns or sets the name of the specified Timeline

Example

         //Set the name of the specified Timeline.
         timelineObj.setName("timeline name test");

Returns: java.lang.String

getSelectionLevel()

public int getSelectionLevel()

Gets the time level at which the current selection was made for the Timeline.

See TimelineLevelType.

Returns: int

getShape()

public TimelineShape getShape()

Returns the TimelineShape object associated with this Timeline.

Returns: TimelineShape

getShowHeader()

public boolean getShowHeader()

Indicates whether to display the header.

Returns: boolean

getShowHorizontalScrollbar()

public boolean getShowHorizontalScrollbar()

Indicates whether to display the horizontal ccroll bar.

Returns: boolean

getShowSelectionLabel()

public boolean getShowSelectionLabel()

Indicates whether to display the selction label.

Returns: boolean

getShowTimeLevel()

public boolean getShowTimeLevel()

Indicates whether to display the time level.

Returns: boolean

getStartDate()

public DateTime getStartDate()

Gets the start date of the timespan scrolling position of this Timeline.

Returns: DateTime

getTopPixel()

public int getTopPixel()

Returns or sets the vertical offset of timeline shape from its top row, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Top property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Returns: int

getWidthPixel()

public int getWidthPixel()

Returns or sets the width of the specified timeline, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Width property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Returns: int

hashCode()

public native int hashCode()

Returns: int

notify()

public final native void notify()

notifyAll()

public final native void notifyAll()

setCaption(String value)

public void setCaption(String value)

Sets the caption of this Timeline.

Parameters:

ParameterTypeDescription
valuejava.lang.String

setCurrentLevel(int value)

public void setCurrentLevel(int value)

The current time level of the Timeline.

See TimelineLevelType.

Parameters:

ParameterTypeDescription
valueint

setHeightPixel(int value)

public void setHeightPixel(int value)

Returns or sets the height of the specified timeline, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Height property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueint

setLeftPixel(int value)

public void setLeftPixel(int value)

Returns or sets the horizontal offset of timeline shape from its left column, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Left property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueint

setName(String value)

public void setName(String value)

Returns or sets the name of the specified Timeline

Parameters:

ParameterTypeDescription
valuejava.lang.String

setSelectionLevel(int value)

public void setSelectionLevel(int value)

Sets the time level at which the current selection was made for the Timeline.

See TimelineLevelType.

Parameters:

ParameterTypeDescription
valueint

setShowHeader(boolean value)

public void setShowHeader(boolean value)

Indicates whether to display the header.

Parameters:

ParameterTypeDescription
valueboolean

setShowHorizontalScrollbar(boolean value)

public void setShowHorizontalScrollbar(boolean value)

Indicates whether to display the horizontal ccroll bar.

Parameters:

ParameterTypeDescription
valueboolean

setShowSelectionLabel(boolean value)

public void setShowSelectionLabel(boolean value)

Indicates whether to display the selction label.

Parameters:

ParameterTypeDescription
valueboolean

setShowTimeLevel(boolean value)

public void setShowTimeLevel(boolean value)

Indicates whether to display the time level.

Parameters:

ParameterTypeDescription
valueboolean

setStartDate(DateTime value)

public void setStartDate(DateTime value)

Sets the start date of the timespan scrolling position of this Timeline.

Parameters:

ParameterTypeDescription
valueDateTime

setTopPixel(int value)

public void setTopPixel(int value)

Returns or sets the vertical offset of timeline shape from its top row, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Top property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueint

setWidthPixel(int value)

public void setWidthPixel(int value)

Returns or sets the width of the specified timeline, in pixels.

Remarks

NOTE: This member is now obsolete. Instead, please use Shape.Width property. This property will be removed 12 months later since May 2025. Aspose apologizes for any inconvenience you may have experienced.

Parameters:

ParameterTypeDescription
valueint

toString()

public String toString()

Returns: java.lang.String

wait()

public final void wait()

wait(long arg0)

public final native void wait(long arg0)

Parameters:

ParameterTypeDescription
arg0long

wait(long arg0, int arg1)

public final void wait(long arg0, int arg1)

Parameters:

ParameterTypeDescription
arg0long
arg1int