~fredericp/zaluum/wip-ide

« back to all changes in this revision

Viewing changes to org.zaluum.model/src/org/zaluum/model/basicbox/WriteBox.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:
43
43
                address = "";
44
44
                setName("write");
45
45
        }
 
46
        public WriteBox(WriteBox c){
 
47
                super(c);
 
48
                address = c.address;
 
49
                size = c.size;
 
50
        }
46
51
 
47
52
        @PropertyAnnotation(name = "Address", comment = "Address of the first input")
48
53
        public void setAddress(String address) {
56
61
 
57
62
        @Override
58
63
        public BoxCopyResult deepCopy() {
59
 
                WriteBox newBox = new WriteBox();
60
 
                newBox.setBounds(getBounds().getCopy());
61
 
                newBox.setName(getName());
62
 
                newBox.address = address;
63
 
                newBox.size = size;
 
64
                WriteBox newBox = new WriteBox(this);
64
65
                return copyPorts(newBox);
65
66
        }
66
67
 
75
76
                                Port p = new Port("I" + i, new Point(0, 0), this, true);
76
77
                                p.setDirect(true);
77
78
                                p.setTypeName("int");
78
 
                                addPortInternal(p);
79
79
                        }
80
80
                        this.size = isize;
81
81
                        setBounds(new Rectangle(getBounds().getTopLeft().getCopy(), new Point(