Class Scenario

java.lang.Object
com.independentsoft.office.odf.Scenario

public class Scenario extends Object
Represents a scenario for display on a table.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Initializes a new instance of the Scenario class.
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    boolean
    Specifies whether a scenario that belongs to a scenario table is active.
    boolean
    Specifies whether data is copied back into a scenario table if another scenario is activated.
    boolean
    Specifies whether formulas are copied from a scenario table to a destination table.
    boolean
    Specifies whether styles are copied from a scenario table to a destination table together with the data.
    boolean
    Specifies whether to display a border around a scenario that belongs to a scenario table.
    boolean
    Specifies whether the data that is displayed within the scenario is protected from being edited.
    void
    setActive​(boolean isActive)
    Specifies whether a scenario that belongs to a scenario table is active.
    void
    setBorderColor​(String borderColor)
    Sets the color of a border that is displayed around a scenario that belongs to a scenario table.
    void
    setComment​(String comment)
    Sets the comment about a scenario.
    void
    setCopyBack​(boolean copyBack)
    Specifies whether data is copied back into a scenario table if another scenario is activated.
    void
    setCopyFormulas​(boolean copyFormulas)
    Specifies whether formulas are copied from a scenario table to a destination table.
    void
    setCopyStyles​(boolean copyStyles)
    Specifies whether styles are copied from a scenario table to a destination table together with the data.
    void
    setDisplayBorder​(boolean displayBorder)
    Specifies whether to display a border around a scenario that belongs to a scenario table.
    void
    setProtected​(boolean isProtected)
    Specifies whether the data that is displayed within the scenario is protected from being edited.
    void
    setRanges​(String ranges)
    Sets the table range that is displayed as a scenario.
    Converts the value of the current Scenario object to its equivalent string representation.

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Scenario

      public Scenario()
      Initializes a new instance of the Scenario class.
  • Method Details

    • clone

      public Scenario clone()
      Creates a new object that is a deep copy of the current instance.
      Overrides:
      clone in class Object
      Returns:
      A new object that is a copy of this instance.
    • toString

      public String toString()
      Converts the value of the current Scenario object to its equivalent string representation.
      Overrides:
      toString in class Object
      Returns:
      the string
    • getRanges

      public String 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

      public void setRanges(String ranges)
      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

      public String getBorderColor()
      Gets the color of a border that is displayed around a scenario that belongs to a scenario table.
      Returns:
      the border color
    • setBorderColor

      public void setBorderColor(String borderColor)
      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

      public String getComment()
      Gets the comment about a scenario.
      Returns:
      the comment
    • setComment

      public void setComment(String comment)
      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