Examples of addAttributeListener()


Examples of com.cburch.draw.shapes.Text.addAttributeListener()

    }
    field.requestFocus();
   
    canvas.getSelection().setSelected(clicked, true);
    canvas.getSelection().setHidden(Collections.singleton(clicked), true);
    clicked.addAttributeListener(fieldListener);
    canvas.repaint();
  }
 
  @Override
  public void zoomFactorChanged(Canvas canvas) {
View Full Code Here

Examples of com.cburch.draw.shapes.Text.addAttributeListener()

        }
        field.requestFocus();

        canvas.getSelection().setSelected(clicked, true);
        canvas.getSelection().setHidden(Collections.singleton(clicked), true);
        clicked.addAttributeListener(fieldListener);
        canvas.repaint();
    }

    @Override
    public void zoomFactorChanged(Canvas canvas) {
View Full Code Here

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

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

        LogisimFile old = (LogisimFile) event.getOldData();
        if (old != null) old.getOptions().getAttributeSet().removeAttributeListener(this);
        LogisimFile file = (LogisimFile) event.getData();
        if (file != null) {
          AttributeSet attrs = file.getOptions().getAttributeSet();
          attrs.addAttributeListener(this);
          loadOptions(attrs);
          mappings = file.getOptions().getMouseMappings();
        }
      } else if (act == ProjectEvent.ACTION_SET_TOOL) {
        viewport.setErrorMessage(null, null);
View Full Code Here

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

 
  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

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

  }

  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

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

    proj.getSimulator().addSimulatorListener(tickCounter);
    selection.addListener(myProjectListener);
    LocaleManager.addLocaleListener(this);

    AttributeSet options = proj.getOptions().getAttributeSet();
    options.addAttributeListener(myProjectListener);
    AppPreferences.COMPONENT_TIPS.addPropertyChangeListener(myListener);
    AppPreferences.GATE_SHAPE.addPropertyChangeListener(myListener);
    AppPreferences.SHOW_TICK_RATE.addPropertyChangeListener(myListener);
    loadOptions(options);
    paintThread.start();
View Full Code Here

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

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

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

          removeLibrary((Library) event.getData());
        }
      } 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();
        if (attrs != null) attrs.removeAttributeListener(this);
      }
View Full Code Here

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

      if (lib instanceof LibraryEventSource) {
        ((LibraryEventSource) lib).addLibraryListener(this);
      }
      for (Tool tool : lib.getTools()) {
        AttributeSet attrs = tool.getAttributeSet();
        if (attrs != null) attrs.addAttributeListener(this);
      }
    }
   
    private void removeLibrary(Library lib) {
      if (lib instanceof LibraryEventSource) {
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.