Example usage for com.vaadin.ui Alignment BOTTOM_LEFT

List of usage examples for com.vaadin.ui Alignment BOTTOM_LEFT

Introduction

In this page you can find the example usage for com.vaadin.ui Alignment BOTTOM_LEFT.

Prototype

Alignment BOTTOM_LEFT

To view the source code for com.vaadin.ui Alignment BOTTOM_LEFT.

Click Source Link

Usage

From source file:org.lunifera.mobile.vaadin.ecview.presentation.internal.NavigationPagePresentation.java

License:Open Source License

/**
 * Sets the alignment to the component./*ww  w  .j a  v a 2 s .  c  om*/
 * 
 * @param child
 * @param yAlignment
 */
protected void applyAlignment(Component child, YAlignment yAlignment) {

    if (yAlignment != null) {
        child.setSizeUndefined();
        switch (yAlignment) {
        case BOTTOM_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_CENTER);
            break;
        case BOTTOM_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            child.setWidth("100%");
            break;
        case BOTTOM_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            break;
        case BOTTOM_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_RIGHT);
            break;
        case MIDDLE_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_CENTER);
            break;
        case MIDDLE_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            child.setWidth("100%");
            break;
        case MIDDLE_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            break;
        case MIDDLE_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_RIGHT);
            break;
        case TOP_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            break;
        case TOP_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            break;
        case TOP_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            break;
        case TOP_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            break;
        case FILL_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            child.setHeight("100%");
            break;
        case FILL_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            child.setHeight("100%");
            break;
        case FILL_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setHeight("100%");
            break;
        case FILL_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            child.setHeight("100%");
            break;
        default:
            break;
        }
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.FormLayoutPresentation.java

License:Open Source License

/**
 * Sets the alignment to the component./* ww w.j av a  2 s. c  o m*/
 * 
 * @param child
 * @param yAlignment
 */
