com.f1j.ss.pivot
Interface PivotRangeModel


public interface PivotRangeModel
extends Lockable

This interface defines the common PivotRange API.


Method Summary
 PivotRange applyPivotRangeDef(PivotRangeDef definition)
          Creates a new PivotRange using the supplied definition, or modifies the currently selected PivotRange.
 PivotRange createPivotRange(int sheet, int row, int col, DataQuery query)
          Creates a PivotRange at the specified location using the specified query.
 Range getActiveCell()
          Returns the range of the active cell.
 Range getActiveCell(Range dst)
          Returns the range of the active cell.
 Field getActiveField()
          Returns the currently active Field in the currently selected PivotRange.
 PivotRange getActivePivotRange()
          Returns the currently selected PivotRange.
 PivotRangeDef getPivotRangeDef()
          Returns the definition for the currently selected PivotRange.
 Range getSelectedRange()
          Returns a Range object that represents the the current selection.
 Range getSelectedRange(Range dst)
          Returns a Range object that represents the the current selection.
 boolean isFieldLabelActive()
          Indicates whether a Field label is in the active cell of the currently selected PivotRange.
 void refresh(PivotRange pivotRange)
          This will update the PivotRange with the latest information from the data source.
 void setSelection(Range range)
          Selects the specified range.
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

applyPivotRangeDef

public PivotRange applyPivotRangeDef(PivotRangeDef definition)
                              throws DuplicateNameException,
                                     InvalidPivotRangeException,
                                     InvalidArgumentException,
                                     InvalidDataException,
                                     F1Exception
Creates a new PivotRange using the supplied definition, or modifies the currently selected PivotRange.
Parameters:
definition - The definition that should be applied to the current PivotRange. If a PivotRange is not currently selected, then a new one is created.
Returns:
The PivotRange that was created or modified.
Throws:
DuplicateNameException - if PivotRange already exists with specified name.
InvalidPivotRangeException - if PivotRange is invalid.
InvalidArgumentException - if definition is invalid or the data source info is invalid.
InvalidDataException - if data is invalid
F1Exception - if an error occurs.
Since:
11.0
See Also:
PivotRange, PivotRangeDef

createPivotRange

public PivotRange createPivotRange(int sheet,
                                   int row,
                                   int col,
                                   DataQuery query)
                            throws DuplicateNameException,
                                   InvalidPivotRangeException,
                                   InvalidArgumentException,
                                   InvalidDataException,
                                   F1Exception
Creates a PivotRange at the specified location using the specified query.

The active cell is the cell in which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing.

Parameters:
sheet - The sheet where the PivotRange should be created.
row - The row where the PivotRange should be created.
col - The column where the PivotRange should be created.
query - The query to use as the data source for the PivotRange.
Returns:
The PivotRange that was created.
Throws:
DuplicateNameException - if PivotRange already exists with specified name.
InvalidPivotRangeException - if PivotRange is invalid.
InvalidArgumentException - if definition is invalid or the data source info is invalid.
F1Exception - if an error occurs.
Since:
11.0
See Also:
PivotRange

getActiveCell

public Range getActiveCell()
                    throws SelectionException,
                           F1Exception
Returns the range of the active cell.

The active cell is the cell in which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing.

Returns:
a Range object.
Throws:
SelectionException - if active cell is not in PivotRange.
F1Exception - if an error occurs.
Since:
11.0
See Also:
Range

getActiveCell

public Range getActiveCell(Range dst)
                    throws SelectionException,
                           F1Exception
Returns the range of the active cell.

The active cell is the cell in which the cursor is currently located. It is the cell in which data is entered or edited if the user starts typing.

Parameters:
dst - A Range object in which to place the active cell.
Returns:
A reference to dst. If dst is null, a reference to a newly allocated Range object.
Throws:
SelectionException - if active cell is not in PivotRange.
F1Exception - if an error occurs.
Since:
11.0
See Also:
Range

getActiveField

public Field getActiveField()
Returns the currently active Field in the currently selected PivotRange.
Returns:
The currently selected Field or null if no Field or PivotRange is selected.
Since:
11.0
See Also:
Field, PivotRange

getActivePivotRange

public PivotRange getActivePivotRange()
Returns the currently selected PivotRange.
Returns:
The currently selected PivotRange
Since:
11.0
See Also:
PivotRange

getPivotRangeDef

public PivotRangeDef getPivotRangeDef()
Returns the definition for the currently selected PivotRange. If a PivotRange is not currently selected, then a default definition is returned so a new PivotRange may be created.
Returns:
The definition for the currently selected PivotRange or a default definition for a new PivotRange.
Since:
11.0
See Also:
PivotRange, PivotRangeDef

getSelectedRange

public Range getSelectedRange()
Returns a Range object that represents the the current selection.
Returns:
a Range object.
Since:
11.0
See Also:
Range

getSelectedRange

public Range getSelectedRange(Range dst)
Returns a Range object that represents the the current selection.
Parameters:
dst - A Range object in which to place the selection.
Returns:
A reference to dst. If dst is null, a reference to a newly allocated Range object.
Since:
11.0
See Also:
Range

isFieldLabelActive

public boolean isFieldLabelActive()
Indicates whether a Field label is in the active cell of the currently selected PivotRange.
Returns:
boolean. true = a Field label is currently active
Since:
11.0
See Also:
Field, PivotRange

refresh

public void refresh(PivotRange pivotRange)
             throws AccessDeniedException,
                    DataConflictException,
                    InvalidDataException,
                    F1Exception
This will update the PivotRange with the latest information from the data source.
Throws:
AccessDeniedException - if the sheet is protected.
DataConflictException - if PivotRange is invalid.
F1Exception - if an error occurs.
InvalidDataException - if data is invalid.
Since:
11.0

setSelection

public void setSelection(Range range)
                  throws InvalidArgumentException,
                         F1Exception
Selects the specified range.
Parameters:
range - A Range object.
Throws:
java.lang.IllegalArgumentException - if the sheets specified by the Range are not in this workbook.
F1Exception - when an exception occurs
Since:
11.0
See Also:
getSelectedRange()