Example usage for com.vaadin.ui HorizontalLayout addComponent

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

Introduction

In this page you can find the example usage for com.vaadin.ui HorizontalLayout 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.system.tabsheet.DynQueueMemberManagement.java

/**
 *  ??//from   w  w w . j a  v a 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  ww w . j  ava 2s  .  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 ?/*from  w  ww .ja  va2  s.  c  om*/
 * @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

/**
 *  (????)/*w w  w  . j  a v  a 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

/**
 * ? (18:00 - 23:59 )/*from   ww w.j  av  a2 s .c o m*/
 * @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);
}

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

/**
 *  (noanswer?unonline?busy?force)/*  ww w  .  j a va  2s .c o m*/
 * @param panelContent
 */
private void createRedirectType(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);

    redirectTypeOption = new OptionGroup();
    redirectTypeOption.addItem("noanswer");
    redirectTypeOption.setItemCaption("noanswer", "?");
    redirectTypeOption.addItem("busy");
    redirectTypeOption.setItemCaption("busy", "");
    redirectTypeOption.addItem("unonline");
    redirectTypeOption.setItemCaption("unonline", "");
    redirectTypeOption.setNullSelectionAllowed(false);
    redirectTypeOption.addListener(this);
    redirectTypeOption.setImmediate(true);
    redirectTypeOption.setMultiSelect(true);
    redirectTypeOption.addStyleName("threecol");
    redirectTypeOption.addStyleName("myopacity");
    redirectTypeOption.setReadOnly(true);
    redirectTypeOption
            .setDescription("<B>????</B>");
    layout.addComponent(redirectTypeOption);
}

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 createSpecifiedPhone(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);

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

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

/**
 *  ????/*  w w  w  .  jav  a 2s .  c om*/
 * @param panelContent
 */
private void createCsrSelectTables(VerticalLayout panelContent) {
    csrSelectHLayout = new HorizontalLayout();
    csrSelectHLayout.setSpacing(true);
    csrSelectHLayout.setVisible(false);
    csrSelectHLayout.setWidth("100%");
    panelContent.addComponent(csrSelectHLayout);

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

    // ???
    HorizontalLayout panelLayout = new HorizontalLayout();
    panelLayout.setSpacing(true);
    panelLayout.setMargin(false, true, false, true);
    panelLayout.setWidth("100%");

    Panel tablePanel = new Panel();
    tablePanel.setContent(panelLayout);
    csrSelectHLayout.addComponent(tablePanel);
    csrSelectHLayout.setExpandRatio(tablePanel, 1.0f);

    // (??)
    VerticalLayout leftComponents = createLeftComponents();
    panelLayout.addComponent(leftComponents);
    panelLayout.setExpandRatio(leftComponents, 0.4f);

    // ??("?")
    VerticalLayout middleComponents = createMiddleComponents();
    panelLayout.addComponent(middleComponents);
    panelLayout.setComponentAlignment(middleComponents, Alignment.MIDDLE_CENTER);
    panelLayout.setExpandRatio(middleComponents, 0.2f);

    // ?(????)
    VerticalLayout rightComponents = createRightComponents();
    panelLayout.addComponent(rightComponents);
    panelLayout.setExpandRatio(rightComponents, 0.4f);
}

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

/**
 *  ?(??)/*  ww w. ja  v a2s.  c  o  m*/
 * @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);
    leftKeyword.setEnabled(false);
    searchHLayout.addComponent(leftKeyword);
    searchHLayout.setComponentAlignment(leftKeyword, Alignment.MIDDLE_CENTER);

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

    // 
    leftTable = new Table("?");
    leftTable.addStyleName("striped");
    leftTable.addStyleName("mydisabled");
    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(10);
    leftTable.setVisibleColumns(VISIBLE_PROPERTIES);
    leftTable.setColumnHeaders(COL_HEADERS);

    return leftVLayout;
}

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

/**
 * ??(????)//from   ww w  . jav a 2  s  . c o  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);
    rightKeyword.setEnabled(false);
    searchHLayout.addComponent(rightKeyword);
    searchHLayout.setComponentAlignment(rightKeyword, Alignment.MIDDLE_CENTER);

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

    // 
    rightTable = new Table("");
    rightTable.addStyleName("striped");
    rightTable.addStyleName("mydisabled");
    rightTable.setSelectable(true);
    rightTable.setMultiSelect(true);
    rightTable.setWidth("100%");
    rightTable.setPageLength(10);
    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);

    return rightVLayout;
}