protected void applyAlignment(Component child, YAlignment yAlignment) {

    if (yAlignment != null) {
        child.setWidth("-1%");
        child.setHeight("-1%");
        switch (yAlignment) {
        case BOTTOM_CENTER:
            formLayout.setComponentAlignment(child, Alignment.BOTTOM_CENTER);
            break;
        case BOTTOM_FILL:
            formLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            child.setWidth("100%");
            break;
        case BOTTOM_LEFT:
            formLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            break;
        case BOTTOM_RIGHT:
            formLayout.setComponentAlignment(child, Alignment.BOTTOM_RIGHT);
            break;
        case MIDDLE_CENTER:
            formLayout.setComponentAlignment(child, Alignment.MIDDLE_CENTER);
            break;
        case MIDDLE_FILL:
            formLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            child.setWidth("100%");
            break;
        case MIDDLE_LEFT:
            formLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            break;
        case MIDDLE_RIGHT:
            formLayout.setComponentAlignment(child, Alignment.MIDDLE_RIGHT);
            break;
        case TOP_CENTER:
            formLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            break;
        case TOP_FILL:
            formLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            break;
        case TOP_LEFT:
            formLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            break;
        case TOP_RIGHT:
            formLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            break;
        case FILL_CENTER:
            formLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            child.setHeight("100%");
            break;
        case FILL_FILL:
            formLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            child.setHeight("100%");
            break;
        case FILL_LEFT:
            formLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setHeight("100%");
            break;
        case FILL_RIGHT:
            formLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            child.setHeight("100%");
            break;
        default:
            break;
        }
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.GridLayoutPresentation.java

License:Open Source License

/**
 * Sets the alignment to the component./*from w w w .j  ava 2 s . co  m*/
 * 
 * @param child
 * @param yAlignment
 */
protected void applyAlignment(Component child, YAlignment yAlignment) {

    if (yAlignment != null) {
        child.setWidth("-1%");
        child.setHeight("-1%");
        switch (yAlignment) {
        case BOTTOM_CENTER:
            gridlayout.setComponentAlignment(child, Alignment.BOTTOM_CENTER);
            break;
        case BOTTOM_FILL:
            gridlayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            child.setWidth("100%");
            break;
        case BOTTOM_LEFT:
            gridlayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            break;
        case BOTTOM_RIGHT:
            gridlayout.setComponentAlignment(child, Alignment.BOTTOM_RIGHT);
            break;
        case MIDDLE_CENTER:
            gridlayout.setComponentAlignment(child, Alignment.MIDDLE_CENTER);
            break;
        case MIDDLE_FILL:
            gridlayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            child.setWidth("100%");
            break;
        case MIDDLE_LEFT:
            gridlayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            break;
        case MIDDLE_RIGHT:
            gridlayout.setComponentAlignment(child, Alignment.MIDDLE_RIGHT);
            break;
        case TOP_CENTER:
            gridlayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            break;
        case TOP_FILL:
            gridlayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            break;
        case TOP_LEFT:
            gridlayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            break;
        case TOP_RIGHT:
            gridlayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            break;
        case FILL_CENTER:
            gridlayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            child.setHeight("100%");
            break;
        case FILL_FILL:
            gridlayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            child.setHeight("100%");
            break;
        case FILL_LEFT:
            gridlayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setHeight("100%");
            break;
        case FILL_RIGHT:
            gridlayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            child.setHeight("100%");
            break;
        default:
            break;
        }
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.HorizontalLayoutPresentation.java

License:Open Source License

/**
 * Sets the alignment to the component.//  w w  w . j a  v a2s.  c  om
 * 
 * @param child
 * @param yAlignment
 */
protected void applyAlignment(Component child, YAlignment yAlignment) {

    if (yAlignment != null) {
        child.setWidth("-1%");
        child.setHeight("-1%");
        switch (yAlignment) {
        case BOTTOM_CENTER:
            horizontalLayout.setComponentAlignment(child, Alignment.BOTTOM_CENTER);
            break;
        case BOTTOM_FILL:
            horizontalLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            child.setWidth("100%");
            break;
        case BOTTOM_LEFT:
            horizontalLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            break;
        case BOTTOM_RIGHT:
            horizontalLayout.setComponentAlignment(child, Alignment.BOTTOM_RIGHT);
            break;
        case MIDDLE_CENTER:
            horizontalLayout.setComponentAlignment(child, Alignment.MIDDLE_CENTER);
            break;
        case MIDDLE_FILL:
            horizontalLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            child.setWidth("100%");
            break;
        case MIDDLE_LEFT:
            horizontalLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            break;
        case MIDDLE_RIGHT:
            horizontalLayout.setComponentAlignment(child, Alignment.MIDDLE_RIGHT);
            break;
        case TOP_CENTER:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            break;
        case TOP_FILL:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            break;
        case TOP_LEFT:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            break;
        case TOP_RIGHT:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            break;
        case FILL_CENTER:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            child.setHeight("100%");
            break;
        case FILL_FILL:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            child.setHeight("100%");
            break;
        case FILL_LEFT:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setHeight("100%");
            break;
        case FILL_RIGHT:
            horizontalLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            child.setHeight("100%");
            break;
        default:
            break;
        }
    }
}

From source file:org.lunifera.runtime.web.ecview.presentation.vaadin.internal.VerticalLayoutPresentation.java

License:Open Source License

/**
 * Sets the alignment to the component./*ww  w.  j a  v  a  2 s  .  co m*/
 * 
 * @param child
 * @param yAlignment
 */
protected void applyAlignment(Component child, YAlignment yAlignment) {

    if (yAlignment != null) {
        child.setWidth("-1%");
        child.setHeight("-1%");
        switch (yAlignment) {
        case BOTTOM_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_CENTER);
            break;
        case BOTTOM_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            child.setWidth("100%");
            break;
        case BOTTOM_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_LEFT);
            break;
        case BOTTOM_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.BOTTOM_RIGHT);
            break;
        case MIDDLE_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_CENTER);
            break;
        case MIDDLE_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            child.setWidth("100%");
            break;
        case MIDDLE_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_LEFT);
            break;
        case MIDDLE_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.MIDDLE_RIGHT);
            break;
        case TOP_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            break;
        case TOP_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            break;
        case TOP_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            break;
        case TOP_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            break;
        case FILL_CENTER:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_CENTER);
            child.setHeight("100%");
            break;
        case FILL_FILL:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setWidth("100%");
            child.setHeight("100%");
            break;
        case FILL_LEFT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_LEFT);
            child.setHeight("100%");
            break;
        case FILL_RIGHT:
            verticalLayout.setComponentAlignment(child, Alignment.TOP_RIGHT);
            child.setHeight("100%");
            break;
        default:
            break;
        }
    }
}

