SaveOptions

Inheritance: java.lang.Object, com.aspose.tasks.SimpleSaveOptions

public abstract class SaveOptions extends SimpleSaveOptions

This is an abstract base class for classes that allow the user to specify additional options when saving a project into a particular format.


An instance of any derived class from SaveOptions class is passed to the stream Save or string Save overloads for the user to define custom options when saving a document.

Methods

MethodDescription
getBarStyles()Gets the list of the instances of the BarStyle class that appear in project view.
getCustomPageSize()Gets the custom page size in points (1 point = 1/72 of inch).
getDrawNonWorkingTime()Gets a value indicating whether non-working time should be drawn (Default value is TRUE).
getEndDate()Gets a date to finish rendering to.
getFitContent()Gets a value indicating whether row height should be increased to fit its content.
getFitTimescaleToEndOfPage()Gets whether a calendar section of a view should be rendered to the end (right side) of the last page.
getGridlines()Gets a list of Gridline that appear in project view.
getLegendDrawingOptions()Gets a value which define how to render a legend.
getMarkCriticalTasks()Gets a value indicating whether critical tasks should be displayed in red color (Default value is FALSE).
getNonWorkingTimeColor()Gets the non-working time color.
getPageCount()Gets the number of pages of project.
getPageSize()Gets the size of page to be rendered (Default value is PageSize.A4).
getPresentationFormat()Gets the PresentationFormat(getPresentationFormat()/setPresentationFormat(int)) in which the document will be saved.
getRenderToSinglePage()Gets a value indicating whether a project should be rendered to a single page when project is saved in graphical format.
getRollUpGanttBars()Gets a value indicating whether subtasks on the summary task bar should be marked.
getStartDate()Gets the date to start rendering from.
getTextStyles()Gets the list of text styles that applied during rendering of a project view.
getTimescale()Gets the Timescale(getTimescale()/setTimescale(int)) value which is used to control how timescale (if present) is rendered when project is saved to graphical format.
getUseGradientBrush()Gets a value indicating whether gradient brush should be used when rendering Gantt Chart.
getView()Gets a list of the view columns to render (GanttChartColumn).
getViewSettings()Gets a view (View(getView()/setView(ProjectView))) to render.
isPortrait()Gets a value indicating whether the page orientation is portrait; returns false if the page orientation is landscape.
setBarStyles(List<BarStyle> value)Sets the list of the instances of the BarStyle class that appear in project view.
setCustomPageSize(Dimension2D value)Sets the custom page size in points (1 point = 1/72 of inch).
setDrawNonWorkingTime(boolean value)Sets a value indicating whether non-working time should be drawn (Default value is TRUE).
setEndDate(Date value)Sets a date to finish rendering to.
setFitContent(boolean value)Sets a value indicating whether row height should be increased to fit its content.
setFitTimescaleToEndOfPage(boolean value)Sets whether a calendar section of a view should be rendered to the end (right side) of the last page.
setGridlines(List<Gridline> value)Sets a list of Gridline that appear in project view.
setLegendDrawingOptions(int value)Sets a value which define how to render a legend.
setMarkCriticalTasks(boolean value)Sets a value indicating whether critical tasks should be displayed in red color (Default value is FALSE).
setNonWorkingTimeColor(Color value)Sets the non-working time color.
setPageSize(int value)Sets the size of page to be rendered (Default value is PageSize.A4).
setPortrait(boolean value)Sets a value indicating whether the page orientation is portrait; returns false if the page orientation is landscape.
setPresentationFormat(int value)Sets the PresentationFormat(getPresentationFormat()/setPresentationFormat(int)) in which the document will be saved.
setRenderToSinglePage(boolean value)Sets a value indicating whether a project should be rendered to a single page when project is saved in graphical format.
setRollUpGanttBars(boolean value)Sets a value indicating whether subtasks on the summary task bar should be marked.
setStartDate(Date value)Sets the date to start rendering from.
setTextStyles(List<TextStyle> value)Sets the list of text styles that applied during rendering of a project view.
setTimescale(int value)Sets the Timescale(getTimescale()/setTimescale(int)) value which is used to control how timescale (if present) is rendered when project is saved to graphical format.
setUseGradientBrush(boolean value)Sets a value indicating whether gradient brush should be used when rendering Gantt Chart.
setView(ProjectView value)Sets a list of the view columns to render (GanttChartColumn).
setViewSettings(View value)Sets a view (View(getView()/setView(ProjectView))) to render.

