clickDetector.offlineFuncs
Interface OfflineStore


public interface OfflineStore

Interface for offline click storage - may be one file, or many and may also end up supporting different types of click file.

Author:
Doug Gillespie

Method Summary
 javax.swing.JButton[] getCommandButtons()
          Get buttons to insert into the front of the offline toolbar
 java.io.File getCurrentFile()
           
 java.io.File[] getFolderFiles()
          Get a list of files in the same folder as the current file (where the store is file based !)
 java.lang.String getName()
          Get the store name - probably the name of a fiel, folder or database.
 float getSampleRate()
           
 long getStartTimeMillis()
           
 long getTotalMillisNoGaps()
          Get the total length of concatonated data.
 long getTotalMillisWithGaps()
          Get the total length of the data
 boolean isOpen()
          Is the store open ?
 void openFile(java.io.File file)
          Open a file.
 boolean openMenuOptions()
           
 int readAllClicks()
          Read all clicks in the store.
 void readClicks(long startTime, long endTime)
          Read clicks between the two time limits
 boolean saveClicks()
          Save any clicks in memory which indicate that they need saving
 

Method Detail

openMenuOptions

boolean openMenuOptions()

getCommandButtons

javax.swing.JButton[] getCommandButtons()
Get buttons to insert into the front of the offline toolbar

Returns:
array of buttons. Null buttons will be put in as a separator.
See Also:
OfflineToolbar

getStartTimeMillis

long getStartTimeMillis()
Returns:
the data start time using the standard Java millisecond clock

getTotalMillisWithGaps

long getTotalMillisWithGaps()
Get the total length of the data

Returns:
time in millis

getTotalMillisNoGaps

long getTotalMillisNoGaps()
Get the total length of concatonated data. If the data has breaks in it, then this will be less than getTotalMilliswithGaps();

Returns:
time in millis.

getName

java.lang.String getName()
Get the store name - probably the name of a fiel, folder or database.

Returns:
name

getSampleRate

float getSampleRate()

readClicks

void readClicks(long startTime,
                long endTime)
Read clicks between the two time limits

Parameters:
startTime - Java milliseconds
endTime - Java milliseconds

readAllClicks

int readAllClicks()
Read all clicks in the store.

Returns:
number of clicks read

saveClicks

boolean saveClicks()
Save any clicks in memory which indicate that they need saving

Returns:
true if saved, or save not needed. False if a problem.

isOpen

boolean isOpen()
Is the store open ?

Returns:
true if the store is open.

getFolderFiles

java.io.File[] getFolderFiles()
Get a list of files in the same folder as the current file (where the store is file based !)

Returns:
Array of files.

openFile

void openFile(java.io.File file)
Open a file.

Parameters:
file - file to open

getCurrentFile

java.io.File getCurrentFile()
Returns:
Current open file.