remove ITxGenerator interface
This commit is contained in:
parent
ee5536f1b5
commit
888edf32be
@ -28,7 +28,6 @@ import com.minres.scviewer.database.sqlite.tables.ScvTxEvent;
|
||||
import com.minres.scviewer.database.sqlite.tables.ScvTxRelation;
|
||||
import com.minres.scviewer.database.tx.ITx;
|
||||
import com.minres.scviewer.database.tx.ITxAttribute;
|
||||
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||
import com.minres.scviewer.database.tx.ITxRelation;
|
||||
|
||||
public class Tx implements ITx {
|
||||
@ -61,7 +60,7 @@ public class Tx implements ITx {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ITxGenerator getGenerator() {
|
||||
public IWaveform getGenerator() {
|
||||
return trGenerator;
|
||||
}
|
||||
|
||||
|
@ -22,9 +22,8 @@ import com.minres.scviewer.database.sqlite.db.SQLiteDatabaseSelectHandler;
|
||||
import com.minres.scviewer.database.sqlite.tables.ScvGenerator;
|
||||
import com.minres.scviewer.database.sqlite.tables.ScvTx;
|
||||
import com.minres.scviewer.database.tx.ITx;
|
||||
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||
|
||||
public class TxGenerator extends AbstractTxStream implements ITxGenerator {
|
||||
public class TxGenerator extends AbstractTxStream {
|
||||
|
||||
private TxStream stream;
|
||||
|
||||
@ -44,11 +43,6 @@ public class TxGenerator extends AbstractTxStream implements ITxGenerator {
|
||||
return (long) scvGenerator.getId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public IWaveform getStream() {
|
||||
return stream;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return scvGenerator.getName();
|
||||
|
@ -26,7 +26,6 @@ import com.minres.scviewer.database.sqlite.tables.ScvGenerator;
|
||||
import com.minres.scviewer.database.sqlite.tables.ScvStream;
|
||||
import com.minres.scviewer.database.sqlite.tables.ScvTx;
|
||||
import com.minres.scviewer.database.tx.ITx;
|
||||
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||
|
||||
public class TxStream extends AbstractTxStream {
|
||||
|
||||
@ -54,7 +53,7 @@ public class TxStream extends AbstractTxStream {
|
||||
return (long) scvStream.getId();
|
||||
}
|
||||
|
||||
public List<ITxGenerator> getGenerators() {
|
||||
public List<IWaveform> getGenerators() {
|
||||
if(generators==null){
|
||||
SQLiteDatabaseSelectHandler<ScvGenerator> handler = new SQLiteDatabaseSelectHandler<>(
|
||||
ScvGenerator.class, database, "stream="+scvStream.getId());
|
||||
|
@ -19,7 +19,6 @@ import java.util.stream.Collectors;
|
||||
import com.minres.scviewer.database.IWaveform;
|
||||
import com.minres.scviewer.database.tx.ITx;
|
||||
import com.minres.scviewer.database.tx.ITxAttribute;
|
||||
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||
import com.minres.scviewer.database.tx.ITxRelation;
|
||||
|
||||
/**
|
||||
@ -171,7 +170,7 @@ class Tx implements ITx {
|
||||
* @return the generator
|
||||
*/
|
||||
@Override
|
||||
public ITxGenerator getGenerator() {
|
||||
public IWaveform getGenerator() {
|
||||
return loader.txGenerators.get(generatorId);
|
||||
}
|
||||
|
||||
|
@ -15,12 +15,11 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import com.minres.scviewer.database.IWaveform;
|
||||
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||
|
||||
/**
|
||||
* The Class TxGenerator.
|
||||
*/
|
||||
class TxGenerator extends AbstractTxStream implements ITxGenerator {
|
||||
class TxGenerator extends AbstractTxStream {
|
||||
|
||||
/** The stream. */
|
||||
TxStream stream;
|
||||
@ -45,16 +44,6 @@ class TxGenerator extends AbstractTxStream implements ITxGenerator {
|
||||
stream.addChild(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the stream.
|
||||
*
|
||||
* @return the stream
|
||||
*/
|
||||
@Override
|
||||
public IWaveform getStream() {
|
||||
return stream;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if is same.
|
||||
*
|
||||
|
@ -29,7 +29,6 @@ import com.minres.scviewer.database.IWaveform;
|
||||
import com.minres.scviewer.database.RelationType;
|
||||
import com.minres.scviewer.database.tx.ITx;
|
||||
import com.minres.scviewer.database.tx.ITxEvent;
|
||||
import com.minres.scviewer.database.tx.ITxGenerator;
|
||||
import com.minres.scviewer.database.tx.ITxRelation;
|
||||
import com.minres.scviewer.database.ui.WaveformColors;
|
||||
|
||||
@ -118,7 +117,7 @@ public class ArrowPainter implements IPainter {
|
||||
return;
|
||||
} else {
|
||||
for(IHierNode gen:otherTx.getStream().getChildNodes()) {
|
||||
if(gen instanceof ITxGenerator) {
|
||||
if(gen instanceof IWaveform) {
|
||||
bb = createLinkEntry(otherTx, (IWaveform) gen);
|
||||
if(bb!=null){
|
||||
res.add(new LinkEntry(bb, iTxRelation.getRelationType()));
|
||||
@ -135,7 +134,7 @@ public class ArrowPainter implements IPainter {
|
||||
IWaveformPainter painter = waveCanvas.wave2painterMap.get(otherTx.getStream());
|
||||
if(painter==null) {
|
||||
for(IHierNode gen:otherTx.getStream().getChildNodes()) {
|
||||
if(gen instanceof ITxGenerator) {
|
||||
if(gen instanceof IWaveform) {
|
||||
painter = waveCanvas.wave2painterMap.get(gen);
|
||||
if(painter!=null)
|
||||
break;
|
||||
|
@ -12,6 +12,7 @@ package com.minres.scviewer.database;
|
||||
|
||||
import java.util.NavigableMap;
|
||||
|
||||
// TODO: Auto-generated Javadoc
|
||||
/**
|
||||
* The Interface IWaveform.
|
||||
*
|
||||
@ -78,5 +79,8 @@ public interface IWaveform extends IHierNode {
|
||||
*/
|
||||
public int getRowCount();
|
||||
|
||||
/**
|
||||
* Calculate the concurrency (th enumber of parallel ongoing events) of the waveform.
|
||||
*/
|
||||
public void calculateConcurrency();
|
||||
}
|
||||
|
@ -39,7 +39,7 @@ public interface ITx extends Comparable<ITx> {
|
||||
*
|
||||
* @return the generator
|
||||
*/
|
||||
public ITxGenerator getGenerator();
|
||||
public IWaveform getGenerator();
|
||||
|
||||
/**
|
||||
* Gets the begin time.
|
||||
|
@ -1,27 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2015-2021 MINRES Technologies GmbH and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* MINRES Technologies GmbH - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package com.minres.scviewer.database.tx;
|
||||
|
||||
import com.minres.scviewer.database.IWaveform;
|
||||
|
||||
/**
|
||||
* The Interface ITxGenerator.
|
||||
*/
|
||||
public interface ITxGenerator extends IWaveform {
|
||||
|
||||
/**
|
||||
* Gets the stream.
|
||||
*
|
||||
* @return the stream
|
||||
*/
|
||||
public IWaveform getStream();
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user