package de.prob2.ui.internal;

import java.util.Arrays;

import de.prob.animator.domainobjects.DynamicCommandItem;
import javafx.scene.control.ListCell;

public final class DynamicCommandItemCell extends ListCell<DynamicCommandItem> {

	public DynamicCommandItemCell() {
		super();
		getStyleClass().add("dynamic-command-cell");
	}

	@Override
	protected void updateItem(DynamicCommandItem item, boolean empty) {
		super.updateItem(item, empty);
		this.getStyleClass().removeAll(Arrays.asList("dynamiccommandenabled", "dynamiccommandenabled"));
		if (item != null && !empty) {
			setText(item.getName());
			if (item.isAvailable()) {
				getStyleClass().add("dynamiccommandenabled");
			} else {
				getStyleClass().add("dynamiccommandenabled");
			}
		}
	}
}
@@ -522,26 +522,27 @@
 namiccommand
-en
+dis
 abled%22));%0A%09%09
@@ -721,34 +721,35 @@
 (%22dynamiccommand
-en
+dis
 abled%22);%0A%09%09%09%7D%0A%09%09

Fix a bug in DynamicComandItem