From source file:org.milleni.dunning.ui.dpdetail.DunningProcessDetailListDetailPanel.java

License:Apache License

protected void initInstancesTitle(HorizontalLayout instancesHeader) {
    instancesLabel = new Label(i18nManager.getMessage(Constants.DUNNING_PROCESSES));
    instancesLabel.addStyleName(ExplorerLayout.STYLE_H3);
    instancesHeader.addComponent(instancesLabel);
    instancesHeader.setComponentAlignment(instancesLabel, Alignment.BOTTOM_LEFT);
}

From source file:org.plukh.fluffymeow.ui.Header.java

License:Open Source License

@Inject
public Header(HeaderUserComponent loginComponent, LocaleChooserComponent localeChooser) {
    log.trace("Creating Header...");

    this.loginComponent = loginComponent;
    this.localeChooser = localeChooser;

    setWidth("100%");
    setMargin(true);//from   w ww  .j  a  va2  s.c o m
    setSpacing(true);

    Resource resource = new ThemeResource("logo.png");
    logoImage = new Image(null, resource);
    logoImage.addStyleName("pointer");
    logoImage.addClickListener(this::onLogoImageClick);

    addComponent(logoImage);
    addComponent(loginComponent);
    addComponent(localeChooser);

    setExpandRatio(loginComponent, 1.0f);
    setComponentAlignment(loginComponent, Alignment.BOTTOM_LEFT);
    setComponentAlignment(localeChooser, Alignment.BOTTOM_RIGHT);

    log.debug("Header created");
}

From source file:org.tltv.gantt.demo.DemoUI.java

License:Apache License

