Package com.cburch.logisim.file

Examples of com.cburch.logisim.file.ToolbarData


    items = Collections.emptyList();
    haloedTool = null;
    buildContents();

    // set up listeners
    ToolbarData data = proj.getOptions().getToolbarData();
    data.addToolbarListener(myListener);
    data.addToolAttributeListener(myListener);
    AppPreferences.GATE_SHAPE.addPropertyChangeListener(myListener);
    proj.addProjectListener(myListener);
  }
View Full Code Here


 
  private void buildContents() {
    List<ToolbarItem> oldItems = items;
    List<ToolbarItem> newItems = new ArrayList<ToolbarItem>();
    int pos = -1;
    ToolbarData data = proj.getLogisimFile().getOptions().getToolbarData();
    for (Tool tool : data.getContents()) {
      ++pos;
      if (tool == null) {
        newItems.add(new ToolbarSeparator(4));
      } else {
        ToolbarItem i = findItem(oldItems, tool);
View Full Code Here

      if (act == ProjectEvent.ACTION_SET_TOOL) {
        fireToolbarAppearanceChanged();
      } else if (act == ProjectEvent.ACTION_SET_FILE) {
        LogisimFile old = (LogisimFile) e.getOldData();
        if (old != null) {
          ToolbarData data = old.getOptions().getToolbarData();
          data.removeToolbarListener(this);
          data.removeToolAttributeListener(this);
        }
        LogisimFile file = (LogisimFile) e.getData();
        if (file != null) {
          ToolbarData data = file.getOptions().getToolbarData();
          data.addToolbarListener(this);
          data.addToolAttributeListener(this);
        }
        buildContents();
      }
    }
View Full Code Here

    }
   
    private void doMove(int delta) {
      int oldIndex = list.getSelectedIndex();
      int newIndex = oldIndex + delta;
      ToolbarData data = getOptions().getToolbarData();
      if (oldIndex >= 0 && newIndex >= 0 && newIndex < data.size()) {
        getProject().doAction(ToolbarActions.moveTool(data,
            oldIndex, newIndex));
        list.setSelectedIndex(newIndex);
      }
    }
View Full Code Here

        items = Collections.emptyList();
        haloedTool = null;
        buildContents();

        // set up listeners
        ToolbarData data = proj.getOptions().getToolbarData();
        data.addToolbarListener(myListener);
        data.addToolAttributeListener(myListener);
        AppPreferences.GATE_SHAPE.addPropertyChangeListener(myListener);
        proj.addProjectListener(myListener);
    }
View Full Code Here

    private void buildContents() {
        List<ToolbarItem> oldItems = items;
        List<ToolbarItem> newItems = new ArrayList<ToolbarItem>();
        int pos = -1;
        ToolbarData data = proj.getLogisimFile().getOptions().getToolbarData();
        for (Tool tool : data.getContents()) {
            ++pos;
            if (tool == null) {
                newItems.add(new ToolbarSeparator(4));
            } else {
                ToolbarItem i = findItem(oldItems, tool);
View Full Code Here

            if (act == ProjectEvent.ACTION_SET_TOOL) {
                fireToolbarAppearanceChanged();
            } else if (act == ProjectEvent.ACTION_SET_FILE) {
                LogisimFile old = (LogisimFile) e.getOldData();
                if (old != null) {
                    ToolbarData data = old.getOptions().getToolbarData();
                    data.removeToolbarListener(this);
                    data.removeToolAttributeListener(this);
                }
                LogisimFile file = (LogisimFile) e.getData();
                if (file != null) {
                    ToolbarData data = file.getOptions().getToolbarData();
                    data.addToolbarListener(this);
                    data.addToolAttributeListener(this);
                }
                buildContents();
            }
        }
View Full Code Here

        }

        private void doMove(int delta) {
            int oldIndex = list.getSelectedIndex();
            int newIndex = oldIndex + delta;
            ToolbarData data = getOptions().getToolbarData();
            if (oldIndex >= 0 && newIndex >= 0 && newIndex < data.size()) {
                getProject().doAction(ToolbarActions.moveTool(data,
                        oldIndex, newIndex));
                list.setSelectedIndex(newIndex);
            }
        }
View Full Code Here

TOP

Related Classes of com.cburch.logisim.file.ToolbarData

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.