getBarStyles()

public final List<BarStyle> getBarStyles()

Gets the list of the instances of the BarStyle class that appear in project view.

Returns: java.util.List<com.aspose.tasks.BarStyle> - the list of the instances of the BarStyle class that appear in project view.

getCustomPageSize()

public final Dimension2D getCustomPageSize()

Gets the custom page size in points (1 point = 1/72 of inch).

Returns: java.awt.geom.Dimension2D - the custom page size in points (1 point = 1/72 of inch).

getDrawNonWorkingTime()

public final boolean getDrawNonWorkingTime()

Gets a value indicating whether non-working time should be drawn (Default value is TRUE).

Returns: boolean - a value indicating whether non-working time should be drawn (Default value is TRUE).

getEndDate()

public final Date getEndDate()

Gets a date to finish rendering to.

Returns: java.util.Date - a date to finish rendering to.

getFitContent()

public final boolean getFitContent()

Gets a value indicating whether row height should be increased to fit its content.

Returns: boolean - a value indicating whether row height should be increased to fit its content.

getFitTimescaleToEndOfPage()

public final boolean getFitTimescaleToEndOfPage()

Gets whether a calendar section of a view should be rendered to the end (right side) of the last page. If value is false, calendar section is rendered exactly to EndDate, even there is an empty space on a page.

Returns: boolean - whether a calendar section of a view should be rendered to the end (right side) of the last page.

getGridlines()

public final List<Gridline> getGridlines()

Gets a list of Gridline that appear in project view.

Returns: java.util.List<com.aspose.tasks.Gridline> - a list of Gridline that appear in project view.

getLegendDrawingOptions()

public final int getLegendDrawingOptions()

Gets a value which define how to render a legend. Default value is LegendDrawingOptions.OnEveryPage.

Returns: int - a value which define how to render a legend.

getMarkCriticalTasks()

public final boolean getMarkCriticalTasks()

Gets a value indicating whether critical tasks should be displayed in red color (Default value is FALSE).

Returns: boolean - a value indicating whether critical tasks should be displayed in red color (Default value is FALSE).

getNonWorkingTimeColor()

public final Color getNonWorkingTimeColor()

Gets the non-working time color.

Returns: java.awt.Color - the non-working time color.

getPageCount()

public final int getPageCount()

Gets the number of pages of project.

Returns: int - the number of pages of project.

getPageSize()

public final int getPageSize()

Gets the size of page to be rendered (Default value is PageSize.A4).

Returns: int - the size of page to be rendered (Default value is PageSize.A4).

getPresentationFormat()

public final int getPresentationFormat()

Gets the PresentationFormat(getPresentationFormat()/setPresentationFormat(int)) in which the document will be saved.

Returns: int - the PresentationFormat(getPresentationFormat()/setPresentationFormat(int)) in which the document will be saved.

getRenderToSinglePage()

public final boolean getRenderToSinglePage()

Gets a value indicating whether a project should be rendered to a single page when project is saved in graphical format. The page size will be changed so the rendered project can be fit on one page.

Returns: boolean - a value indicating whether a project should be rendered to a single page when project is saved in graphical format.

getRollUpGanttBars()

public final boolean getRollUpGanttBars()

Gets a value indicating whether subtasks on the summary task bar should be marked. For subtasks, the Rollup field indicates whether information on the subtask Gantt bars will be rolled up to the summary task bar. For summary tasks, the Rollup field indicates whether the summary task bar displays rolled up bars. You must have the Rollup field for summary tasks set to Yes for any subtasks to roll up to them.


Is only applicable when Gantt chart view is rendered.

Returns: boolean - a value indicating whether subtasks on the summary task bar should be marked.

getStartDate()

public final Date getStartDate()

Gets the date to start rendering from.

Returns: java.util.Date - the date to start rendering from.

getTextStyles()

public final List<TextStyle> getTextStyles()

Gets the list of text styles that applied during rendering of a project view.


These styles override styles defined with GanttCharView.setTextStyles.

Returns: java.util.List<com.aspose.tasks.TextStyle> - the list of text styles that applied during rendering of a project view.

getTimescale()

public final int getTimescale()

