Package com.cburch.logisim.data

Examples of com.cburch.logisim.data.AttributeSet.addAttributeListener()


    }

    static AttributeSet createBaseAttrs(Circuit source, String name) {
        AttributeSet ret = AttributeSets.fixedSet(STATIC_ATTRS, STATIC_DEFAULTS);
        ret.setValue(CircuitAttributes.NAME_ATTR, name);
        ret.addAttributeListener(new StaticListener(source));
        return ret;
    }

    private Circuit source;
    private Instance subcircInstance;
View Full Code Here


    public void addToolAttributeListener(AttributeListener l) {
        for (Tool tool : contents) {
            if (tool != null) {
                AttributeSet attrs = tool.getAttributeSet();
                if (attrs != null) attrs.addAttributeListener(l);
            }
        }
        toolListeners.add(l);
    }
View Full Code Here

    }

    private void addAttributeListeners(Tool tool) {
        for (AttributeListener l : toolListeners) {
            AttributeSet attrs = tool.getAttributeSet();
            if (attrs != null) attrs.addAttributeListener(l);
        }
    }

    private void removeAttributeListeners(Tool tool) {
        for (AttributeListener l : toolListeners) {
View Full Code Here

                }
            } else if (action == LibraryEvent.ADD_TOOL) {
                Tool tool = (Tool) event.getData();
                AttributeSet attrs = tool.getAttributeSet();
                if (attrs != null) {
                    attrs.addAttributeListener(this);
                }

            } else if (action == LibraryEvent.REMOVE_TOOL) {
                Tool tool = (Tool) event.getData();
                AttributeSet attrs = tool.getAttributeSet();
View Full Code Here

                ((LibraryEventSource) lib).addLibraryListener(this);
            }
            for (Tool tool : lib.getTools()) {
                AttributeSet attrs = tool.getAttributeSet();
                if (attrs != null) {
                    attrs.addAttributeListener(this);
                }

            }
        }
View Full Code Here

            }
            if (fact == null) {
                ret = AttributeSets.EMPTY;
            } else {
                ret = fact.createAttributeSet();
                ret.addAttributeListener(this);
            }
            baseAttrs = ret;
        }
        return ret;
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.