Package com.cburch.logisim.comp

Examples of com.cburch.logisim.comp.EndData


        ArrayList<EndData> endsChangedOld = null;
        ArrayList<EndData> endsChangedNew = null;
        Iterator<Port> pit = ports.iterator();
        for (int i = 0; pit.hasNext() || i < esOldLength; i++) {
            Port p = pit.hasNext() ? pit.next() : null;
            EndData oldEnd = i < esOldLength ? esOld[i] : null;
            EndData newEnd = p == null ? null : p.toEnd(loc, attrs);
            if (oldEnd == null || !oldEnd.equals(newEnd)) {
                if (newEnd != null) {
                    es[i] = newEnd;
                }
View Full Code Here


    }

    public EndData toEnd(Location loc, AttributeSet attrs) {
        Location pt = loc.translate(dx, dy);
        if (widthFixed != null) {
            return new EndData(pt, widthFixed, type, exclude);
        } else {
            Object val = attrs.getValue(widthAttr);
            if (!(val instanceof BitWidth)) {
                throw new IllegalArgumentException("Width attribute not set");
            }
            return new EndData(pt, (BitWidth) val, type, exclude);
        }
    }
View Full Code Here

        int y = origin.getY() + parms.getEnd0Y();
        int dx = parms.getEndToEndDeltaX();
        int dy = parms.getEndToEndDeltaY();

        EndData[] ends = new EndData[fanout + 1];
        ends[0] = new EndData(origin, BitWidth.create(bit_end.length), EndData.INPUT_OUTPUT);
        for (int i = 0; i < fanout; i++) {
            ends[i + 1] = new EndData(Location.create(x, y),
                    BitWidth.create(end_width[i + 1]), EndData.INPUT_OUTPUT);
            x += dx;
            y += dy;
        }
        wire_data = new CircuitWires.SplitterData(fanout);
View Full Code Here

        return component.getAttributeSet().getValue(attr);
    }

    @Override
    public Value getPort(int portIndex) {
        EndData data = component.getEnd(portIndex);
        return circuitState.getValue(data.getLocation());
    }
View Full Code Here

        return circ.isConnected(loc, component);
    }

    @Override
    public void setPort(int portIndex, Value value, int delay) {
        EndData end = component.getEnd(portIndex);
        circuitState.setValue(end.getLocation(), value, component, delay);
    }
View Full Code Here

    }

    @Override
    public EndData getEnd(int index) {
        Location loc = getEndLocation(index);
        return new EndData(loc, BitWidth.UNKNOWN,
                EndData.INPUT_OUTPUT);
    }
View Full Code Here

TOP

Related Classes of com.cburch.logisim.comp.EndData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.