private var _reports : SortedMap[Calendar, Report] = TreeMap()
private var _dirty = false
- _file match {
- case Some(file) => load(file)
- case None =>
- }
+ _file.foreach { file => load(file) }
def load(file: File) {
var reports = _reports.empty
def file = _file
def dirty = _dirty
+ def apply(n: Int) : Report =
+ // THINKME: Any better way than this?
+ _reports.values.toIndexedSeq(n)
+
def save(file: File) {
_file = Some(file); save
}
}
def getValueAt(row: Int, column: Int) : Object = {
- // THINKME: Any better way than this?
- val report = _reports.values.toIndexedSeq(row)
column match {
- case 0 => report.dateString
- case 1 => report.size : Integer
+ case 0 => this(row).dateString
+ case 1 => this(row).size : Integer
}
}
}