List of usage examples for com.vaadin.ui AbstractOrderedLayout getComponent
public Component getComponent(int index) throws IndexOutOfBoundsException
From source file:edu.kit.dama.ui.admin.utils.UIComponentTools.java
License:Apache License
private static void setLockedComponents(AbstractOrderedLayout layout, boolean locked) { for (int i = 0; i < layout.getComponentCount(); i++) { if (layout.getComponent(i).getClass().equals(Button.class)) { layout.getComponent(i).setEnabled(!locked); } else if (layout.getComponent(i).getClass().equals(ComboBox.class)) { layout.getComponent(i).setEnabled(!locked); layout.getComponent(i).setReadOnly(locked); } else {// w w w . j av a2s.co m layout.getComponent(i).setReadOnly(locked); } } }