Source:
public ProcessesListViewImpl( CommandResources resources, EmptyListWidget emptyListWidget, ToolbarMessages messages) { this.emptyListWidget = emptyListWidget; this.messages = messages; listItems = new HashMap<>(); renderers = new HashMap<>(); execLabel = new Label("EXEC"); execLabel.addStyleName(resources.commandToolbarCss().processesListExecLabel()); loadAnimation = new FlowPanel(); loadAnimation.addStyleName(resources.commandToolbarCss().processesListLoader()); FlowPanel rect1 = new FlowPanel(); rect1.addStyleName(resources.commandToolbarCss().processesListLoaderRect1()); loadAnimation.add(rect1); FlowPanel rect2 = new FlowPanel(); rect2.addStyleName(resources.commandToolbarCss().processesListLoaderRect2()); loadAnimation.add(rect2); FlowPanel rect3 = new FlowPanel(); rect3.addStyleName(resources.commandToolbarCss().processesListLoaderRect3()); loadAnimation.add(rect3); dropdownList = new DropdownList(emptyListWidget, true); dropdownList.setWidth("100%"); dropdownList.ensureDebugId("dropdown-processes"); dropdownList.setSelectionHandler( item -> { if (item instanceof CreateCommandItem) { delegate.onCreateCommand(); } else { listItems .entrySet() .stream() .filter(entry -> item.equals(entry.getValue())) .forEach(entry -> delegate.onProcessChosen(entry.getKey())); } }); rootPanel = new FlowPanel(); rootPanel.add(execLabel); rootPanel.add(loadAnimation); rootPanel.add(dropdownList); createCommandItem = new CreateCommandItem(); createCommandItemRenderer = new CreateCommandItemRenderer(); checkCreateCommandItem(); loadInfo = new FlowPanel(); loadInfo.setStyleName(resources.commandToolbarCss().loaderPanel()); rootPanel.add(loadInfo); loadingLabel = new FlowPanel(); loadingLabel.setStyleName(resources.commandToolbarCss().loaderPanelLabel()); loadInfo.add(loadingLabel); loadingProgress = new FlowPanel(); loadingProgress.setStyleName(resources.commandToolbarCss().loaderPanelProgressBar()); loadInfo.add(loadingProgress); }

Target:
public ProcessesListViewImpl( CommandResources resources, EmptyListWidget emptyListWidget, ToolbarMessages messages) { this.resources = resources; this.emptyListWidget = emptyListWidget; this.messages = messages; listItems = new HashMap<>(); renderers = new HashMap<>(); execLabel = new Label("EXEC"); execLabel.addStyleName(resources.commandToolbarCss().processesListExecLabel()); loadAnimation = getAnimationWidget(); dropdownList = new DropdownList(emptyListWidget, true); dropdownList.setWidth("100%"); dropdownList.ensureDebugId("dropdown-processes"); dropdownList.setSelectionHandler( item -> { if (item instanceof CreateCommandItem) { delegate.onCreateCommand(); } else { listItems .entrySet() .stream() .filter(entry -> item.equals(entry.getValue())) .forEach(entry -> delegate.onProcessChosen(entry.getKey())); } }); rootPanel = new FlowPanel(); rootPanel.add(execLabel); rootPanel.add(loadAnimation); rootPanel.add(dropdownList); createCommandItem = new CreateCommandItem(); createCommandItemRenderer = new CreateCommandItemRenderer(); checkCreateCommandItem(); loadInfo = new FlowPanel(); loadInfo.setStyleName(resources.commandToolbarCss().loaderPanel()); rootPanel.add(loadInfo); loadingLabel = new FlowPanel(); loadingLabel.setStyleName(resources.commandToolbarCss().loaderPanelLabel()); loadInfo.add(loadingLabel); loadingProgress = new FlowPanel(); loadingProgress.setStyleName(resources.commandToolbarCss().loaderPanelProgressBar()); loadInfo.add(loadingProgress); }