Example #1
0
  @Override
  protected void init(VaadinRequest vaadinRequest) {
    final VerticalLayout layout = new VerticalLayout();
    layout.setSizeFull();
    setContent(layout);

    HorizontalLayout styleToolbar = createStyleToolbar();
    layout.addComponent(styleToolbar);
    layout.setExpandRatio(styleToolbar, 0);
    initSpreadsheet();
    layout.addComponent(spreadsheet);
    layout.setExpandRatio(spreadsheet, 1);
  }
  @Override
  public void initUI() {

    this.setSizeFull();
    this.setSpacing(true);

    HorizontalSplitPanel hl = new HorizontalSplitPanel();
    hl.setSplitPosition(20, Unit.PERCENTAGE);
    hl.setSizeFull();
    hl.setLocked(false);
    hl.addStyleName(Runo.SPLITPANEL_SMALL);

    getProjectsList().setSizeFull();

    VerticalLayout vl = new VerticalLayout();
    vl.setSizeFull();
    vl.setSpacing(true);
    vl.setMargin(true);

    vl.addComponent(getDateSelector());
    vl.addComponent(getReportsComponent());
    vl.setExpandRatio(getReportsComponent(), 1.0f);

    hl.addComponent(getProjectsList());
    hl.addComponent(vl);

    this.addComponent(hl);
  }
Example #3
0
  public DashboardView() {
    addStyleName(ValoTheme.PANEL_BORDERLESS);
    setSizeFull();
    DashboardEventBus.register(this);

    root = new VerticalLayout();
    root.setSizeFull();
    root.setSpacing(false);
    root.addStyleName("dashboard-view");
    setContent(root);
    Responsive.makeResponsive(root);

    root.addComponent(buildHeader());

    root.addComponent(buildSparklines());

    Component content = buildContent();
    root.addComponent(content);
    root.setExpandRatio(content, 1);

    // All the open sub-windows should be closed whenever the root layout
    // gets clicked.
    root.addLayoutClickListener(
        new LayoutClickListener() {
          @Override
          public void layoutClick(final LayoutClickEvent event) {
            DashboardEventBus.post(new CloseOpenWindowsEvent());
          }
        });
  }
Example #4
0
  private final void init() {

    if (content instanceof AbstractOrderedLayout) {
      ((AbstractOrderedLayout) content).setSpacing(true);
      ((AbstractOrderedLayout) content).setMargin(true);
    }
    if (content instanceof GridLayout) {
      addStyleName("marginTop");
    }

    if (null != content) {
      mainLayout.addComponent(content);
      mainLayout.setExpandRatio(content, 1.0F);
    }

    createMandatoryLabel();

    final HorizontalLayout buttonLayout = createActionButtonsLayout();
    mainLayout.addComponent(buttonLayout);
    mainLayout.setComponentAlignment(buttonLayout, Alignment.TOP_CENTER);

    setCaption(caption);
    setCaptionAsHtml(true);
    setContent(mainLayout);
    setResizable(false);
    center();
    setModal(true);
    addStyleName("fontsize");
    setOrginaleValues();
    addComponentListeners();
  }
  UploadStatusInfoWindow(
      final UIEventBus eventBus, final ArtifactUploadState artifactUploadState, final I18N i18n) {
    this.eventBus = eventBus;
    this.artifactUploadState = artifactUploadState;
    this.i18n = i18n;

    setPopupProperties();
    createStatusPopupHeaderComponents();

    mainLayout = new VerticalLayout();
    mainLayout.setSpacing(Boolean.TRUE);
    mainLayout.setSizeUndefined();
    setPopupSizeInMinMode();

    uploads = getGridContainer();
    grid = createGrid();
    setGridColumnProperties();

    mainLayout.addComponents(getCaptionLayout(), grid);
    mainLayout.setExpandRatio(grid, 1.0F);
    setContent(mainLayout);
    eventBus.subscribe(this);
    ui = UI.getCurrent();

    createConfirmDialog();
  }
