Package org.aperteworkflow.util.vaadin.ui

Examples of org.aperteworkflow.util.vaadin.ui.AligningHorizontalLayout


        // sort the actions to preserve the displaying order
        List<ProcessStateAction> actionList = new ArrayList<ProcessStateAction>(stateConfiguration.getActions());
        Collections.sort(actionList, new ActionPriorityComparator());


    AligningHorizontalLayout buttonLayout = new AligningHorizontalLayout(Alignment.MIDDLE_RIGHT);
    buttonLayout.setMargin(new MarginInfo(false, true, false, true));
    buttonLayout.setWidth(100, Sizeable.UNITS_PERCENTAGE);

    for (final ProcessStateAction a : actionList) {
      final ProcessToolActionButton actionButton = makeButton(a);
      actionButton.setEnabled(isOwner);
      actionButton.loadData(task);
      actionButton.setActionCallback(actionCallback);
      if (actionButton instanceof ProcessToolVaadinRenderable) {
        buttonLayout.addComponent(((ProcessToolVaadinRenderable) actionButton).render());
      }
    }

    buttonLayout.addComponentAsFirst(new Label() {{
      setWidth(100, Sizeable.UNITS_PERCENTAGE);
    }});

    buttonLayout.recalculateExpandRatios();

    return buttonLayout;
  }
View Full Code Here


                    EventHandler saveEventHandler = new SaveEventHandler();
          EventHandler saveAndCloseEventHandler = new SaveAndCloseEventHandler();
                });

        AligningHorizontalLayout toolbar = new AligningHorizontalLayout(Alignment.MIDDLE_RIGHT);
        toolbar.setWidth(100, UNITS_PERCENTAGE);
        toolbar.setMargin(false);
        toolbar.setSpacing(false);

        toolbar.addComponent(titleLabel);
        for (Component comp : otherButtons) {
            if (comp instanceof Button) {
                Button button = (Button) comp;
                if (button.getIcon() != null && button.getWidth() > 0 && button.getWidthUnits() == UNITS_PIXELS) {
                    button.setWidth(button.getWidth() + 20, UNITS_PIXELS);
                }
            }
            toolbar.addComponent(comp);
        }
        toolbar.addComponent(backButton);

        toolbar.setComponentAlignment(titleLabel, Alignment.MIDDLE_LEFT);
        toolbar.recalculateExpandRatios();

        return toolbar;
    }
View Full Code Here

                    .setMultiSelect(false)
                    .setItemComponentGenerator(new ConfigurableOptionGroupField.ItemComponentGenerator<Mode>() {
                        @Override
                        public Component generate(FlexibleOptionGroup optionGroup, Mode itemId, FlexibleOptionGroupItemComponent itemComponent,
                                                  Transformer<Mode, String> itemCaptionResolver) {
                            AligningHorizontalLayout ahl = new AligningHorizontalLayout(Alignment.MIDDLE_LEFT);
                            ahl.setSpacing(true);
                            ahl.setMargin(false, true, false, false);
                            ahl.setData(itemCaptionResolver);
                            ahl.addComponent(itemComponent);
                            ahl.addComponent(createControlsForMode(itemId));
                            ahl.setData(itemComponent);
                            return ahl;
                        }
                    })
                    .init();
            optionGroup.setValue(currentMode);
View Full Code Here

    public ConfigurableOptionGroupField(Collection<T> collection) {
        this(collection, null, null);
    }

    protected AbstractOrderedLayout createLayout() {
        return layoutFactory != null ? layoutFactory.create() : new AligningHorizontalLayout(Alignment.MIDDLE_LEFT);
    }
View Full Code Here

TOP

Related Classes of org.aperteworkflow.util.vaadin.ui.AligningHorizontalLayout

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.