Example usage for com.vaadin.ui Label setWidth

List of usage examples for com.vaadin.ui Label setWidth

Introduction

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

Prototype

@Override
    public void setWidth(String width) 

Source Link

Usage

From source file:com.jiangyifen.ec2.ui.csr.toolbar.CsrPhone2PhoneSettingWindow.java

/**
 *  (noanswer?unonline?busy?force)/*from ww  w .  j ava2s.  c  om*/
 * @param mainLayout
 */
private void createlRedirectType(VerticalLayout mainLayout) {
    HorizontalLayout layout = new HorizontalLayout();
    layout.setSpacing(true);
    mainLayout.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("threecol300");
    redirectTypeOption.addStyleName("myopacity");
    redirectTypeOption.setReadOnly(true);
    redirectTypeOption
            .setDescription("<B>????</B>");
    layout.addComponent(redirectTypeOption);
}

From source file:com.jiangyifen.ec2.ui.csr.toolbar.CsrPhone2PhoneSettingWindow.java

/**
 * ?? // ww  w . j a va  2  s. c  o m
 * @param mainLayout
 */
private void createNoanwserTimeout(VerticalLayout mainLayout) {
    noanswerLayout = new HorizontalLayout();
    noanswerLayout.setSpacing(true);
    noanswerLayout.setVisible(false);
    mainLayout.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.LoginLayout.java

/**
 * ??? (?, ?)/* w  w w  . java  2  s .  co  m*/
 */
private void createConflictManageWindow() {
    conflictManageWindow = new Window("?");
    conflictManageWindow.setModal(true);
    conflictManageWindow.setResizable(false);

    VerticalLayout mainLayout = new VerticalLayout();
    mainLayout.setSpacing(true);
    mainLayout.setMargin(true);
    mainLayout.setSizeUndefined();
    mainLayout.setWidth("400px");
    conflictManageWindow.setContent(mainLayout);

    Label captionLabel = new Label("<font color='blue'><B>??</B></font>",
            Label.CONTENT_XHTML);
    captionLabel.setWidth("-1px");
    mainLayout.addComponent(captionLabel);

    conflictNotice = new RichTextArea();
    conflictNotice.setReadOnly(true);
    conflictNotice.setWriteThrough(false);
    conflictNotice.setWidth("-1px");
    mainLayout.addComponent(conflictNotice);

    String placeholder = "&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp";
    Label noticeLabel = new Label(
            "<font color='red'><B>" + placeholder
                    + "?</B></font>",
            Label.CONTENT_XHTML);
    noticeLabel.setWidth("-1px");
    mainLayout.addComponent(noticeLabel);

    Label confirmLabel = new Label("<B>" + placeholder + "??</B>",
            Label.CONTENT_XHTML);
    confirmLabel.setWidth("-1px");
    mainLayout.addComponent(confirmLabel);

    // ???
    HorizontalLayout operatorHLayout = new HorizontalLayout();
    operatorHLayout.setSpacing(true);
    mainLayout.addComponent(operatorHLayout);

    confirm = new Button("", this);
    confirm.setImmediate(true);
    cancel = new Button("?", this);
    cancel.setStyleName("default");
    cancel.setImmediate(true);
    operatorHLayout.addComponent(confirm);
    operatorHLayout.addComponent(cancel);
}

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

/**
 * Form ?//  www. j a  va2s  . c  o  m
 * @return HorizontalLayout ?
 */
private HorizontalLayout creatFormFooterComponents() {
    HorizontalLayout buttonsLayout = new HorizontalLayout();
    buttonsLayout.setSpacing(true);
    buttonsLayout.setWidth("100%");

    // ?
    save = new Button("?", this);
    save.setStyleName("default");
    buttonsLayout.addComponent(save);

    // ?
    cancel = new Button("?", this);
    buttonsLayout.addComponent(cancel);

    // ??
    Label settingTypeLabel = new Label("??");
    settingTypeLabel.setWidth("-1px");
    buttonsLayout.addComponent(settingTypeLabel);
    buttonsLayout.setComponentAlignment(settingTypeLabel, Alignment.MIDDLE_CENTER);

    // ??
    settingType = new OptionGroup();
    settingType.addItem("typical");
    settingType.addItem("advanced");
    settingType.select("typical");
    settingType.setItemCaption("typical", "?");
    settingType.setItemCaption("advanced", "");
    settingType.setImmediate(true);
    settingType.setStyleName("twocol100");
    settingType.addListener((ValueChangeListener) this);
    buttonsLayout.addComponent(settingType);
    buttonsLayout.setComponentAlignment(settingType, Alignment.MIDDLE_CENTER);

    return buttonsLayout;
}

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

/**
 * ?  //w  ww  .ja  v  a 2 s . c  o m
 */
private void createQueueSelectComponents() {
    HorizontalLayout maintopLayout = new HorizontalLayout();
    maintopLayout.setSpacing(true);
    this.addComponent(maintopLayout);
    this.setComponentAlignment(maintopLayout, Alignment.MIDDLE_CENTER);

    Label caption = new Label("<B></B>", Label.CONTENT_XHTML);
    caption.setWidth("-1px");
    maintopLayout.addComponent(caption);

    queueSelector = new ComboBox();
    queueSelector.setNullSelectionAllowed(false);
    queueSelector.setImmediate(true);
    queueSelector.setContainerDataSource(queueContainer);
    queueSelector.setItemCaptionPropertyId("descriptionAndName");
    queueSelector.addListener(this);
    maintopLayout.addComponent(queueSelector);
}

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

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

/**
 * ?(???)/*w w w  .jav  a  2s  . co m*/
 */
private void createBottomComponents() {
    HorizontalLayout bottomHLayout = new HorizontalLayout();
    bottomHLayout.setSpacing(true);
    bottomHLayout.setWidth("100%");
    this.addComponent(bottomHLayout);

    // 
    HorizontalLayout bottomLeft = new HorizontalLayout();
    bottomLeft.setSpacing(true);
    bottomLeft.setWidth("-1px");
    bottomHLayout.addComponent(bottomLeft);
    bottomHLayout.setComponentAlignment(bottomLeft, Alignment.MIDDLE_LEFT);

    // ?
    save = new Button("? ", this);
    save.setStyleName("default");
    bottomLeft.addComponent(save);
    bottomLeft.setComponentAlignment(save, Alignment.MIDDLE_LEFT);

    // ?
    cancel = new Button("? ", this);
    bottomLeft.addComponent(cancel);
    bottomLeft.setComponentAlignment(cancel, Alignment.MIDDLE_LEFT);

    // ?
    HorizontalLayout bottomRight = new HorizontalLayout();
    bottomRight.setSpacing(true);
    bottomRight.setWidth("-1px");
    bottomHLayout.addComponent(bottomRight);
    bottomHLayout.setComponentAlignment(bottomRight, Alignment.MIDDLE_RIGHT);

    Label priorityCaption = new Label("<B>?</B>", Label.CONTENT_XHTML);
    priorityCaption.setWidth("-1px");
    bottomRight.addComponent(priorityCaption);
    bottomRight.setComponentAlignment(priorityCaption, Alignment.MIDDLE_RIGHT);

    priorityField = new TextField();
    priorityField.addListener(this);
    priorityField.setWidth("100px");
    priorityField.setImmediate(true);
    priorityField.setWriteThrough(false);
    bottomRight.addComponent(priorityField);
    bottomRight.setComponentAlignment(priorityField, Alignment.MIDDLE_RIGHT);

    // ?????
    setButtonsEnable(false);
}

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

/**
 * ?//from w  w w  .  ja va 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 ?//from  w  ww  .j  a v  a2  s .  c  o  m
 * @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);
}