|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcsheets.ui.ctrl.UIController
public class UIController
A controller for managing the current selection, i.e. the active workbook, spreadsheet and cell, as well as for keeping track of modifications to workbooks and of user interface extensions.
| Nested Class Summary | |
|---|---|
static class |
UIController.EventDispatcher
A utility for dispatching events on the AWT event dispatching thread. |
| Constructor Summary | |
|---|---|
UIController(CleanSheets app)
Creates a new user interface controller. |
|
| Method Summary | |
|---|---|
void |
addEditListener(EditListener listener)
Registers the given listener on the user interface controller. |
void |
addSelectionListener(SelectionListener listener)
Registers the given listener on the user interface controller. |
Cell |
getActiveCell()
Returns the active cell of the active workbook's active spreadsheet. |
Spreadsheet |
getActiveSpreadsheet()
Returns the active spreadsheet. |
Workbook |
getActiveWorkbook()
Returns the active workbook. |
TransferHandler |
getCellTransferHandler()
Returns the transfer haandler used to transfer ranges of cells. |
UIExtension[] |
getExtensions()
Returns the user interface extensions that have been loaded. |
Properties |
getUserProperties()
Returns the current user properties. |
boolean |
isActiveWorkbookModified()
Returns whether the active workbook has been modified. |
boolean |
isWorkbookModified(Workbook workbook)
Returns whether the given workbook has been modified. |
void |
removeEditListener(EditListener listener)
Removes the given listener from the user interface controller. |
void |
removeSelectionListener(SelectionListener listener)
Removes the given listener from the user interface controller. |
void |
setActiveCell(Cell cell)
Sets the active cell of the application, and thereby also the active spreadsheet and workbook. |
void |
setActiveSpreadsheet(Spreadsheet spreadsheet)
Sets the active spreadsheet of the application, and thereby also the active workbook. |
void |
setActiveWorkbook(Workbook workbook)
Sets the given workbook of the application. |
void |
setWorkbookModified(Workbook workbook)
Specifies whether the given workbook has been modified. |
void |
workbookCreated(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a new workbook has been created. |
void |
workbookLoaded(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a workbook has been loaded from the given file. |
void |
workbookSaved(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a workbook was saved to the given file. |
void |
workbookUnloaded(SpreadsheetAppEvent event)
Invoked by the spreadsheet application to indicate that a workbook has been unloaded (closed). |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UIController(CleanSheets app)
app - the CleanSheets application| Method Detail |
|---|
public Workbook getActiveWorkbook()
public void setActiveWorkbook(Workbook workbook)
workbook - the workbook to usepublic Spreadsheet getActiveSpreadsheet()
public void setActiveSpreadsheet(Spreadsheet spreadsheet)
spreadsheet - the spreadsheet to usepublic Cell getActiveCell()
public void setActiveCell(Cell cell)
cell - the cell to usepublic boolean isActiveWorkbookModified()
public boolean isWorkbookModified(Workbook workbook)
public void setWorkbookModified(Workbook workbook)
workbook - the relevant workbookpublic TransferHandler getCellTransferHandler()
public Properties getUserProperties()
public UIExtension[] getExtensions()
public void workbookCreated(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookCreated in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void workbookLoaded(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookLoaded in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void workbookUnloaded(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookUnloaded in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void workbookSaved(SpreadsheetAppEvent event)
SpreadsheetAppListener
workbookSaved in interface SpreadsheetAppListenerevent - the spreadsheet application event that occuredpublic void addSelectionListener(SelectionListener listener)
listener - the listener to be addedpublic void removeSelectionListener(SelectionListener listener)
listener - the listener to be removedpublic void addEditListener(EditListener listener)
listener - the listener to be addedpublic void removeEditListener(EditListener listener)
listener - the listener to be removed
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||