if(((HorizontalLayout) o1).getComponent(i) instanceof TextField) t1 = (TextField)((HorizontalLayout) o1).getComponent(i); break; if(((HorizontalLayout) o2).getComponent(i) instanceof TextField) t2 = (TextField)((HorizontalLayout) o2).getComponent(i); break;
protected void processFilterHeaderEvent(final FilterHeaderEvent event) { if (FilterHeaderEnum.SHOW_MENUBAR == event.getFilterHeaderEnum() && typeHeaderLayout.getComponent(1).equals(cancelTagButton)) { removeCancelButtonAndAddMenuBar(); } else if (FilterHeaderEnum.SHOW_CANCEL_BUTTON == event.getFilterHeaderEnum()) { removeMenuBarAndAddCancelButton(); } }
/** * Saves the changed apps setting.<p> */ void saveToUser() { List<String> apps = new ArrayList<String>(); HorizontalLayout appsLayout = m_userApps.getWrappedLayout(); int count = appsLayout.getComponentCount(); for (int i = 0; i < count; i++) { WrappedDraggableComponent wrapper = (WrappedDraggableComponent)appsLayout.getComponent(i); apps.add(wrapper.getItemId()); } try { OpenCms.getWorkplaceAppManager().setUserQuickLaunchApps(A_CmsUI.getCmsObject(), apps); } catch (CmsException e) { CmsErrorDialog.showErrorDialog("Could not write user Quicklaunch apps", e); } close(); } }
protected void processFilterHeaderEvent(final FilterHeaderEvent event) { if (FilterHeaderEnum.SHOW_MENUBAR == event.getFilterHeaderEnum() && typeHeaderLayout.getComponent(1).equals(cancelTagButton)) { removeCancelButtonAndAddMenuBar(); } else if (FilterHeaderEnum.SHOW_CANCEL_BUTTON == event.getFilterHeaderEnum()) { removeMenuBarAndAddCancelButton(); } }
public static HorizontalLayout horizontalLayout(Alignment alignment, com.vaadin.ui.Component... components) { HorizontalLayout hl = new HorizontalLayout(); hl.setWidth(100, Sizeable.UNITS_PERCENTAGE); hl.setSpacing(true); if (components != null && components.length > 0) { for (com.vaadin.ui.Component c : components) { hl.addComponent(c); hl.setComponentAlignment(c, alignment); } if (alignment.isRight()) { hl.setExpandRatio(hl.getComponent(0), 1.0f); } else if (alignment.isLeft()) { hl.setExpandRatio(hl.getComponent(hl.getComponentCount() - 1), 1.0f); } } return hl; }
((com.vaadin.ui.Component.Focusable) buttonsContainer.getComponent(0)).focus();
/** * Shows the dialog. */ public void open() { // Ensure, that the dialog has at least one button if (!buttonAdded && BUTTON_ADD_CLOSE_PER_DEFAULT) { withCloseButton(); } // Apply some layouting options to the buttons for (int i = 0; i < buttonLayout.getComponentCount(); i++) { Component c = buttonLayout.getComponent(i); if (buttonWidth != null && c instanceof Button) { Button b = (Button) c; b.setWidth(buttonWidth); } buttonLayout.setComponentAlignment(c, Alignment.MIDDLE_CENTER); } // Add window to the UI if (DIALOG_DEFAULT_TRANSITION_LISTENER == null || (DIALOG_DEFAULT_TRANSITION_LISTENER != null && DIALOG_DEFAULT_TRANSITION_LISTENER.show(this))) { UI.getCurrent().addWindow(window); } immutable = true; }
Component comp = m_itemsLeft.getComponent(i); if (!isAlwaysShow(comp)) { m_itemsLeft.removeComponent(comp); Component comp = m_itemsRight.getComponent(i); if (!isAlwaysShow(comp)) { m_itemsRight.removeComponent(comp);
Component component = ((HorizontalLayout) layout.getComponent(i)).getComponent(j); Component component = ((HorizontalLayout) layout.getComponent(i)).getComponent(j);