Gets the Timescale(getTimescale()/setTimescale(int)) value which is used to control how timescale (if present) is rendered when project is saved to graphical format.

Returns: int - the Timescale(getTimescale()/setTimescale(int)) value which is used to control how timescale (if present) is rendered when project is saved to graphical format.

getUseGradientBrush()

public boolean getUseGradientBrush()

Gets a value indicating whether gradient brush should be used when rendering Gantt Chart.


Is only applicable when Gantt chart view is rendered.

Returns: boolean - a value indicating whether gradient brush should be used when rendering Gantt Chart.

getView()

public final ProjectView getView()

Gets a list of the view columns to render (GanttChartColumn). If not set then task ids, task names, start and finish are rendered only. If both View and ViewSettings(getViewSettings()/setViewSettings(View)) properties are set, columns from View overrides columns from ViewSettings.

Returns: ProjectView - a list of the view columns to render (GanttChartColumn).

getViewSettings()

public final View getViewSettings()

Gets a view (View(getView()/setView(ProjectView))) to render. You can use this options to explicitly specify which view should be saved to PDF, HTML or Image formats. If this property is set, PresentationFormat property is ignored when project is saved. View should be from one of the following screen ((Aspose.Tasks.View.Screen(View.getScreen()/View.setScreen(int)))): (Gantt, TaskSheet, TaskUsage, ResourceSheet, ResourceUsage)

Returns: View - a view (View(getView()/setView(ProjectView))) to render.

isPortrait()

public final boolean isPortrait()

Gets a value indicating whether the page orientation is portrait; returns false if the page orientation is landscape.


Is not applicable when SaveOptions.getPageSize() == PageSize.DefinedInView. In this case PageSettings.isPortrait() is used instead. Is not applicable when getCustomPageSize() is set.

Returns: boolean - a value indicating whether the page orientation is portrait; returns false if the page orientation is landscape.

setBarStyles(List<BarStyle> value)

public final void setBarStyles(List<BarStyle> value)

Sets the list of the instances of the BarStyle class that appear in project view.

Parameters:

ParameterTypeDescription
valuejava.util.List<com.aspose.tasks.BarStyle>the list of the instances of the BarStyle class that appear in project view.

setCustomPageSize(Dimension2D value)

public final void setCustomPageSize(Dimension2D value)

Sets the custom page size in points (1 point = 1/72 of inch).

Parameters:

ParameterTypeDescription
valuejava.awt.geom.Dimension2Dthe custom page size in points (1 point = 1/72 of inch).

setDrawNonWorkingTime(boolean value)

public final void setDrawNonWorkingTime(boolean value)

Sets a value indicating whether non-working time should be drawn (Default value is TRUE).

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether non-working time should be drawn (Default value is TRUE).

setEndDate(Date value)

public final void setEndDate(Date value)

Sets a date to finish rendering to.

Parameters:

ParameterTypeDescription
valuejava.util.Datea date to finish rendering to.

setFitContent(boolean value)

public final void setFitContent(boolean value)

Sets a value indicating whether row height should be increased to fit its content.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether row height should be increased to fit its content.

setFitTimescaleToEndOfPage(boolean value)

public final void setFitTimescaleToEndOfPage(boolean value)

Sets whether a calendar section of a view should be rendered to the end (right side) of the last page. If value is false, calendar section is rendered exactly to EndDate, even there is an empty space on a page.

Parameters:

ParameterTypeDescription
valuebooleanwhether a calendar section of a view should be rendered to the end (right side) of the last page.

setGridlines(List<Gridline> value)

public final void setGridlines(List<Gridline> value)

Sets a list of Gridline that appear in project view.

Parameters:

ParameterTypeDescription
valuejava.util.List<com.aspose.tasks.Gridline>a list of Gridline that appear in project view.

setLegendDrawingOptions(int value)

public final void setLegendDrawingOptions(int value)

Sets a value which define how to render a legend. Default value is LegendDrawingOptions.OnEveryPage.

Parameters:

ParameterTypeDescription
valueinta value which define how to render a legend.

setMarkCriticalTasks(boolean value)

public final void setMarkCriticalTasks(boolean value)

Sets a value indicating whether critical tasks should be displayed in red color (Default value is FALSE).

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether critical tasks should be displayed in red color (Default value is FALSE).

