~cpn-gui/tapaal/transportArc

« back to all changes in this revision

Viewing changes to src/dk/aau/cs/model/tapn/Colored/ColoredTimeInterval.java

  • Committer: Mark Glavind
  • Date: 2019-03-13 14:11:55 UTC
  • Revision ID: mglavi14@student.aau.dk-20190313141155-236fi45zomgojr11
changed coloredTransport label to reflect TACPN and updated toString for colored time constraints

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
 
32
32
    @Override
33
33
   public String toString() {
34
 
        String foo = super.toString();
 
34
        String print = "";
35
35
        if (color != null) {
36
 
            return foo + ", " + color.getColorName();
37
 
        } else
38
 
            return foo;
 
36
            if (color.getTuple() != null) {
 
37
                for (Color color1 : color.getTuple()) {
 
38
                    print += color1.getColorName() + ", ";
 
39
                }
 
40
                print.substring(0, print.length()-2);
 
41
                print += " \u2192 " + super.toString();
 
42
                return print;
 
43
            } else {
 
44
                print += color.getColorName() + " \u2192 " + super.toString();
 
45
                return print;
 
46
            }
 
47
        } else {
 
48
            print += super.toString();
 
49
            return print;
 
50
        }
39
51
    }
40
52
 
41
53
    @Override