Added documentation, fleshed out accessors for class Timeline.
This commit is contained in:
		@@ -8,8 +8,12 @@ class TimeStamperMainController {
 | 
			
		||||
    def model
 | 
			
		||||
    def view
 | 
			
		||||
 | 
			
		||||
    def syncTimers = [:]
 | 
			
		||||
 | 
			
		||||
    void mvcGroupInit(Map args) {
 | 
			
		||||
 | 
			
		||||
        def configFile
 | 
			
		||||
        
 | 
			
		||||
        logger.traceIfEnabled("Initializing TimeStamperMain MVC...")
 | 
			
		||||
 | 
			
		||||
        def thisMVC = ['model': model, 'view': view, 'controller': this]
 | 
			
		||||
@@ -23,13 +27,13 @@ class TimeStamperMainController {
 | 
			
		||||
        // load application properties
 | 
			
		||||
        Properties prop = new Properties()
 | 
			
		||||
        String userHomeDir = System.getProperty('user.home')
 | 
			
		||||
        model.configFile = new File(userHomeDir, ".timestamperrc")
 | 
			
		||||
        if (!model.configFile.exists()) model.configFile.createNewFile()
 | 
			
		||||
        configFile = new File(userHomeDir, ".timestamperrc")
 | 
			
		||||
        if (!configFile.exists()) configFile.createNewFile()
 | 
			
		||||
 | 
			
		||||
        logger.traceIfEnabled("Reading configuration from "
 | 
			
		||||
            + "'${model.configFile.name}'")
 | 
			
		||||
            + "'${configFile.name}'")
 | 
			
		||||
 | 
			
		||||
        try { model.configFile.withInputStream { prop.load(it) } }
 | 
			
		||||
        try { configFile.withInputStream { prop.load(it) } }
 | 
			
		||||
        catch (IOException ioe) { 
 | 
			
		||||
            logger.error('Unable to load configuration', ioe)
 | 
			
		||||
        }
 | 
			
		||||
@@ -45,8 +49,9 @@ class TimeStamperMainController {
 | 
			
		||||
 | 
			
		||||
        logger.traceIfEnabled("Reading Timeline properties from '${lastUsed}'")
 | 
			
		||||
 | 
			
		||||
        File propertyFile = new File(lastUsed)
 | 
			
		||||
        if (!propertyFile.exists()) propertyFile.createNewFile()
 | 
			
		||||
        model.timelinePropertiesFile = new File(lastUsed)
 | 
			
		||||
        if (!model.timelinePropertiesFile.exists())
 | 
			
		||||
            model.timelinePropertiesFile.createNewFile()
 | 
			
		||||
 | 
			
		||||
        load(propertyFile)
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
@@ -13,7 +13,7 @@ class TimeStamperMainModel {
 | 
			
		||||
    @Bindable Timeline timeline
 | 
			
		||||
    @Bindable TimelineProperties timelineProperties
 | 
			
		||||
    Properties config
 | 
			
		||||
    File configFile
 | 
			
		||||
    File timelinePropertiesFile
 | 
			
		||||
 | 
			
		||||
    def notesDialogMVC
 | 
			
		||||
    def punchcardDialogMVC
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user