Package com.cburch.logisim.data

Examples of com.cburch.logisim.data.AttributeEvent


    while (ait.hasNext()) {
      Object a = ait.next();
      vit.next();
      if (a.equals(attr)) {
        vit.set(value);
        AttributeEvent e = new AttributeEvent(this, attr, value);
        for (AttributeListener listener : listeners) {
          listener.attributeValueChanged(e);
        }
        if (attr == DrawAttr.PAINT_TYPE) {
          e = new AttributeEvent(this);
          for (AttributeListener listener : listeners) {
            listener.attributeListChanged(e);
          }
        }
        return;
View Full Code Here


  public <V> void setValue(Attribute<V> attr, V value) {
    getBase().setValue(attr, value);
  }

  public void attributeListChanged(AttributeEvent baseEvent) {
    AttributeEvent e = null;
    for (AttributeListener l : listeners) {
      if (e == null) {
        e = new AttributeEvent(this, baseEvent.getAttribute(),
            baseEvent.getValue());
      }
      l.attributeListChanged(e);
    }
  }
View Full Code Here

      l.attributeListChanged(e);
    }
  }

  public void attributeValueChanged(AttributeEvent baseEvent) {
    AttributeEvent e = null;
    for (AttributeListener l : listeners) {
      if (e == null) {
        e = new AttributeEvent(this, baseEvent.getAttribute(),
            baseEvent.getValue());
      }
      l.attributeValueChanged(e);
    }
  }
View Full Code Here

  public final <V> void setValue(Attribute<V> attr, V value) {
    Object old = getValue(attr);
    boolean same = old == null ? value == null : old.equals(value);
    if (!same) {
      updateValue(attr, value);
      AttributeEvent e = new AttributeEvent(this, attr, value);
      for (AttributeListener listener : listeners) {
        listener.attributeValueChanged(e);
      }
    }
  }
View Full Code Here

      }
    }
  }
 
  protected void fireAttributeListChanged() {
    AttributeEvent e = new AttributeEvent(this);
    for (AttributeListener listener : listeners) {
      listener.attributeListChanged(e);
    }
  }
View Full Code Here

        while (ait.hasNext()) {
            Object a = ait.next();
            vit.next();
            if (a.equals(attr)) {
                vit.set(value);
                AttributeEvent e = new AttributeEvent(this, attr, value);
                for (AttributeListener listener : listeners) {
                    listener.attributeValueChanged(e);
                }
                if (attr == DrawAttr.PAINT_TYPE) {
                    e = new AttributeEvent(this);
                    for (AttributeListener listener : listeners) {
                        listener.attributeListChanged(e);
                    }
                }
                return;
View Full Code Here

    public final <V> void setValue(Attribute<V> attr, V value) {
        Object old = getValue(attr);
        boolean same = old == null ? value == null : old.equals(value);
        if (!same) {
            updateValue(attr, value);
            AttributeEvent e = new AttributeEvent(this, attr, value);
            for (AttributeListener listener : listeners) {
                listener.attributeValueChanged(e);
            }
        }
    }
View Full Code Here

            }
        }
    }

    protected void fireAttributeListChanged() {
        AttributeEvent e = new AttributeEvent(this);
        for (AttributeListener listener : listeners) {
            listener.attributeListChanged(e);
        }
    }
View Full Code Here

        getBase().setValue(attr, value);
    }

    @Override
    public void attributeListChanged(AttributeEvent baseEvent) {
        AttributeEvent e = null;
        for (AttributeListener l : listeners) {
            if (e == null) {
                e = new AttributeEvent(this, baseEvent.getAttribute(),
                        baseEvent.getValue());
            }
            l.attributeListChanged(e);
        }
    }
View Full Code Here

        }
    }

    @Override
    public void attributeValueChanged(AttributeEvent baseEvent) {
        AttributeEvent e = null;
        for (AttributeListener l : listeners) {
            if (e == null) {
                e = new AttributeEvent(this, baseEvent.getAttribute(),
                        baseEvent.getValue());
            }
            l.attributeValueChanged(e);
        }
    }
View Full Code Here

TOP

Related Classes of com.cburch.logisim.data.AttributeEvent

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.