Example usage for com.vaadin.ui VerticalLayout setSpacing

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

Introduction

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

Prototype

@Override
    public void setSpacing(boolean spacing) 

Source Link

Usage

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

public AddOutline(OutlineManagement outlineManagement) {
    this.center();
    this.setModal(true);
    this.setResizable(false);
    this.setWidth("360px");
    this.setHeight("335px");
    this.setCaption("");
    this.outlineManagement = outlineManagement;

    domain = SpringContextHolder.getDomain();
    sipConfigService = SpringContextHolder.getBean("sipConfigService");
    reloadAsteriskService = SpringContextHolder.getBean("reloadAsteriskService");
    queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService");
    phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService");
    userQueueService = SpringContextHolder.getBean("userQueueService");
    queueService = SpringContextHolder.getBean("queueService");
    autoDialoutTaskService = SpringContextHolder.getBean("autoDialoutTaskService");

    //WindowLayout
    VerticalLayout windowContent = new VerticalLayout();
    windowContent.setSizeUndefined();//from w ww. j  a va2s  . com
    windowContent.setMargin(false, true, true, true);
    windowContent.setSpacing(true);
    windowContent.setStyleName(StyleConfig.VERTICAL_STYLE);
    this.setContent(windowContent);

    // Form ?
    createFormComponent(windowContent);
}

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

public EditOutline(OutlineManagement outlineManagement) {
    this.center();
    this.setModal(true);
    this.setWidth("360px");
    this.setHeight("565px");
    this.setResizable(false);
    this.setCaption("");
    this.outlineManagement = outlineManagement;

    domain = SpringContextHolder.getDomain();
    sipConfigService = SpringContextHolder.getBean("sipConfigService");
    reloadAsteriskService = SpringContextHolder.getBean("reloadAsteriskService");
    queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService");
    phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService");
    userQueueService = SpringContextHolder.getBean("userQueueService");
    queueService = SpringContextHolder.getBean("queueService");
    autoDialoutTaskService = SpringContextHolder.getBean("autoDialoutTaskService");

    //WindowLayout
    VerticalLayout windowContent = new VerticalLayout();
    windowContent.setSizeUndefined();//  w  w w .j  a v  a  2 s  .  c om
    windowContent.setMargin(false, true, true, true);
    windowContent.setSpacing(true);
    windowContent.setStyleName(StyleConfig.VERTICAL_STYLE);
    this.setContent(windowContent);

    // Form ?
    createFormComponent(windowContent);
}

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

/**
 *  ?(??)/* w  w w  .jav  a  2  s . 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);
    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  .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 w  w.j av  a2s .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);
    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. j av a  2s  . c  o  m*/
 */
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

public MgrPhone2PhoneSettingView() {
    this.setMargin(true);
    this.setWidth("100%");
    this.setSpacing(true);

    domain = SpringContextHolder.getDomain();
    loginUser = SpringContextHolder.getLoginUser();
    userService = SpringContextHolder.getBean("userService");
    queueService = SpringContextHolder.getBean("queueService");
    userQueueService = SpringContextHolder.getBean("userQueueService");
    queueMemberRelationService = SpringContextHolder.getBean("queueMemberRelationService");
    phone2PhoneSettingService = SpringContextHolder.getBean("phone2PhoneSettingService");
    staticQueueMemberService = SpringContextHolder.getBean("staticQueueMemberService");

    notification = new Notification("");
    notification.setDelayMsec(1000);//from   w w  w .j  av a 2s. c o m
    notification.setHtmlContentAllowed(true);

    VerticalLayout panelContent = new VerticalLayout();
    panelContent.setSpacing(true);
    panelContent.setMargin(true);
    panelContent.setWidth("100%");

    panel = new Panel("?");
    panel.setContent(panelContent);
    panel.setStyleName("light");
    this.addComponent(panel);

    // ?
    createStartSetting(panelContent);

    // ?CSR ?
    createLicensed2Csr(panelContent);

    // 
    createDaysOfWeekType(panelContent);

    // 
    createDayOfWeek(panelContent);

    // 
    createRunRedirectTime(panelContent);

    // 
    createRedirectType(panelContent);

    // ?? 
    createNoanwserTimeout(panelContent);

    // ??
    createSpecifiedPhone(panelContent);

    // ??
    createPhoneArea(panelContent);

    // ????
    createCsrSelectTables(panelContent);

    // ?
    makeTableDragAble(new SourceIs(rightTable), leftTable, true);
    makeTableDragAble(new SourceIs(leftTable), rightTable, false);

    // ?
    HorizontalLayout operators = createOperatorButtons();
    this.addComponent(operators);
}

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

/**
 *  ?(??)/*from ww w. j a v a 2s  . 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);
    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.  j a va  2s.  c  o  m*/
 * 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);
    addAll.setEnabled(false);
    operatorVLayout.addComponent(addAll);
    operatorVLayout.setComponentAlignment(addAll, Alignment.MIDDLE_CENTER);

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

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

    removeAll = new Button("<<<", this);
    removeAll.setEnabled(false);
    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.MgrPhone2PhoneSettingView.java

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