private void openStepEditor(AbstractStep step) {
    final Window win = new Window("Step Editor");
    win.setResizable(false);//from  ww w  .j ava  2  s . c om
    win.center();

    final Collection<Component> hidden = new ArrayList<Component>();

    BeanItem<AbstractStep> item = new BeanItem<AbstractStep>(step);

    final FieldGroup group = new FieldGroup(item);
    group.setBuffered(true);

    TextField captionField = new TextField("Caption");
    captionField.setNullRepresentation("");
    group.bind(captionField, "caption");

    TextField descriptionField = new TextField("Description");
    descriptionField.setNullRepresentation("");
    group.bind(descriptionField, "description");
    descriptionField.setVisible(false);
    hidden.add(descriptionField);

    NativeSelect captionMode = new NativeSelect("Caption Mode");
    captionMode.addItem(Step.CaptionMode.TEXT);
    captionMode.addItem(Step.CaptionMode.HTML);
    group.bind(captionMode, "captionMode");
    captionMode.setVisible(false);
    hidden.add(captionMode);

    CheckBox showProgress = new CheckBox("Show progress");
    group.bind(showProgress, "showProgress");
    showProgress.setVisible(false);
    hidden.add(showProgress);

    Slider progress = new Slider("Progress");
    progress.setWidth(100, Unit.PERCENTAGE);
    group.bind(progress, "progress");
    progress.setVisible(false);
    hidden.add(progress);

    NativeSelect predecessorSelect = new NativeSelect("Predecessor Step");
    predecessorSelect.setWidth(100, Unit.PERCENTAGE);
    fillPredecessorCanditatesToSelect(step, predecessorSelect);
    predecessorSelect.setEnabled(step instanceof Step);
    if (step instanceof Step) {
        group.bind(predecessorSelect, "predecessor");
    }
    predecessorSelect.setVisible(false);
    hidden.add(predecessorSelect);

    final NativeSelect parentStepSelect = new NativeSelect("Parent Step");
    parentStepSelect.setWidth(100, Unit.PERCENTAGE);
    parentStepSelect.setEnabled(false);
    fillParentStepCanditatesToSelect(step, parentStepSelect);
    parentStepSelect.setVisible(false);
    hidden.add(parentStepSelect);

    HorizontalLayout colorLayout = new HorizontalLayout();
    colorLayout.setWidth(100, Unit.PERCENTAGE);
    colorLayout.setVisible(false);
    hidden.add(colorLayout);

    final TextField bgField = new TextField("Background color");
    bgField.setNullRepresentation("");
    group.bind(bgField, "backgroundColor");
    bgField.setEnabled(false);

    final ColorPicker bgColorPicker = new ColorPicker();
    bgColorPicker.setPosition(300, 100);
    bgColorPicker.setColor(new CssColorToColorPickerConverter().convertToModel(step.getBackgroundColor()));
    bgColorPicker.addColorChangeListener(new ColorChangeListener() {
        @Override
        public void colorChanged(ColorChangeEvent event) {
            bgField.setValue(event.getColor().getCSS());
        }
    });

    colorLayout.addComponent(bgField);
    colorLayout.addComponent(bgColorPicker);
    colorLayout.setExpandRatio(bgField, 1);
    colorLayout.setComponentAlignment(bgColorPicker, Alignment.BOTTOM_LEFT);

    DateField startDate = new DateField("Start date");
    startDate.setLocale(gantt.getLocale());
    startDate.setTimeZone(gantt.getTimeZone());
    startDate.setResolution(Resolution.SECOND);
    startDate.setConverter(new DateToLongConverter());
    group.bind(startDate, "startDate");

    DateField endDate = new DateField("End date");
    endDate.setLocale(gantt.getLocale());
    endDate.setTimeZone(gantt.getTimeZone());
    endDate.setResolution(Resolution.SECOND);
    endDate.setConverter(new DateToLongConverter());
    group.bind(endDate, "endDate");

    CheckBox showMore = new CheckBox("Show all settings");
    showMore.addValueChangeListener(new ValueChangeListener() {

        @Override
        public void valueChange(ValueChangeEvent event) {
            for (Component c : hidden) {
                c.setVisible((Boolean) event.getProperty().getValue());
            }
            win.center();
        }
    });

    VerticalLayout content = new VerticalLayout();
    content.setMargin(true);
    content.setSpacing(true);
    win.setContent(content);

    content.addComponent(captionField);
    content.addComponent(captionMode);
    content.addComponent(descriptionField);
    content.addComponent(showProgress);
    content.addComponent(progress);
    content.addComponent(predecessorSelect);
    content.addComponent(parentStepSelect);
    content.addComponent(colorLayout);
    content.addComponent(startDate);
    content.addComponent(endDate);
    content.addComponent(showMore);

    HorizontalLayout buttons = new HorizontalLayout();
    content.addComponent(buttons);

    Button ok = new Button("Ok", new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            commit(win, group, parentStepSelect);
        }

    });
    Button cancel = new Button("Cancel", new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            cancel(win, group);
        }
    });
    Button delete = new Button("Delete", new ClickListener() {

        @Override
        public void buttonClick(ClickEvent event) {
            delete(win, group);
        }

    });
    buttons.addComponent(ok);
    buttons.addComponent(cancel);
    buttons.addComponent(delete);
    win.setClosable(true);

    getUI().addWindow(win);
}

From source file:org.vaadin.addons.core.window.DialogWindow.java

License:Apache License