Example #6
0
  public SampleCrudView() {
    setSizeFull();
    addStyleName("crud-view");
    HorizontalLayout topLayout = createTopBar();

    grid = new ProductGrid();
    grid.addSelectionListener(
        new SelectionListener() {

          @Override
          public void select(SelectionEvent event) {
            viewLogic.rowSelected(grid.getSelectedRow());
          }
        });

    form = new ProductForm(viewLogic);
    // form.setCategories(DataService.get().getAllCategories());//should be in the Logic init, views
    // should not know about database
    // the main View could be an intermediate between sub-view and the main Logic
    // VO.setFormDataCategories(Ob) -> form.setCategories(Ob)

    VerticalLayout barAndGridLayout = new VerticalLayout();
    barAndGridLayout.addComponent(topLayout);
    barAndGridLayout.addComponent(grid);
    barAndGridLayout.setMargin(true);
    barAndGridLayout.setSpacing(true);
    barAndGridLayout.setSizeFull();
    barAndGridLayout.setExpandRatio(grid, 1);
    barAndGridLayout.setStyleName("crud-main-layout");

    addComponent(barAndGridLayout);
    addComponent(form);

    viewLogic.init();
  }
Example #7
0
  private void buildMainLayout() {
    // setMainWindow(new Window("Address Book Demo application"));

    MyApplication.debug(3, "buildMainLayout");
    // getWindow().setName("FirstPage!");
    layout = new VerticalLayout();
    layout.setSizeFull();

    layout.addComponent(createToolbar());
    layout.addComponent(horizontalSplit);

    /* Allocate all available extra space to the horizontal split panel */

    layout.setExpandRatio(horizontalSplit, 1);
    /* Set the initial split position so we can have a 200 pixel menu to the left */

    horizontalSplit.setSplitPosition(200, SplitPanel.UNITS_PIXELS);
    MyApplication.debug(3, "buildMainLayout 2");
    try {
      if (layout != null) {
        getWindow().setLayout(layout);
        MyApplication.debug(3, "buildMainLayout end");
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
  }
Example #8
0
  @Override
  public void bind() {
    final VerticalLayout mainLayout = this.view.getMainLayout();
    final HorizontalSplitPanel layoutPanel = this.view.getSplitLayout();
    mainLayout.setExpandRatio(layoutPanel, 1.0f);
    layoutPanel.setSplitPosition(25, HorizontalSplitPanel.UNITS_PERCENTAGE);

    componentLocation();
  }
  public void buildView() {
    TabSheet tabSheet = new TabSheet();
    tabSheet.setSizeFull();
    VerticalLayout layoutUtama = new VerticalLayout();
    layoutUtama.setSizeFull();
    layoutUtama.setMargin(true);

    // LAYOUT TOP
    VerticalLayout layoutTop = new VerticalLayout();
    layoutTop.setMargin(true);
    HorizontalLayout layoutTopInner1 = new HorizontalLayout();
    HorizontalLayout layoutTopInner2 = new HorizontalLayout();
    layoutTop.addComponent(layoutTopInner1);
    layoutTop.addComponent(layoutTopInner2);

    // LAYOUT TABLE
    VerticalLayout layoutTable = new VerticalLayout();
    layoutTable.setSizeFull();
    layoutTable.addComponent(table);
    table.setSizeFull();

    // LAYOUT BOTTOM
    VerticalLayout layoutBottom = new VerticalLayout();
    HorizontalLayout layoutFooter1 = new HorizontalLayout();
    HorizontalLayout layoutFooter2 = new HorizontalLayout();
    layoutBottom.addComponent(layoutFooter1);
    layoutBottom.addComponent(layoutFooter2);

    // LAYOUT UTAMA
    layoutUtama.addComponent(layoutTop);
    layoutUtama.addComponent(layoutTable);
    layoutUtama.addComponent(layoutBottom);

    tabSheet.addComponent(layoutUtama);
    content.addComponent(tabSheet);
    setCompositionRoot(content);

    // Extended Konfigurasi Size
    layoutUtama.setExpandRatio(layoutTable, 1);

    layoutTopInner1.addComponent(fieldSearchById);
    layoutTopInner1.setComponentAlignment(fieldSearchById, Alignment.BOTTOM_CENTER);
    layoutTopInner1.addComponent(comboSearchByDivision);
    layoutTopInner1.setComponentAlignment(comboSearchByDivision, Alignment.BOTTOM_CENTER);
    layoutTopInner1.addComponent(dateFieldSearchByTransdateFrom);
    layoutTopInner1.setComponentAlignment(dateFieldSearchByTransdateFrom, Alignment.BOTTOM_CENTER);
    layoutTopInner1.addComponent(dateFieldSearchByTransdateTo);
    layoutTopInner1.setComponentAlignment(dateFieldSearchByTransdateTo, Alignment.BOTTOM_CENTER);

    layoutTopInner1.addComponent(btnSearch);
    layoutTopInner1.setComponentAlignment(btnSearch, Alignment.BOTTOM_CENTER);

    layoutBottom.addComponent(btnSelect);

    // init
    formLayout.setVisible(true);
  }
Example #10
0
 private void buildMainLayout() {
   setMainWindow(new Window("Rss Reader application"));
   VerticalLayout layout = new VerticalLayout();
   layout.setSizeFull();
   layout.addComponent(createToolbar());
   layout.addComponent(horizontalSplit);
   layout.setExpandRatio(horizontalSplit, 1);
   horizontalSplit.setSplitPosition(400, SplitPanel.UNITS_PIXELS);
   getMainWindow().setContent(layout);
 }
Example #11
0
  public void initializePanelLeft() {
    txtSearch = new TextField();
    txtSearch.setWidth("100%");
    txtSearch.setHeight("100%");

    txtSearch.addListener(
        new TextChangeListener() {
          private static final long serialVersionUID = 1L;

          public void textChange(TextChangeEvent event) {
            String filter = event.getText();
            search(filter);
          }
        });

    btnSearch.setStyleName("searchButton");
    btnSearch.setDescription("Buscar");

    HorizontalLayout pnlSearch = new HorizontalLayout();
    pnlSearch.setWidth("100%");
    pnlSearch.setHeight("100%");
    pnlSearch.setMargin(false);
    pnlSearch.addComponent(txtSearch);
    pnlSearch.addComponent(btnSearch);

    lstStudents = new ListSelect("Alumnos Disponibles");
    lstStudents.setSizeFull();
    lstStudents.setMultiSelect(true);

    // panel left
    VerticalLayout pnlLeft = new VerticalLayout();
    pnlLeft.setHeight("100%");
    pnlLeft.setWidth("100%");
    pnlLeft.addComponent(pnlSearch);
    pnlLeft.addComponent(lstStudents);
    pnlLeft.setMargin(false);
    pnlLeft.setExpandRatio(pnlSearch, new Float(0.08));
    pnlLeft.setExpandRatio(lstStudents, new Float(0.92));

    mainPanel.addComponent(pnlLeft);
    mainPanel.setExpandRatio(pnlLeft, new Float(0.45));
  }
Example #12
0
 private Component getSimpleFilterTab() {
   simpleFilterTab = new VerticalLayout();
   final VerticalLayout targetTagTableLayout = new VerticalLayout();
   targetTagTableLayout.setSizeFull();
   if (null != config) {
     targetTagTableLayout.addComponent(config);
     targetTagTableLayout.setComponentAlignment(config, Alignment.TOP_RIGHT);
   }
   targetTagTableLayout.addComponent(filterByButtons);
   targetTagTableLayout.setComponentAlignment(filterByButtons, Alignment.MIDDLE_CENTER);
   targetTagTableLayout.setId(UIComponentIdProvider.TARGET_TAG_DROP_AREA_ID);
   targetTagTableLayout.setExpandRatio(filterByButtons, 1.0F);
   simpleFilterTab.setCaption(i18n.get("caption.filter.simple"));
   simpleFilterTab.addComponent(targetTagTableLayout);
   simpleFilterTab.setExpandRatio(targetTagTableLayout, 1.0F);
   simpleFilterTab.addComponent(filterByStatusFotter);
   simpleFilterTab.setComponentAlignment(filterByStatusFotter, Alignment.MIDDLE_CENTER);
   simpleFilterTab.setSizeFull();
   simpleFilterTab.addStyleName(SPUIStyleDefinitions.SIMPLE_FILTER_HEADER);
   return simpleFilterTab;
 }
  @Override
  public void attach() {
    setSizeFull();
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setSizeFull();
    layout.addStyleName("loadbalancer-tab");
    layout.setSpacing(false);
    layout.setMargin(false);

    // スプリットパネル
    SplitPanel splitPanel = new SplitPanel();
    splitPanel.setOrientation(SplitPanel.ORIENTATION_VERTICAL);
    splitPanel.setSplitPosition(40);
    splitPanel.setSizeFull();
    layout.addComponent(splitPanel);

    // スプリットパネル上段
    VerticalLayout upperLayout = new VerticalLayout();
    upperLayout.setSizeFull();
    upperLayout.setSpacing(false);
    upperLayout.setMargin(false);

    CssLayout upperTopLayout = new CssLayout();
    Label label = new Label(ViewProperties.getCaption("label.loadbalancer"));
    upperTopLayout.setWidth("100%");
    upperTopLayout.setMargin(true);
    upperTopLayout.addStyleName("loadbalancer-table-label");
    upperTopLayout.addComponent(label);
    upperTopLayout.setHeight("28px");
    upperLayout.addComponent(upperTopLayout);

    loadBalancerTable = new LoadBalancerTable(sender);
    loadBalancerTable.setContainerDataSource(new LoadBalancerDtoContainer());
    upperLayout.addComponent(loadBalancerTable);
    loadBalancerTable.addListener(
        new ValueChangeListener() {
          @Override
          public void valueChange(ValueChangeEvent event) {
            tableRowSelected(event);
          }
        });

    loadBalancerButtonsBottom = new LoadBalancerButtonsBottom(sender);
    upperLayout.addComponent(loadBalancerButtonsBottom);
    upperLayout.setExpandRatio(loadBalancerTable, 10);
    splitPanel.addComponent(upperLayout);

    // スプリットパネル下段
    loadBalancerDesc = new LoadBalancerDesc(sender);
    splitPanel.addComponent(loadBalancerDesc);
  }
  @Override
  public void initWidget() throws WidgetInitalizeException {
    setCaption(I18NResource.localize("User Capabilities"));
    setStyleName(SecurityDefaultTheme.CSS_PANEL_BUBBLE);
    getUserCapabilitiesTable().addStyleName(SecurityDefaultTheme.CSS_TABLE_SMALL_STRIPED);
    getUserCapabilitiesTable().addStyleName(SecurityDefaultTheme.CSS_TABLE_BORDERLESS);

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setSpacing(true);
    layout.addComponent(getUserCapabilitiesTable());
    getUserCapabilitiesTable().setSizeFull();
    layout.setExpandRatio(getUserCapabilitiesTable(), 1);
  }
Example #15
0
  public EditorView(ProjectFile file, Project project, User user, boolean inIde, int line) {
    super();
    this.file = file;
    this.project = project;
    this.user = user;
    layout.setSizeFull();

    HorizontalLayout ho = new HorizontalLayout();
    if (!inIde) {
      String url = "#" + project.getName() + "/" + file.getName() + "!";
      Link link = new Link("<<< " + file.getName(), new ExternalResource(url));
      link.setDescription("View project");
      layout.addComponent(link);
    }
    if (inIde) {
      String url = "#" + project.getName() + "/" + file.getName();
      Link link = new Link(file.getName() + " >>>", new ExternalResource(url));
      link.setDescription("View in standalone window");
      layout.addComponent(link);
    }

    layout.addComponent(ho);

    layout.setExpandRatio(ho, 1);
    ho.setSizeFull();

    cdoc = project.getDoc(file);

    editor = createEditor(file, project);
    editor.setSizeFull();
    editor.setEnabled(user != null);
    editor.setUser(user.getUserId(), user.getStyle());

    final int pos =
        org.vaadin.aceeditor.gwt.shared.Util.cursorPosFromLineCol(
            cdoc.getShared().getValue().getText(), line, 0, 1);
    editor.scrollToPosition(pos);
    ho.addComponent(editor);
    ho.setExpandRatio(editor, 1);

    VerticalLayout rightBar = new VerticalLayout();
    rightBar.setWidth("64px");
    rightBar.addComponent(userLayout);
    rightBar.addComponent(markerLayout);

    ho.addComponent(rightBar);

    setSizeFull();
    setCompositionRoot(layout);
  }
Example #16
0
 private void setView(String string) {
   Component component = views.get(string);
   if (component == null) {
     getMainWindow().showNotification("View called " + string + " not found!");
   } else if (component != currentView) {
     if (currentView != null) {
       mainLayout.replaceComponent(currentView, component);
     } else {
       mainLayout.addComponent(component);
     }
     // give all extra space for view
     mainLayout.setExpandRatio(component, 1);
     currentView = component;
   }
 }
Example #17
0
 @Override
 public void buttonClick(Button.ClickEvent event) {
   if (event.getButton() == btDetails) {
     if (detailsPanel.isVisible()) {
       detailsPanel.setVisible(false);
       btDetails.setCaption("Show Details");
       layout.setExpandRatio(detailsPanel, 0.0f);
       layout.setExpandRatio(actionsLayout, 1.0f);
     } else {
       detailsPanel.setVisible(true);
       btDetails.setCaption("Hide Details");
       layout.setExpandRatio(detailsPanel, 1.0f);
       layout.setExpandRatio(actionsLayout, 0.0f);
     }
   } else if (event.getButton() == btClose) {
     this.close();
   } else if (event.getButton() == btReportBug) {
     this.close();
     UI ui = UI.getCurrent();
     if (ui instanceof SearchUI) {
       ((SearchUI) ui).reportBug(cause);
     }
   }
 }
  @Secured({"ROLE_ANONYMOUS", "ROLE_USER", "ROLE_ADMIN"})
  @Override
  public Layout createContent(final String parameters, final MenuBar menuBar, final Panel panel) {
    final VerticalLayout panelContent = createPanelContent();

    final String pageId = getPageId(parameters);

    final DataContainer<ViewRiksdagenMinistry, String> dataContainer =
        getApplicationManager().getDataContainer(ViewRiksdagenMinistry.class);

    final ViewRiksdagenMinistry viewRiksdagenMinistry = dataContainer.load(pageId);

    if (viewRiksdagenMinistry != null) {

      getMinistryMenuItemFactory().createMinistryMenuBar(menuBar, pageId);

      LabelFactory.createHeader2Label(panelContent, OVERVIEW);

      final Link addMinistryPageLink =
          getPageLinkFactory().addMinistryPageLink(viewRiksdagenMinistry);
      panelContent.addComponent(addMinistryPageLink);

      getFormFactory()
          .addFormPanelTextFields(
              panelContent,
              new BeanItem<>(viewRiksdagenMinistry),
              ViewRiksdagenMinistry.class,
              Arrays.asList(
                  new String[] {
                    "nameId",
                    "active",
                    "firstAssignmentDate",
                    "lastAssignmentDate",
                    "totalAssignments",
                    "totalDaysServed",
                    "currentMemberSize"
                  }));

      panelContent.setExpandRatio(addMinistryPageLink, ContentRatio.SMALL);

      panel.setCaption(MINISTRY + viewRiksdagenMinistry.getNameId());
      getPageActionEventHelper()
          .createPageEvent(
              ViewAction.VISIT_MINISTRY_VIEW, ApplicationEventGroup.USER, NAME, parameters, pageId);
    }

    return panelContent;
  }
  @Override
  public void attach() {
    setSizeFull();
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout layout = (VerticalLayout) getContent();
    layout.setSizeFull();
    layout.addStyleName("server-tab");
    layout.setSpacing(false);
    layout.setMargin(false);

    // スプリットパネル
    SplitPanel splitPanel = new SplitPanel();
    splitPanel.setOrientation(SplitPanel.ORIENTATION_VERTICAL);
    splitPanel.setSplitPosition(40);
    splitPanel.setSizeFull();
    layout.addComponent(splitPanel);

    // スプリットパネル上段
    VerticalLayout upperLayout = new VerticalLayout();
    upperLayout.setSizeFull();
    upperLayout.setSpacing(false);
    upperLayout.setMargin(false);

    serverButtonsTop = new ServerButtonsTop(sender);
    upperLayout.addComponent(serverButtonsTop);

    serverTable = new ServerTable(sender);
    serverTable.setContainerDataSource(new InstanceDtoContainer());
    upperLayout.addComponent(serverTable);
    serverTable.addListener(
        new ValueChangeListener() {
          @Override
          public void valueChange(ValueChangeEvent event) {
            tableRowSelected(event);
          }
        });

    serverButtonsBottom = new ServerButtonsBottom(sender);
    upperLayout.addComponent(serverButtonsBottom);
    upperLayout.setExpandRatio(serverTable, 10);
    splitPanel.addComponent(upperLayout);

    // スプリットパネル下段
    serverDesc = new ServerDesc(sender);
    splitPanel.addComponent(serverDesc);
  }
  private void createLayout(VaadinRequest pRequest) {
    HorizontalSplitPanel browserPanel = createBrowserPanel();

    final VerticalLayout layout = this; // new VerticalLayout();
    //        layout.setMargin(false, false, false, false);
    layout.setSizeFull();

    layout.addComponent(createToolbar());
    layout.addComponent(browserPanel);
    //        layout.addComponent(mPusher);

    // @see http://vaadin.com/forum/-/message_boards/message/197142
    layout.setExpandRatio(browserPanel, 1);
    //        layout.setExpandRatio(mPusher, 0);

    //        setContent(layout);
    //        setSizeFull();
  }
Example #21
0
  @Override
  public void attach() {
    hasAnyResult = false;
    VerticalLayout layout = (VerticalLayout) getLayout();
    try {
      integration = createIntegration();
      layout.addComponent(integration);
      layout.setExpandRatio(integration, 1f);
      integration.setErrorReceiver(new ErrorReceiver());
      integration.setValueReceiver(new ValueReceiver());
    } catch (RuntimeException e) {
      Logger.getLogger(getClass().getName()).log(Level.WARNING, "ошибка загрузки шаблона", e);
      layout.addComponent(
          new Label("Ошибка загрузки формы ввода данных " + e.getLocalizedMessage()));
    }

    super.attach();
  }
  public DashboardView() {
    activities = getActivities();
    addStyleName(ValoTheme.PANEL_BORDERLESS);
    setSizeFull();
    DashboardEventBus.register(this);

    root = new VerticalLayout();
    root.setSizeFull();
    root.setMargin(true);
    root.addStyleName("dashboard-view");
    setContent(root);
    Responsive.makeResponsive(root);

    root.addComponent(buildSparkCards());

    Component content = buildContent();
    root.addComponent(content);
    root.setExpandRatio(content, 1);
  }
Example #23
0
  @AutoGenerated
  private VerticalLayout buildAddressLayout() {
    // common part: create layout
    addressLayout = new VerticalLayout();
    addressLayout.setImmediate(false);
    addressLayout.setWidth("100.0%");
    addressLayout.setHeight("100.0%");
    addressLayout.setMargin(false);

    // clientAddressField
    addressField = new AddressField();
    addressField.setImmediate(false);
    addressField.setWidth("100.0%");
    addressField.setHeight("100.0%");
    addressLayout.addComponent(addressField);
    addressLayout.setExpandRatio(addressField, 1.0f);

    return addressLayout;
  }
  @AutoGenerated
  private VerticalLayout buildVerticalLayout_1() {
    // common part: create layout
    verticalLayout_1 = new VerticalLayout();
    verticalLayout_1.setImmediate(false);
    verticalLayout_1.setWidth("100.0%");
    verticalLayout_1.setHeight("100.0%");
    verticalLayout_1.setMargin(false);

    // gameResultTable
    gameResultTable = new Table();
    gameResultTable.setImmediate(false);
    gameResultTable.setWidth("100.0%");
    gameResultTable.setHeight("100.0%");
    verticalLayout_1.addComponent(gameResultTable);
    verticalLayout_1.setExpandRatio(gameResultTable, 1.0f);

    return verticalLayout_1;
  }
Example #25
0
  @AutoGenerated
  private VerticalLayout buildRolLayout() {
    // common part: create layout
    rolLayout = new VerticalLayout();
    rolLayout.setImmediate(false);
    rolLayout.setWidth("100.0%");
    rolLayout.setHeight("100.0%");
    rolLayout.setMargin(false);

    // userRoleCollectionField
    userRoleCollectionField = new UserRoleCollectionField();
    userRoleCollectionField.setImmediate(false);
    userRoleCollectionField.setWidth("100.0%");
    userRoleCollectionField.setHeight("100.0%");
    rolLayout.addComponent(userRoleCollectionField);
    rolLayout.setExpandRatio(userRoleCollectionField, 1.0f);

    return rolLayout;
  }
  public ServerDescBasic() {
    setHeight("100%");
    addStyleName(Reindeer.PANEL_LIGHT);

    VerticalLayout panel = (VerticalLayout) getContent();
    panel.setWidth("100%");
    panel.setHeight("100%");
    panel.setMargin(true);
    panel.setSpacing(false);
    panel.addStyleName("server-desc-basic");

    HorizontalLayout hlPanels = new HorizontalLayout();
    hlPanels.setWidth("100%");
    hlPanels.setHeight("100%");
    hlPanels.setMargin(true);
    hlPanels.setSpacing(true);
    hlPanels.addStyleName("server-desc-basic");
    //        setContent(hlPanels);

    left.setWidth("100%");
    right.setHeight("100%");
    right.setWidth("100%");

    // 表同士の間隔をあける
    Label padding = new Label(" ");
    padding.setWidth("7px");
    padding.setHeight("99%");
    padding.addStyleName("desc-padding");

    Label padding2 = new Label("");
    padding2.setWidth("1px");

    hlPanels.addComponent(left);
    hlPanels.addComponent(padding);
    hlPanels.addComponent(padding2);
    hlPanels.addComponent(right);
    hlPanels.setExpandRatio(left, 40);
    hlPanels.setExpandRatio(right, 60);

    panel.addComponent(hlPanels);
    panel.setExpandRatio(hlPanels, 1.0f);
  }
Example #27
0
  @Override
  protected void setup(VaadinRequest request) {
    TestUtils.injectCSS(this, ".hugemargin { margin: 10px 20px !important; }");

    HorizontalLayout hl = new HorizontalLayout();
    addLayoutTest(hl);
    hl.setExpandRatio(hl.getComponent(0), 1.0f);
    hl.setExpandRatio(hl.getComponent(2), 0.5f);
    VerticalLayout vl = new VerticalLayout();
    addLayoutTest(vl);
    vl.setExpandRatio(vl.getComponent(0), 1.0f);
    vl.setExpandRatio(vl.getComponent(2), 0.5f);

    GridLayout gl = new GridLayout(2, 1);
    addLayoutTest(gl);
    gl.setColumnExpandRatio(0, 1.0f);
    gl.setRowExpandRatio(0, 1.0f);
    gl.setColumnExpandRatio(1, 0.5f);
    gl.setRowExpandRatio(1, 0.5f);
  }
Example #28
0
  @AutoGenerated
  private VerticalLayout buildMainLayout() {
    // common part: create layout
    mainLayout = new VerticalLayout();
    mainLayout.setImmediate(false);
    mainLayout.setWidth("100%");
    mainLayout.setHeight("100%");
    mainLayout.setMargin(false);

    // top-level component properties
    setWidth("100.0%");
    setHeight("100.0%");

    // workAreaLayout
    workAreaLayout = buildWorkAreaLayout();
    mainLayout.addComponent(workAreaLayout);
    mainLayout.setExpandRatio(workAreaLayout, 1.0f);

    return mainLayout;
  }
  @Override
  protected final void initialise() {
    Label header = new Label(messages.get("ToolsView.label.header"));
    TweetComposer composer = new TweetComposer(messages, tweetingController);

    Component composerPanel =
        wrapInPanel(composer, messages.get("ToolsView.caption.tweet-composer"));
    VerticalLayout composerPanelWrapper = new VerticalLayout(composerPanel);
    composerPanelWrapper.setSizeFull();
    composerPanelWrapper.setComponentAlignment(composerPanel, Alignment.MIDDLE_CENTER);

    VerticalLayout layout = new VerticalLayout(header, composerPanelWrapper);
    layout.setSizeFull();
    layout.setExpandRatio(composerPanelWrapper, 1);

    header.addStyleName(HEADER_STYLENAME);
    addStyleName(STYLENAME);

    setCompositionRoot(layout);
  }
Example #30
0
  /** {@inheritDoc} */
  @Override
  public ComponentContainer getContentContainer() {
    HorizontalLayout horLayout = new HorizontalLayout();
    horLayout.setSizeFull();

    VerticalSplitPanel verSidebar = new VerticalSplitPanel();
    verSidebar.setWidth("300px");
    verSidebar.setHeight("100%");
    verSidebar.setSplitPosition(150, UNITS_PIXELS, true);
    verSidebar.setLocked(true);
    tree = new EventTree(this);
    verSidebar.addComponent(tree);
    verSidebar.addComponent(new GlobalLayout());
    horLayout.addComponent(verSidebar);

    VerticalLayout verContent = new VerticalLayout();
    verContent.setSizeFull();
    horLayout.addComponent(verContent);
    horLayout.setExpandRatio(verContent, 1.0f);

    toolbar = new ToolBar(this);
    verContent.addComponent(toolbar);

    content = new Panel();
    content.setSizeFull();
    verContent.addComponent(content);
    verContent.setExpandRatio(content, 1.0f);

    // Make useless
    setEnabled(false);
    VerticalLayout verWarning = new VerticalLayout();
    verWarning.setSizeFull();
    content.setContent(verWarning);
    Label lblWarning = new Label("Diese Funktionalität steht z.Z. nicht zur Verfügung!");
    lblWarning.setStyleName(Reindeer.LABEL_H1);
    lblWarning.setSizeUndefined();
    verWarning.addComponent(lblWarning);
    verWarning.setComponentAlignment(lblWarning, Alignment.MIDDLE_CENTER);

    return horLayout;
  }