setNonWorkingTimeColor(Color value)

public final void setNonWorkingTimeColor(Color value)

Sets the non-working time color.

Parameters:

ParameterTypeDescription
valuejava.awt.Colorthe non-working time color.

setPageSize(int value)

public final void setPageSize(int value)

Sets the size of page to be rendered (Default value is PageSize.A4).

Parameters:

ParameterTypeDescription
valueintthe size of page to be rendered (Default value is PageSize.A4).

setPortrait(boolean value)

public final void setPortrait(boolean value)

Sets a value indicating whether the page orientation is portrait; returns false if the page orientation is landscape.


Is not applicable when SaveOptions.PageSize == Visualization.PageSize.DefinedInView. In this case PageSettings.setPortrait(boolean) is used instead. Is not applicable when getCustomPageSize() is set.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether the page orientation is portrait; returns false if the page orientation is landscape.

setPresentationFormat(int value)

public final void setPresentationFormat(int value)

Sets the PresentationFormat(getPresentationFormat()/setPresentationFormat(int)) in which the document will be saved.

Parameters:

ParameterTypeDescription
valueintthe PresentationFormat(getPresentationFormat()/setPresentationFormat(int)) in which the document will be saved.

setRenderToSinglePage(boolean value)

public final void setRenderToSinglePage(boolean value)

Sets a value indicating whether a project should be rendered to a single page when project is saved in graphical format. The page size will be changed so the rendered project can be fit on one page.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether a project should be rendered to a single page when project is saved in graphical format.

setRollUpGanttBars(boolean value)

public final void setRollUpGanttBars(boolean value)

Sets a value indicating whether subtasks on the summary task bar should be marked. For subtasks, the Rollup field indicates whether information on the subtask Gantt bars will be rolled up to the summary task bar. For summary tasks, the Rollup field indicates whether the summary task bar displays rolled up bars. You must have the Rollup field for summary tasks set to Yes for any subtasks to roll up to them.


Is only applicable when Gantt chart view is rendered.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether subtasks on the summary task bar should be marked.

setStartDate(Date value)

public final void setStartDate(Date value)

Sets the date to start rendering from.

Parameters:

ParameterTypeDescription
valuejava.util.Datethe date to start rendering from.

setTextStyles(List<TextStyle> value)

public final void setTextStyles(List<TextStyle> value)

Sets the list of text styles that applied during rendering of a project view.


These styles override styles defined with GanttCharView.setTextStyles.

Parameters:

ParameterTypeDescription
valuejava.util.List<com.aspose.tasks.TextStyle>the list of text styles that applied during rendering of a project view.

setTimescale(int value)

public final void setTimescale(int value)

Sets the Timescale(getTimescale()/setTimescale(int)) value which is used to control how timescale (if present) is rendered when project is saved to graphical format.

Parameters:

ParameterTypeDescription
valueintthe Timescale(getTimescale()/setTimescale(int)) value which is used to control how timescale (if present) is rendered when project is saved to graphical format.

setUseGradientBrush(boolean value)

public void setUseGradientBrush(boolean value)

Sets a value indicating whether gradient brush should be used when rendering Gantt Chart.


Is only applicable when Gantt chart view is rendered.

Parameters:

ParameterTypeDescription
valuebooleana value indicating whether gradient brush should be used when rendering Gantt Chart.

setView(ProjectView value)

public final void setView(ProjectView value)

Sets a list of the view columns to render (GanttChartColumn). If not set then task ids, task names, start and finish are rendered only. If both View and ViewSettings(getViewSettings()/setViewSettings(View)) properties are set, columns from View overrides columns from ViewSettings.

Parameters:

ParameterTypeDescription
valueProjectViewa list of the view columns to render (GanttChartColumn).

setViewSettings(View value)

public final void setViewSettings(View value)

Sets a view (View(getView()/setView(ProjectView))) to render. You can use this options to explicitly specify which view should be saved to PDF, HTML or Image formats. If this property is set, PresentationFormat property is ignored when project is saved. View should be from one of the following screen ((Aspose.Tasks.View.Screen(View.getScreen()/View.setScreen(int)))): (Gantt, TaskSheet, TaskUsage, ResourceSheet, ResourceUsage)

Parameters:

ParameterTypeDescription
valueViewa view (View(getView()/setView(ProjectView))) to render.