private VerticalLayout buildContent(String title, VaadinIcons type, Component content,
        ButtonType[] buttonTypes) {/*from  w w w .  ja  va 2 s  .  c  o  m*/
    VerticalLayout root = new VerticalLayout();
    root.setMargin(false);
    root.setSpacing(false);

    float width = -1;
    float height = 0;

    if (title != null) {
        HorizontalLayout header = new HorizontalLayout();
        header.setMargin(true);
        header.setHeightUndefined();
        header.setWidth("100%");
        header.addStyleName(ValoTheme.WINDOW_TOP_TOOLBAR);
        Label l = new Label("<font size=\"4\">" + title + "</font>", ContentMode.HTML);
        width = l.getWidth();
        header.addComponent(l);
        header.setComponentAlignment(l, Alignment.MIDDLE_LEFT);

        if (type != null) {
            Label i = new Label(type.getHtml(), ContentMode.HTML);
            header.addComponent(i);
            header.setComponentAlignment(i, Alignment.MIDDLE_RIGHT);
        }

        height = header.getHeight();
        root.addComponent(header);
    }

    if (content != null) {
        content.setSizeFull();
        HorizontalLayout contentRoot = new HorizontalLayout(content);
        contentRoot.setMargin(true);
        root.addComponent(contentRoot);
        height = height + contentRoot.getHeight();
    }

    HorizontalLayout footer = new HorizontalLayout();
    footer.setHeightUndefined();
    footer.setWidth("100%");
    footer.setMargin(true);
    footer.addStyleName(ValoTheme.WINDOW_BOTTOM_TOOLBAR);

    HorizontalLayout buttons = new HorizontalLayout();
    if (buttonTypes != null) {
        Stream.of(buttonTypes).forEach(buttonType -> {
            Button b = new Button(buttonType.getCaption());
            if (buttonType.getIcon() != null) {
                b.setIcon(buttonType.getIcon());
            }
            if (buttonType.getDescription() != null) {
                b.setDescription(buttonType.getDescription());
            }
            if (buttonType.getStyle() != null) {
                b.addStyleName(buttonType.getStyle());
            }
            b.addClickListener(event -> buttonType.getActions().forEach(buttonAction -> {
                ButtonTypeClickEvent event1 = new ButtonTypeClickEvent(buttonType, DialogWindow.this);
                buttonAction.getListener().buttonClick(event1);
            }));
            buttons.addComponent(b);
        });
    }
    buttons.setSizeUndefined();
    buttons.setMargin(false);
    buttons.setSpacing(true);

    footer.addComponent(buttons);
    footer.setComponentAlignment(buttons, Alignment.MIDDLE_RIGHT);

    if (buttons.getWidth() > width) {
        width = buttons.getWidth();
    }

    root.addComponent(footer);
    root.setComponentAlignment(footer, Alignment.BOTTOM_LEFT);
    height = height + footer.getHeight();

    root.setHeight(height, Unit.PIXELS);
    root.setWidth(width, Unit.PIXELS);
    return root;
}

From source file:org.vaadin.johannes.VaadingraphApplication.java

License:LGPL

@Override
public void init() {
    path = getProperty("sifpath");
    fileName = path + "sample.sif";

    mainWindow = new Window("Vaadingraph Application");
    mainWindow.setContent(mainLayout);/* w w  w  .  j  a  v  a2 s.co  m*/
    mainLayout.setMargin(true);
    mainLayout.addComponent(hl = new HorizontalLayout());

    hl.setSpacing(true);
    hl.addComponent(getNetworkSelect());
    hl.addComponent(getSessionSelect());
    hl.addComponent(getLayoutSelect());
    hl.addComponent(getNodeSizeSelect());
    hl.addComponent(getStyleSelect());

    final Component cb1 = getTextHideBox();
    final Component cb2 = getStyleOptimizedBox();
    hl.addComponent(cb1);
    hl.addComponent(cb2);
    hl.setComponentAlignment(cb1, Alignment.BOTTOM_LEFT);
    hl.setComponentAlignment(cb2, Alignment.BOTTOM_LEFT);

    graph = getNetworkGraph(WIDTH, HEIGHT);
    graph.addListener(this);
    mainLayout.addComponent(hl2 = new HorizontalLayout());
    mainLayout.addComponent(getAttributeBrowser(graph));
    hl2.addComponent(graph);
    hl2.addComponent(getInfoLabel());
    setMainWindow(mainWindow);
}