com.f1j.ss.datarange
Interface DataRangeDef


public interface DataRangeDef
extends Lockable

The API for viewing and modifying the definition of a DataRange.

Since:
12.0

Inner Class Summary
static class DataRangeDef.ELocationType
          Enumeration class for defining DataRange locations.
 
Method Summary
 DataSet getDataSet()
          Returns the default DataSet specified for the defined DataRange.
 int getFirstColumn()
          Returns the first column for the defined DataRange.
 int getFirstRow()
          Returns the first row for the defined DataRange.
 int getLastColumn()
          Returns the last column for the defined DataRange.
 int getLastRow()
          Returns the last row for the defined DataRange.
 java.lang.String getLocation()
          Returns the formula defining the top left corner of the DataRange in US English.
 java.lang.String getLocationLocal()
          Returns the formula defining the top left corner of the DataRange in the user's language.
 Sheet getLocationSheet()
          Returns the target worksheet for the defined DataRange.
 DataRangeDef.ELocationType getLocationType()
          Returns whether the defined DataRange should be placed on a new worksheet or an existing worksheet.
 java.lang.String getName()
          Deprecated. as of 12.0.2. Use DataRangeOptions.getName
 DataRangeOptions getOptions()
          Returns a DataRangeOptions object that can be used to define specific characteristics of the Data Range being created or modified.
 void setDataSet(DataSet dataSet)
          Sets the default data set for this particular DataRange.
 void setLocation(Sheet sheet, int row1, int column1, int row2, int column2)
          Defines the location of the DataRange.
 void setLocation(java.lang.String strLoc)
          Defines the location of the DataRange using a formula in US English.
 void setLocationLocal(java.lang.String strLoc)
          Defines the location of the DataRange using a formula in the user's language.
 void setLocationType(DataRangeDef.ELocationType type)
          Sets whether the DataRange should be placed on a new worksheet or an existing worksheet.
 void setName(java.lang.String str)
          Deprecated. as of 12.0.2. Use DataRangeOptions.setName
 void setOptions(DataRangeOptions options)
          Sets the characteristics of the Data Range being defined.
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

getDataSet

public DataSet getDataSet()
Returns the default DataSet specified for the defined DataRange.
Returns:
the default Data Set specified for this DataRange or null if no default is specified.
Since:
12.0
See Also:
DataSet

getFirstColumn

public int getFirstColumn()
Returns the first column for the defined DataRange.
Returns:
the first column for the DataRange
Since:
12.0
See Also:
DataRange

getFirstRow

public int getFirstRow()
Returns the first row for the defined DataRange.
Returns:
the first row for the DataRange
Since:
12.0
See Also:
DataRange

getLocationSheet

public Sheet getLocationSheet()
Returns the target worksheet for the defined DataRange.
Returns:
The target worksheet for the DataRange.
Since:
12.0
See Also:
DataRange, Sheet

getLastColumn

public int getLastColumn()
Returns the last column for the defined DataRange.
Returns:
the last column for the DataRange
Since:
12.0
See Also:
DataRange

getLastRow

public int getLastRow()
Returns the last row for the defined DataRange.
Returns:
the last row for the DataRange
Since:
12.0
See Also:
DataRange

getLocation

public java.lang.String getLocation()
Returns the formula defining the top left corner of the DataRange in US English.
Returns:
A formula defining the top left corner of the DataRange.
Since:
12.0
See Also:
DataRange

getLocationLocal

public java.lang.String getLocationLocal()
Returns the formula defining the top left corner of the DataRange in the user's language.
Returns:
A formula defining the top left corner of the DataRange.
Since:
12.0
See Also:
DataRange

getLocationType

public DataRangeDef.ELocationType getLocationType()
Returns whether the defined DataRange should be placed on a new worksheet or an existing worksheet.
Returns:
An enumeration that indicates whether to use a new worksheet or an existing worksheet.
Since:
12.0
See Also:
DataRangeDef.ELocationType, DataRange

getName

public java.lang.String getName()
Deprecated. as of 12.0.2. Use DataRangeOptions.getName
Returns the name of the DataRange.
Returns:
The name of the DataRange.
Since:
12.0
See Also:
DataRange

getOptions

public DataRangeOptions getOptions()
Returns a DataRangeOptions object that can be used to define specific characteristics of the Data Range being created or modified.
Returns:
An object containing specific characteristics of the Data Range.
Since:
12.0.2
See Also:
DataRange, DataRangeOptions

setDataSet

public void setDataSet(DataSet dataSet)
Sets the default data set for this particular DataRange. If the data set is null, then the default data set for the sheet or book will be used.
Parameters:
dataSet - - The DataSet that should be used as the default for this range.
Since:
12.0
See Also:
DataSet

setLocation

public void setLocation(Sheet sheet,
                        int row1,
                        int column1,
                        int row2,
                        int column2)
Defines the location of the DataRange.
Parameters:
sheet - The worksheet that contains the DataRange.
row1 - The row where the DataRange starts.
column1 - The column where the DataRange starts.
row2 - The row where the DataRange ends.
column2 - The column where the DataRange ends.
Since:
12.0
See Also:
DataRange, Sheet

setLocation

public void setLocation(java.lang.String strLoc)
                 throws F1Exception
Defines the location of the DataRange using a formula in US English.
Parameters:
strLoc - A formula defining the location.
Throws:
F1Exception - if formula is invalid.
Since:
12.0
See Also:
DataRange

setLocationLocal

public void setLocationLocal(java.lang.String strLoc)
                      throws F1Exception
Defines the location of the DataRange using a formula in the user's language.
Parameters:
strLoc - A formula defining the location.
Throws:
F1Exception - if formula is invalid.
Since:
12.0
See Also:
DataRange

setLocationType

public void setLocationType(DataRangeDef.ELocationType type)
Sets whether the DataRange should be placed on a new worksheet or an existing worksheet.
Parameters:
type - An enumeration that indicates whether the DataRange should be placed on a new worksheet or an existing worksheet.
Since:
12.0
See Also:
DataRangeDef.ELocationType, DataRange

setName

public void setName(java.lang.String str)
             throws DuplicateNameException,
                    com.f1j.ss.datarange.InvalidNameException
Deprecated. as of 12.0.2. Use DataRangeOptions.setName
Sets the name of the DataRange.
Parameters:
str - The name of the DataRange.
Throws:
DuplicateNameException - if DataRange with this name exists.
com.f1j.ss.datarange.InvalidNameException - if name is invalid.
Since:
12.0
See Also:
DataRange

setOptions

public void setOptions(DataRangeOptions options)
Sets the characteristics of the Data Range being defined.
Parameters:
options - An object containing the characteristics of the Data Range being defined.
Since:
12.0.2
See Also:
DataRange, DataRangeOptions