~fredericp/zaluum/wip-ide

« back to all changes in this revision

Viewing changes to org.zaluum.model/src/org/zaluum/model/basicbox/TimeoutBox.java

  • Committer: Frederic Perez Ordeig
  • Date: 2009-12-17 11:22:39 UTC
  • mfrom: (200.1.22 zaluum)
  • Revision ID: frederic@zaluum.com-20091217112239-qycwncx3vzyx5ai3
merged
refactored clone
fixed instantiation port ordering

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
                command.setDirect(true);
45
45
                out = new Port("out", new Point(0,0), this, false);
46
46
                out.setTypeName("TimeoutStateType");
47
 
                addPortInternal(command);
48
 
                addPortInternal(out);
49
47
                time = "1";
50
48
                setName("timeout");
51
49
        }
 
50
        public TimeoutBox(TimeoutBox c){
 
51
                super(c);
 
52
                command = new Port(c.command,this);
 
53
                out = new Port(c.out,this);
 
54
                time = c.time;
 
55
        }
52
56
        public Port getCommandPort() {
53
57
                return command;
54
58
        }
57
61
        }
58
62
        @Override
59
63
        public BoxCopyResult deepCopy() {
60
 
                TimeoutBox timeoutBox = new TimeoutBox();
 
64
                TimeoutBox timeoutBox = new TimeoutBox(this);
61
65
                BoxCopyResult r = new BoxCopyResult(timeoutBox);
62
 
                timeoutBox.setBounds(getBounds().getCopy());
63
 
                timeoutBox.setName(getName());
64
 
                timeoutBox.setTime(getTime());
65
66
                r.oldPToNewP.put(command, timeoutBox.command);
66
67
                r.oldPToNewP.put(out, timeoutBox.out);
67
68
                return r;