Package com.independentsoft.office.odf
Class Scenario
java.lang.Object
com.independentsoft.office.odf.Scenario
Represents a scenario for display on a table.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Creates a new object that is a deep copy of the current instance.Gets the color of a border that is displayed around a scenario that belongs to a scenario table.Gets the comment about a scenario.Gets the table range that is displayed as a scenario.booleanisActive()Specifies whether a scenario that belongs to a scenario table is active.booleanSpecifies whether data is copied back into a scenario table if another scenario is activated.booleanSpecifies whether formulas are copied from a scenario table to a destination table.booleanSpecifies whether styles are copied from a scenario table to a destination table together with the data.booleanSpecifies whether to display a border around a scenario that belongs to a scenario table.booleanSpecifies whether the data that is displayed within the scenario is protected from being edited.voidsetActive(boolean isActive)Specifies whether a scenario that belongs to a scenario table is active.voidsetBorderColor(String borderColor)Sets the color of a border that is displayed around a scenario that belongs to a scenario table.voidsetComment(String comment)Sets the comment about a scenario.voidsetCopyBack(boolean copyBack)Specifies whether data is copied back into a scenario table if another scenario is activated.voidsetCopyFormulas(boolean copyFormulas)Specifies whether formulas are copied from a scenario table to a destination table.voidsetCopyStyles(boolean copyStyles)Specifies whether styles are copied from a scenario table to a destination table together with the data.voidsetDisplayBorder(boolean displayBorder)Specifies whether to display a border around a scenario that belongs to a scenario table.voidsetProtected(boolean isProtected)Specifies whether the data that is displayed within the scenario is protected from being edited.voidSets the table range that is displayed as a scenario.toString()Converts the value of the current Scenario object to its equivalent string representation.
-
Constructor Details
-
Scenario
public Scenario()Initializes a new instance of the Scenario class.
-
-
Method Details
-
clone
Creates a new object that is a deep copy of the current instance. -
toString
Converts the value of the current Scenario object to its equivalent string representation. -
getRanges
Gets the table range that is displayed as a scenario. The value of this attribute is a white space separated list of cell range addresses.- Returns:
- the ranges
-
setRanges
Sets the table range that is displayed as a scenario. The value of this attribute is a white space separated list of cell range addresses.- Parameters:
ranges- the new ranges
-
isActive
public boolean isActive()Specifies whether a scenario that belongs to a scenario table is active. The defined values are: -false: scenario that belongs to a scenario table is inactive. -true: scenario that belongs to a scenario table is active.- Returns:
- true, if is active
-
setActive
public void setActive(boolean isActive)Specifies whether a scenario that belongs to a scenario table is active. The defined values are: -false: scenario that belongs to a scenario table is inactive. -true: scenario that belongs to a scenario table is active. *- Parameters:
isActive- the new active
-
isDisplayBorder
public boolean isDisplayBorder()Specifies whether to display a border around a scenario that belongs to a scenario table. The defined values are: -false: border is not displayed. -true: border is displayed.- Returns:
- true, if is display border
-
setDisplayBorder
public void setDisplayBorder(boolean displayBorder)Specifies whether to display a border around a scenario that belongs to a scenario table. The defined values are: -false: border is not displayed. -true: border is displayed.- Parameters:
displayBorder- the new display border
-
getBorderColor
Gets the color of a border that is displayed around a scenario that belongs to a scenario table.- Returns:
- the border color
-
setBorderColor
Sets the color of a border that is displayed around a scenario that belongs to a scenario table.- Parameters:
borderColor- the new border color
-
isCopyBack
public boolean isCopyBack()Specifies whether data is copied back into a scenario table if another scenario is activated. The defined values are: -false: data is not copied back into a scenario table if another scenario is activated. -true: data copied back into a scenario table if another scenario is activated.- Returns:
- true, if is copy back
-
setCopyBack
public void setCopyBack(boolean copyBack)Specifies whether data is copied back into a scenario table if another scenario is activated. The defined values are: -false: data is not copied back into a scenario table if another scenario is activated. -true: data copied back into a scenario table if another scenario is activated.- Parameters:
copyBack- the new copy back
-
isCopyStyles
public boolean isCopyStyles()Specifies whether styles are copied from a scenario table to a destination table together with the data. The defined values are: -false: styles are not copied with data. -true: styles are copied with data.- Returns:
- true, if is copy styles
-
setCopyStyles
public void setCopyStyles(boolean copyStyles)Specifies whether styles are copied from a scenario table to a destination table together with the data. The defined values are: -false: styles are not copied with data. -true: styles are copied with data.- Parameters:
copyStyles- the new copy styles
-
isCopyFormulas
public boolean isCopyFormulas()Specifies whether formulas are copied from a scenario table to a destination table. The defined values are: -false: only values resulting from formulas are copied. -true: formulas are copied.- Returns:
- true, if is copy formulas
-
setCopyFormulas
public void setCopyFormulas(boolean copyFormulas)Specifies whether formulas are copied from a scenario table to a destination table. The defined values are: -false: only values resulting from formulas are copied. -true: formulas are copied.- Parameters:
copyFormulas- the new copy formulas
-
getComment
Gets the comment about a scenario.- Returns:
- the comment
-
setComment
Sets the comment about a scenario.- Parameters:
comment- the new comment
-
isProtected
public boolean isProtected()Specifies whether the data that is displayed within the scenario is protected from being edited. The attribute is only evaluated if the table on which the scenario displayed is also protected. The defined values are: -false: data is not protected. -true: data is protected.- Returns:
- true, if is protected
-
setProtected
public void setProtected(boolean isProtected)Specifies whether the data that is displayed within the scenario is protected from being edited. The attribute is only evaluated if the table on which the scenario displayed is also protected. The defined values are: -false: data is not protected. -true: data is protected.- Parameters:
isProtected- the new protected
-