use of com.vaadin.ui.Component in project cuba by cuba-platform.
the class WebFileMultiUploadField method setDropZone.
@Override
public void setDropZone(DropZone dropZone) {
super.setDropZone(dropZone);
if (component instanceof CubaFileUpload) {
if (dropZone == null) {
((CubaFileUpload) component).setDropZone(null);
} else {
com.haulmont.cuba.gui.components.Component target = dropZone.getTarget();
if (target instanceof Window.Wrapper) {
target = ((Window.Wrapper) target).getWrappedWindow();
}
Component vComponent = target.unwrapComposition(Component.class);
((CubaFileUpload) this.component).setDropZone(vComponent);
}
}
}
use of com.vaadin.ui.Component in project cuba by cuba-platform.
the class CubaTable method iterator.
@Override
public Iterator<Component> iterator() {
List<Component> additionalConnectors = null;
CubaTableState tableState = getState(false);
if (tableState.presentations != null) {
additionalConnectors = new LinkedList<>();
additionalConnectors.add((Component) tableState.presentations);
}
if (tableState.contextMenu != null) {
if (additionalConnectors == null) {
additionalConnectors = new LinkedList<>();
}
additionalConnectors.add((Component) tableState.contextMenu);
}
if (tableState.customPopup != null) {
if (additionalConnectors == null) {
additionalConnectors = new LinkedList<>();
}
additionalConnectors.add((Component) tableState.customPopup);
}
if (additionalConnectors == null) {
return super.iterator();
} else if (visibleComponents != null) {
return Iterables.concat(visibleComponents, additionalConnectors).iterator();
} else {
return additionalConnectors.iterator();
}
}
use of com.vaadin.ui.Component in project cuba by cuba-platform.
the class ComponentCustomField method setPropertyDataSource.
@Override
public void setPropertyDataSource(Property newDataSource) {
super.setPropertyDataSource(newDataSource);
if (newDataSource != null) {
layout.removeAllComponents();
Component value = (Component) newDataSource.getValue();
if (value != null) {
layout.addComponent(value);
}
}
}
use of com.vaadin.ui.Component in project ANNIS by korpling.
the class IDGenerator method assignIDForEachField.
public static void assignIDForEachField(HasComponents parent) {
if (parent != null) {
Iterator<Component> itComponents = parent.iterator();
while (itComponents.hasNext()) {
Component c = itComponents.next();
assignIDForField(parent, c);
}
}
}
use of com.vaadin.ui.Component in project ANNIS by korpling.
the class SearchView method selectedTabChange.
@Override
public void selectedTabChange(TabSheet.SelectedTabChangeEvent event) {
Component tab = event.getTabSheet().getSelectedTab();
if (tab != null) {
// first remove the old element to make sure it is added at the end
selectedTabHistory.remove(tab);
selectedTabHistory.add(tab);
}
}
Aggregations