com.f1j.ss
Interface BookView


public interface BookView
extends Lockable

An object representing a view state for a workbook. "View state" refers to settings such as active sheet, selected cells, etc.

Each user interface component such as a JBook contains a BookView object. When multiple components have views into the same workbook, each one has a unique BookView object; so each has its own view state maintained independently of the others, even though the underlying workbook is the same.

In the present version, the API for setting or retrieving view information is the BookModel interface.

In a future version, BookView will replace BookModel as the preferred API for manipulating a workbook's view state.

Since:
12.0
See Also:
BookModel.getBookView(), BookModel.Factory.fromBookView(BookView), ViewContainer

Method Summary
 Sheet getActiveSheet()
           
 SheetView getActiveSheetView()
           
 Book getBook()
           
 int getSelectedSheetCount()
           
 SheetView getSheetView(int sheetIndex)
          Returns the SheetView associated with the sheet at the specified index.
 SheetView getSheetView(Sheet sheet)
          Returns the SheetView associated with the specified sheet.
 
Methods inherited from interface com.f1j.util.Lockable
getLock, releaseLock
 

Method Detail

getSelectedSheetCount

public int getSelectedSheetCount()
Returns:
The number of selected sheets in this view.
Since:
12.0
See Also:
SheetView.isSheetSelected()

getActiveSheet

public Sheet getActiveSheet()
Returns:
The active sheet in this view.
Since:
12.0
See Also:
getActiveSheetView()

getActiveSheetView

public SheetView getActiveSheetView()
Returns:
The SheetView for the active sheet.
Since:
12.0
See Also:
getActiveSheet()

getBook

public Book getBook()
Returns:
The Book associated with this BookView.
Since:
12.0

getSheetView

public SheetView getSheetView(Sheet sheet)
                       throws InvalidArgumentException
Returns the SheetView associated with the specified sheet.
Parameters:
sheet - The sheet for which to return a SheetView.
Returns:
The SheetView associated with sheet.
Throws:
InvalidArgumentException - if sheet is not part of this view's workbook.
Since:
12.0
See Also:
getSheetView(int)

getSheetView

public SheetView getSheetView(int sheetIndex)
                       throws com.f1j.util.InvalidIndexException
Returns the SheetView associated with the sheet at the specified index.
Parameters:
sheetIndex - The index of the sheet for which to return a SheetView.
Returns:
The SheetView associated with the specified sheet.
Throws:
com.f1j.util.InvalidIndexException - if sheetIndex is not valid.
Since:
12.0
See Also:
getSheetView(int)