Implemented painter concept

This commit is contained in:
2015-01-20 18:50:15 +01:00
parent c9da1c3e75
commit 5f5bfbd792
58 changed files with 1915 additions and 1077 deletions

View File

@ -0,0 +1,32 @@
package com.minres.scviewer.database.text;
import com.minres.scviewer.database.ITx;
import com.minres.scviewer.database.ITxEvent;
import com.minres.scviewer.database.IWaveformEvent;
class TxEvent implements ITxEvent {
final ITxEvent.Type type;
Tx transaction;
TxEvent(ITxEvent.Type type, ITx transaction) {
super();
this.type = type;
this.transaction = transaction;
}
@Override
IWaveformEvent duplicate() throws CloneNotSupportedException {
new TxEvent(type, transaction, time)
}
@Override
int compareTo(IWaveformEvent o) {
time.compareTo(o.getTime())
}
Long getTime(){
return type==ITxEvent.Type.BEGIN?transaction.beginTime:transaction.endTime
}
}