Example usage for com.vaadin.ui VerticalLayout addComponent

List of usage examples for com.vaadin.ui VerticalLayout addComponent

Introduction

In this page you can find the example usage for com.vaadin.ui VerticalLayout addComponent.

Prototype

@Override
public void addComponent(Component c) 

Source Link

Document

Add a component into this container.

Usage

From source file:com.jiangyifen.ec2.ui.mgr.outlinemanage.EditOutline.java

/**
 * Form ?// www  .  j  a va  2s  . com
 * @param windowContent
 */
private void createFormComponent(VerticalLayout windowContent) {
    form = new Form();
    form.setValidationVisibleOnCommit(true);
    form.setValidationVisible(false);
    form.setInvalidCommitted(false);
    form.setWriteThrough(false);
    form.setImmediate(true);
    form.addStyleName("chb");
    form.setFormFieldFactory(new MyFieldFactory());
    form.setFooter(creatFormFooterComponents());
    windowContent.addComponent(form);
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java

/**
 *  ?(??)//from www .j a va 2 s.c  om
 * @return
 */

private VerticalLayout createLeftComponents() {
    VerticalLayout leftVLayout = new VerticalLayout();
    leftVLayout.setSpacing(true);
    leftVLayout.setWidth("100%");

    // ?
    HorizontalLayout searchHLayout = new HorizontalLayout();
    searchHLayout.setSpacing(true);
    leftVLayout.addComponent(searchHLayout);

    Label caption = new Label("");
    caption.setWidth("-1px");
    searchHLayout.addComponent(caption);
    searchHLayout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER);

    leftKeyword = new TextField();
    leftKeyword.setImmediate(true);
    leftKeyword.setInputPrompt("?");
    leftKeyword.setDescription("??????????");
    leftKeyword.setStyleName("search");
    leftKeyword.addListener(this);
    searchHLayout.addComponent(leftKeyword);
    searchHLayout.setComponentAlignment(leftKeyword, Alignment.MIDDLE_CENTER);

    leftSearch = new Button("?", this);
    leftSearch.setImmediate(true);
    searchHLayout.addComponent(leftSearch);
    searchHLayout.setComponentAlignment(leftSearch, Alignment.MIDDLE_CENTER);

    // 
    // 
    leftTable = new Table("??");
    leftTable.setStyleName("striped");
    leftTable.setSelectable(true);
    leftTable.setMultiSelect(true);
    leftTable.setWidth("100%");
    leftTable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
    leftVLayout.addComponent(leftTable);

    leftTableContainer = new BeanItemContainer<User>(User.class);
    leftTableContainer.addNestedContainerProperty("department.name");
    leftTable.setContainerDataSource(leftTableContainer);
    leftTable.setPageLength(20);
    leftTable.setVisibleColumns(VISIBLE_PROPERTIES);
    leftTable.setColumnHeaders(COL_HEADERS);

    return leftVLayout;
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java

/**
 * ??("?")/*from   w  ww.  j  av a2s.  c  om*/
 * return 
 */
private VerticalLayout createMiddleComponents() {
    VerticalLayout operatorVLayout = new VerticalLayout();
    operatorVLayout.setSpacing(true);
    operatorVLayout.setSizeFull();

    // ??
    operatorVLayout.addComponent(new Label("&nbsp&nbsp", Label.CONTENT_XHTML));
    operatorVLayout.addComponent(new Label("&nbsp&nbsp", Label.CONTENT_XHTML));
    operatorVLayout.addComponent(new Label("&nbsp&nbsp", Label.CONTENT_XHTML));

    // 
    addAll = new Button(">>>", this);
    operatorVLayout.addComponent(addAll);
    operatorVLayout.setComponentAlignment(addAll, Alignment.MIDDLE_CENTER);

    add = new Button(">>", this);
    operatorVLayout.addComponent(add);
    operatorVLayout.setComponentAlignment(add, Alignment.MIDDLE_CENTER);

    remove = new Button("<<", this);
    operatorVLayout.addComponent(remove);
    operatorVLayout.setComponentAlignment(remove, Alignment.MIDDLE_CENTER);

    removeAll = new Button("<<<", this);
    operatorVLayout.addComponent(removeAll);
    operatorVLayout.setComponentAlignment(removeAll, Alignment.MIDDLE_CENTER);

    // ??
    operatorVLayout.addComponent(new Label("&nbsp&nbsp", Label.CONTENT_XHTML));
    operatorVLayout.addComponent(new Label("&nbsp&nbsp", Label.CONTENT_XHTML));

    return operatorVLayout;
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java

/**
 * ??(????)//from   w ww  .j a va 2s .co m
 * return 
 */
private VerticalLayout createRightComponents() {
    VerticalLayout rightVLayout = new VerticalLayout();
    rightVLayout.setSpacing(true);
    rightVLayout.setWidth("100%");

    // ?
    HorizontalLayout searchHLayout = new HorizontalLayout();
    searchHLayout.setSpacing(true);
    rightVLayout.addComponent(searchHLayout);

    Label caption = new Label("");
    caption.setWidth("-1px");
    searchHLayout.addComponent(caption);
    searchHLayout.setComponentAlignment(caption, Alignment.MIDDLE_CENTER);

    rightKeyword = new TextField();
    rightKeyword.setImmediate(true);
    rightKeyword.setInputPrompt("?");
    rightKeyword.setDescription("??????????");
    rightKeyword.setStyleName("search");
    rightKeyword.addListener(this);
    searchHLayout.addComponent(rightKeyword);
    searchHLayout.setComponentAlignment(rightKeyword, Alignment.MIDDLE_CENTER);

    rightSearch = new Button("?", this);
    rightSearch.setImmediate(true);
    searchHLayout.addComponent(rightSearch);
    searchHLayout.setComponentAlignment(rightSearch, Alignment.MIDDLE_CENTER);

    // 
    // 
    rightTable = new Table("?");
    rightTable.setStyleName("striped");
    rightTable.setSelectable(true);
    rightTable.setMultiSelect(true);
    rightTable.setWidth("100%");
    rightTable.setPageLength(16);
    rightTable.setRowHeaderMode(Table.ROW_HEADER_MODE_INDEX);
    rightVLayout.addComponent(rightTable);

    rightTableContainer = new BeanItemContainer<User>(User.class);
    rightTableContainer.addNestedContainerProperty("department.name");
    rightTable.setContainerDataSource(rightTableContainer);
    rightTable.setVisibleColumns(VISIBLE_PROPERTIES);
    rightTable.setColumnHeaders(COL_HEADERS);
    rightTable.addGeneratedColumn("priority", new PriorityColumnGenerate());
    rightTable.setColumnHeader("priority", "");

    return rightVLayout;
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.DynQueueMemberManagement.java

/**
 *  ??/*from   w  w w  .java 2  s  .  c  om*/
 */
private void createPriorityConfirmWindow() {
    globalPriorityConfirmWindow = new Window("?");
    globalPriorityConfirmWindow.center();
    globalPriorityConfirmWindow.setWidth("300px");
    globalPriorityConfirmWindow.setModal(true);
    globalPriorityConfirmWindow.setResizable(false);

    VerticalLayout windowContent = new VerticalLayout();
    windowContent.setSizeFull();
    windowContent.setMargin(true);
    windowContent.setSpacing(true);
    globalPriorityConfirmWindow.setContent(windowContent);

    noticeInPriorityWindow = new Label("", Label.CONTENT_XHTML);
    windowContent.addComponent(noticeInPriorityWindow);

    HorizontalLayout buttonsHLayout = new HorizontalLayout();
    buttonsHLayout.setSpacing(true);
    windowContent.addComponent(buttonsHLayout);

    submit = new Button(" ", this);
    abolish = new Button("? ", this);
    abolish.setStyleName("default");
    buttonsHLayout.addComponent(submit);
    buttonsHLayout.addComponent(abolish);
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java

/**
 * ?//from  w ww  .  j a v  a 2  s  . c  o m
 * @param panelContent
 */
private void createStartSetting(VerticalLayout panelContent) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    panelContent.addComponent(layout);

    Label caption = new Label("?");
    caption.setWidth("-1px");
    caption.setDescription(
            "<B>????</B>");
    layout.addComponent(caption);

    startSettingOption = new OptionGroup();
    startSettingOption.addItem(true);
    startSettingOption.addItem(false);
    startSettingOption.setItemCaption(true, "?");
    startSettingOption.setItemCaption(false, "");
    startSettingOption.setImmediate(true);
    startSettingOption.setReadOnly(true);
    startSettingOption.setDescription(
            "<B>????</B>");
    startSettingOption.setNullSelectionAllowed(false);
    startSettingOption.addStyleName("twocol200");
    startSettingOption.addStyleName("myopacity");
    layout.addComponent(startSettingOption);
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java

/**
 * ?CSR ?/*w  w w  . jav  a2s.  com*/
 * @param panelContent
 */
private void createLicensed2Csr(VerticalLayout panelContent) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    panelContent.addComponent(layout);

    Label caption = new Label("???");
    caption.setWidth("-1px");
    caption.setDescription("<B>???</B>");
    layout.addComponent(caption);

    licensed2CsrOption = new OptionGroup();
    licensed2CsrOption.addItem(true);
    licensed2CsrOption.addItem(false);
    licensed2CsrOption.setItemCaption(true, "");
    licensed2CsrOption.setItemCaption(false, "?");
    licensed2CsrOption.setImmediate(true);
    licensed2CsrOption.setReadOnly(true);
    licensed2CsrOption
            .setDescription("<B>???</B>");
    licensed2CsrOption.setNullSelectionAllowed(false);
    licensed2CsrOption.addStyleName("twocol200");
    licensed2CsrOption.addStyleName("myopacity");
    layout.addComponent(licensed2CsrOption);
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java

/**
 *  (????)/*from ww w. j  a  va  2  s.  c o m*/
 * @param panelContent
 */
private void createDaysOfWeekType(VerticalLayout panelContent) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    panelContent.addComponent(layout);

    Label caption = new Label("");
    caption.setWidth("-1px");
    caption.setDescription("<B>?</B>");
    layout.addComponent(caption);

    dayOfWeekTypeSelector = new ComboBox();
    dayOfWeekTypeSelector.addItem("weekday");
    dayOfWeekTypeSelector.setItemCaption("weekday", "");
    dayOfWeekTypeSelector.addItem("weekend");
    dayOfWeekTypeSelector.setItemCaption("weekend", "");
    dayOfWeekTypeSelector.addItem("custom");
    dayOfWeekTypeSelector.setItemCaption("custom", "");
    dayOfWeekTypeSelector.setWidth("200px");
    dayOfWeekTypeSelector.setImmediate(true);
    dayOfWeekTypeSelector.setReadOnly(true);
    dayOfWeekTypeSelector.setDescription("<B>?</B>");
    dayOfWeekTypeSelector.setNullSelectionAllowed(false);
    dayOfWeekTypeSelector.addListener(this);
    layout.addComponent(dayOfWeekTypeSelector);
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java

/**
 * (??...) ???/*  w ww. j a va 2 s  . c o m*/
 * @param panelContent
 */
private void createDayOfWeek(VerticalLayout panelContent) {
    dayOfWeekLayout = new HorizontalLayout();
    dayOfWeekLayout.setSpacing(true);
    dayOfWeekLayout.setVisible(false);
    panelContent.addComponent(dayOfWeekLayout);

    Label caption = new Label("");
    caption.setWidth("-1px");
    caption.setDescription("<B>?</B>");
    dayOfWeekLayout.addComponent(caption);

    BeanItemContainer<DayOfWeek> container = new BeanItemContainer<DayOfWeek>(DayOfWeek.class);
    container.addBean(DayOfWeek.mon);
    container.addBean(DayOfWeek.tue);
    container.addBean(DayOfWeek.wen);
    container.addBean(DayOfWeek.thu);
    container.addBean(DayOfWeek.fri);
    container.addBean(DayOfWeek.sat);
    container.addBean(DayOfWeek.sun);

    daysOfWeekOption = new OptionGroup();
    daysOfWeekOption.setContainerDataSource(container);
    daysOfWeekOption.setItemCaptionPropertyId("name");
    daysOfWeekOption.setMultiSelect(true);
    daysOfWeekOption.setNullSelectionAllowed(false);
    daysOfWeekOption.setImmediate(true);
    daysOfWeekOption.setReadOnly(true);
    daysOfWeekOption.setDescription("<B>?</B>");
    daysOfWeekOption.addStyleName("threecol");
    daysOfWeekOption.addStyleName("myopacity");
    dayOfWeekLayout.addComponent(daysOfWeekOption);
}

From source file:com.jiangyifen.ec2.ui.mgr.system.tabsheet.MgrPhone2PhoneSettingView.java

/**
 * ? (18:00 - 23:59 )/*  w w  w  .j  a v a 2 s .c  om*/
 * @param panelContent
 */
private void createRunRedirectTime(VerticalLayout panelContent) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    panelContent.addComponent(layout);

    Label caption = new Label("");
    caption.setWidth("-1px");
    caption.setDescription("<B></B>");
    layout.addComponent(caption);

    startRedirectHour = new ComboBox();
    startRedirectHour.setImmediate(true);
    startRedirectHour.setWidth("50px");
    startRedirectHour.setNullSelectionAllowed(false);
    layout.addComponent(startRedirectHour);

    Label space1 = new Label(" ");
    space1.setWidth("-1px");
    layout.addComponent(space1);

    startRedirectMinute = new ComboBox();
    startRedirectMinute.setImmediate(true);
    startRedirectMinute.setWidth("50px");
    startRedirectMinute.setNullSelectionAllowed(false);
    layout.addComponent(startRedirectMinute);

    Label to = new Label(" - ");
    to.setWidth("-1px");
    layout.addComponent(to);

    stopRedirectHour = new ComboBox();
    stopRedirectHour.setImmediate(true);
    stopRedirectHour.setWidth("50px");
    stopRedirectHour.setNullSelectionAllowed(false);
    layout.addComponent(stopRedirectHour);

    Label space2 = new Label(" ");
    space2.setWidth("-1px");
    layout.addComponent(space2);

    stopRedirectMinute = new ComboBox();
    stopRedirectMinute.setImmediate(true);
    stopRedirectMinute.setWidth("50px");
    stopRedirectMinute.setNullSelectionAllowed(false);
    layout.addComponent(stopRedirectMinute);

    for (int hour = 0; hour < 24; hour++) {
        startRedirectHour.addItem(hour);
        stopRedirectHour.addItem(hour);
    }

    for (int minute = 0; minute < 60; minute++) {
        startRedirectMinute.addItem(minute);
        stopRedirectMinute.addItem(minute);
    }

    startRedirectHour.setValue(18);
    stopRedirectHour.setValue(23);
    startRedirectMinute.setValue(0);
    stopRedirectMinute.setValue(59);

    startRedirectHour.setReadOnly(true);
    startRedirectMinute.setReadOnly(true);
    stopRedirectHour.setReadOnly(true);
    stopRedirectMinute.setReadOnly(true);
}