private void changeItem(SequenceItem item) { if (item.color != null) LEDCubeManager.setPaintColor(item.color); if (item.clear) { LEDManager ledManager = LEDCubeManager.getLEDManager(); Dimension3D dim = ledManager.getDimensions(); for (int x = 0; x < dim.x; x++) { for (int y = 0; y < dim.y; y++) { for (int z = 0; z < dim.z; z++) { ledManager.setLEDColor(x, y, z, new Color()); } } } } Animation anim = LEDCubeManager.getLEDCube().getAnimationByClassName("Animation" + item.animation); if (anim != null) { LEDCubeManager.getLEDCube().getCommThread().setCurrentAnimation(anim); LEDCubeManager.getInstance() .getScreenMainControl() .animComboBox .setSelectedItem(anim.getName()); } if (item.options != null) { for (SequenceItem.Option option : item.options) { LEDCubeManager.getLEDCube() .getCommThread() .getCurrentAnimation() .setOption(option.name, option.value); } } }