|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlogbook.storage.utils.LogBookController
public class LogBookController
Probably the most important object in the whole app. Definitely the most important controller object. This is the MASTER Controller!! Through this class, you can get to pretty much any other class in the application that you want to
| Method Summary | |
|---|---|
void |
addLogBookRec(LogBookRecord pRec)
Adds a logbook record to the database and updates the application views |
void |
configureItemsRequiringRowSelection()
look at each table in the display |
void |
deleteLogBookRec(int pLogBkRecIndex)
NOTE: THIS WILL BREAK ONCE YOU START SORTING THE TABLE VIEW ON DIFFERENCT COLUMNS!! TODO: PASS IN THE RECORD AS A PARAM LIKE editLogBookRec() is doing!! so you can get the primary key!! |
void |
editLogBookRec(LogBookRecord pRec)
Edits a logbook record in the database and updates the applications views |
static LogBookController |
getInstance()
Singleton global access point |
LogBook |
getLogBook()
Gets the users current/active logbook |
LgBkRecordsTable |
getTableDisplay()
Deprecated. |
boolean |
hasUnsavedChanges()
Returns true if the current, active logbook has unsaved changes |
static void |
setHasUnsavedChanges(boolean pHasUnsavedChanges)
Sets true or false if the current active logbook has unsaved changes NOTE: to keep stuff simple -- you should only set a file dirty whenever RECORDS RECORDS RECORDS!!!! are added, updated or deleted --> So don't set a file dirty when creating, closing or importing a logbook The file should only be set clean whenever the logbook is saved and whenever a logbook is created, edited, closed or imported (all covered by the setLogbook() method |
void |
setLogBook(LogBook pLogBk)
Sets the current logbook and updates application views TIP: pass in null to "close" a logbook TIP: pass in "new Logbook()" to create a logbook Useful when loading(deserializing) a .lbk file or when parsing in a .csv file. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static LogBookController getInstance()
public LgBkRecordsTable getTableDisplay()
public void configureItemsRequiringRowSelection()
public void setLogBook(LogBook pLogBk)
pLogBk - The LogBook to set activepublic LogBook getLogBook()
public void addLogBookRec(LogBookRecord pRec)
throws java.io.IOException
pRec - The record to add
TODO create a LogBook.add(LgBkRec) method and do that first then
refresh views, then update the db in a worker thread
java.io.IOExceptionpublic void editLogBookRec(LogBookRecord pRec)
pRec - The record to editpublic void deleteLogBookRec(int pLogBkRecIndex)
pLogBkRecIndex - The record to deletepublic boolean hasUnsavedChanges()
public static void setHasUnsavedChanges(boolean pHasUnsavedChanges)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||