Example usage for com.vaadin.ui HorizontalLayout HorizontalLayout

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

Introduction

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

Prototype

public HorizontalLayout() 

Source Link

Document

Constructs an empty HorizontalLayout.

Usage

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

/**
 * (??...) ???//  www.  ja 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 )//from   w ww  . ja v  a  2  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)//from   w  w  w .j  a v  a2  s  . 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

/**
 * ?? // w ww .  ja  va  2s . com
 * @param panelContent
 */
private void createNoanwserTimeout(VerticalLayout panelContent) {
    noanswerLayout = new HorizontalLayout();
    noanswerLayout.setSpacing(true);
    noanswerLayout.setVisible(false);
    panelContent.addComponent(noanswerLayout);

    Label freCaption = new Label("?");
    freCaption.setWidth("-1px");
    freCaption.setDescription(
            "<B>'?'??</B>");
    noanswerLayout.addComponent(freCaption);

    noanswerTimeoutSelector = new ComboBox();
    noanswerTimeoutSelector.setImmediate(true);
    noanswerTimeoutSelector.setWidth("50px");
    noanswerTimeoutSelector.setNullSelectionAllowed(false);
    noanswerTimeoutSelector.setDescription(
            "<B>'?'??</B>");
    noanswerLayout.addComponent(noanswerTimeoutSelector);

    for (int seconds = 3; seconds < 61; seconds++) {
        noanswerTimeoutSelector.addItem(seconds);
    }
    noanswerTimeoutSelector.setValue(10);
    noanswerTimeoutSelector.setReadOnly(true);

    Label postCaption = new Label(" ");
    postCaption.setWidth("-1px");
    postCaption.setDescription(
            "<B>'?'??</B>");
    noanswerLayout.addComponent(postCaption);
}

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

/**
 * ???/* w w  w  . j  ava  2s.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  ww .  j  a  va 2 s.  c  o  m*/
 * @param panelContent
 */
private void createPhoneArea(VerticalLayout panelContent) {
    phoneAreaLayout = new HorizontalLayout();
    phoneAreaLayout.setWidth("100%");
    phoneAreaLayout.setVisible(false);
    phoneAreaLayout.setSpacing(true);
    panelContent.addComponent(phoneAreaLayout);

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

    phoneArea = new TextArea();
    phoneArea.setRows(6);
    phoneArea.setWidth("100%");
    phoneArea.setImmediate(true);
    phoneArea.setReadOnly(true);
    phoneArea.setInputPrompt(
            "???, ???(,)?");
    phoneArea.setDescription(
            "<B>'??'???</B>");
    phoneAreaLayout.addComponent(phoneArea);
    phoneAreaLayout.setExpandRatio(phoneArea, 1.0f);
}

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

/**
 *  ????/* w ww .  j  av a 2 s  .com*/
 * @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

/**
 *  ?(??)//from  w  w  w  .ja v  a 2s  . co 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

/**
 * ??(????)//  w w  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;
}

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

/**
 * ?//ww  w. j  a  v a2 s.  c  o m
 * @return
 */
private HorizontalLayout createOperatorButtons() {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);

    // 
    edit = new Button(" ", this);
    edit.setStyleName("default");
    edit.setVisible(true);
    edit.setImmediate(true);
    layout.addComponent(edit);

    // ?
    save = new Button("? ", this);
    save.setStyleName("default");
    save.setVisible(false);
    save.setImmediate(true);
    layout.addComponent(save);

    // ?
    cancel = new Button("? ", this);
    layout.addComponent(cancel);
    cancel.setVisible(false);
    cancel.setImmediate(true);

    return layout;
}