Search in sources :

Example 1 with ToolbarModel

use of com.cburch.draw.toolbar.ToolbarModel in project logisim-evolution by reds-heig.

the class KeyboardToolSelection method actionPerformed.

public void actionPerformed(ActionEvent event) {
    ToolbarModel model = toolbar.getToolbarModel();
    int i = -1;
    for (ToolbarItem item : model.getItems()) {
        if (item.isSelectable()) {
            i++;
            if (i == index) {
                model.itemSelected(item);
            }
        }
    }
}
Also used : ToolbarItem(com.cburch.draw.toolbar.ToolbarItem) ToolbarModel(com.cburch.draw.toolbar.ToolbarModel)

Aggregations

ToolbarItem (com.cburch.draw.toolbar.ToolbarItem)1 ToolbarModel (com.cburch.draw.toolbar.ToolbarModel)1