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);
  }
  @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 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);
  }
Beispiel #4
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();
  }
Beispiel #5
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();
    }
  }
  public void showWindowForm() {

    itemDetilModel = new PerubahanHargaItemModel();
    itemDetilView = new PerubahanHargaItemView(itemDetilModel);
    itemDetilPresenter = new PerubahanHargaItemPresenter(itemDetilModel, itemDetilView);

    itemDetilView.setSizeFull();
    panelFormDetil.setContent(itemDetilView);

    windowForm = new Window();
    windowForm.setModal(true);

    windowForm.center();

    windowForm.setWidth("650px");
    windowForm.setHeight("300px");
    windowForm.setClosable(true);
    windowForm.setResizable(false);

    VerticalLayout content = new VerticalLayout();
    content.setMargin(true);
    content.setSizeFull();
    content.addComponent(panelFormDetil);
    windowForm.setContent(content);

    getUI().addWindow(windowForm);
  }
  public ConfirmationDialog(String caption, String description) {
    setCaption(caption);
    setModal(true);
    setResizable(false);
    setClosable(false);
    setWidth(400, Unit.PIXELS);
    setHeight(200, Unit.PIXELS);
    addCloseListener(this);

    okButton = UIHelper.createButton("ok", null, null, this);
    okButton.setId("confirmationDialog.button.ok");
    cancelButton = UIHelper.createButton("cancel", "cancels the current action.", null, this);
    cancelButton.setId("confirmationDialog.button.cancel");
    label.setDescription(description);

    final HorizontalLayout buttonLayout = new HorizontalLayout(okButton, cancelButton);
    buttonLayout.setSpacing(true);

    layout.setSpacing(true);
    layout.setMargin(true);
    layout.setSizeFull();
    layout.addComponent(label);
    layout.addComponent(buttonLayout);
    layout.setComponentAlignment(buttonLayout, Alignment.BOTTOM_RIGHT);

    setContent(layout);
    center();
  }
  private Component createProfileEditorInvite() {
    VerticalLayout layout = new VerticalLayout();
    layout.setSizeFull();
    layout.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER);

    if (!SettingsManager.get().isSettingsEditorEnabled()) {
      layout.addComponent(
          new Label("No connection profiles defined and you are not allowed to create one."));
    } else {
      Button createProfileLink =
          new Button(
              "Create profile",
              new Button.ClickListener() {
                @Override
                public void buttonClick(Button.ClickEvent event) {
                  addProfile();
                }
              });
      createProfileLink.setStyleName(ValoTheme.BUTTON_LINK);

      Label line1 = new Label("No connection profiles defined.");
      line1.setSizeUndefined();

      VerticalLayout inner = new VerticalLayout();
      inner.setDefaultComponentAlignment(Alignment.MIDDLE_CENTER);
      inner.addComponents(line1, createProfileLink);

      layout.addComponents(inner);
    }

    return layout;
  }
  public ConnectorEditor(Module Module) {
    super();
    this.Module = HybridbpmUI.getDevelopmentAPI().getModuleById(Module.getId());
    ;

    btnRun.setIcon(FontAwesome.PLAY);
    replaceComponent(horizontalSplitPanel, codeEditorLayout);
    btnParameters.setIcon(FontAwesome.WRENCH);
    buttonBar.addComponent(btnParameters, 0);
    buttonBar.addComponent(btnRun, 0);

    codeEditorLayout.setSizeFull();
    codeEditorLayout.addStyleName("code");
    codeEditorLayout.setMargin(new MarginInfo(false, false, false, true));

    binder.setItemDataSource(this.Module);
    binder.bind(codeEditor, "code");

    switch (Module.getType()) {
      case CONNECTOR:
        codeEditor.setCaption("Code");
        codeEditor.setMode(AceMode.groovy);
        codeEditor.setTheme(AceTheme.textmate);
        codeEditor.setShowGutter(true);
        codeEditor.setSizeFull();
        break;
    }
  }
  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());
          }
        });
  }
  @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);
  }
Beispiel #12
0
  /** Creates the application GUI. */
  @Override
  public void initGUI() {

    this.setTheme(APSTheme.THEME);

    this.main = new Window("Application Platform Services Administration App");
    this.main.setSizeFull();
    VerticalLayout mainLayout = new VerticalLayout();
    this.main.setContent(mainLayout);
    mainLayout.setMargin(false);
    mainLayout.setSizeFull();

    this.layout = new SidesAndCenterLayout();
    this.main.addComponent(this.layout);

    LeftBar leftBar = new LeftBar();

    this.menuTree = new MenuTree();

    APSConfigAdminService configAdminService =
        getClientContext().getService(APSConfigAdminService.class);

    /* The menu builder for editing configuration environments. */
    ConfigEnvMenuBuilder configEnvMenuBuilder =
        new ConfigEnvMenuBuilder(configAdminService.getConfigEnvAdmin());
    configEnvMenuBuilder.addRefreshable(this.menuTree);
    configEnvMenuBuilder.addRefreshable(new RemoveCenterRefreshable());
    this.menuTree.addMenuBuilder(configEnvMenuBuilder);

    /* The menu builder for editing configurations. */
    ConfigMenuBuilder configMenuBuilder = new ConfigMenuBuilder(configAdminService, this.logger);
    this.menuTree.addMenuBuilder(configMenuBuilder);

    this.menuTree.refresh();

    this.menuTree.addListener(
        new ValueChangeListener() {
          /** Handles input changes in the menu tree. */
          @Override
          public void valueChange(ValueChangeEvent event) {
            menuTreeItemHandler((IntID) event.getProperty().getValue());
          }
        });

    this.menuTree.setActionHandler(this);
    leftBar.addComponent(this.menuTree);

    this.layout.setLeft(leftBar);
    this.layout.doLayout(); // This is required after contents have been set.

    this.notAuthWindow = new Window("Application Platform Services Administration App");
    this.notAuthWindow.setSizeFull();
    VerticalLayout nawvl = new VerticalLayout();
    Label loginMessage = new Label("<font size='+2'>Please login!</font>", Label.CONTENT_XHTML);
    nawvl.addComponent(loginMessage);
    this.notAuthWindow.setContent(nawvl);

    setMainWindow(this.notAuthWindow);
  }
  /**
   * Build content 'evaluation process' of tab 3.
   *
   * @return content of third tab
   */
  private Layout buildTab3Content() {
    VerticalLayout tab3Content = new VerticalLayout();
    tab3Content.setSpacing(true);
    tab3Content.setMargin(true);
    tab3Content.setSizeFull();

    Label instructions =
        new Label(
            "<b>Instructions:</b> <i>Please select and click a sentence below in order to process the evaluation.</i>",
            Label.CONTENT_XHTML);
    tab3Content.addComponent(instructions);

    this.tableEvaluation = new Table("Evaluation process:");
    tableEvaluation.setHeight("150px");
    tableEvaluation.setWidth("100%");
    tableEvaluation.setImmediate(true);
    tableEvaluation.setSelectable(true);
    tableEvaluation.setMultiSelect(false);
    tableEvaluation.setSortDisabled(false);
    tableEvaluation.addContainerProperty("ID", Integer.class, null);
    tableEvaluation.addContainerProperty("Sentence", String.class, null);
    tableEvaluation.addContainerProperty("Precision", Double.class, null);
    tableEvaluation.addContainerProperty("Recall", Double.class, null);
    tableEvaluation.addContainerProperty("F-Score", Double.class, null);
    tab3Content.addComponent(tableEvaluation);

    this.buttonNext2 = new Button("Next");
    buttonNext2.setImmediate(true);
    buttonNext2.setDescription("Get the next sentence in table");
    tab3Content.addComponent(buttonNext2);

    this.textAreaEvalSentence = new TextArea("Sentence:");
    textAreaEvalSentence.setImmediate(false);
    textAreaEvalSentence.setReadOnly(true);
    textAreaEvalSentence.setRows(3);
    textAreaEvalSentence.setWidth("100%");
    tab3Content.addComponent(textAreaEvalSentence);

    HorizontalLayout hlay1 = new HorizontalLayout();
    this.listSelectGoldstandard = new ListSelect("Goldstandard:");
    listSelectGoldstandard.setImmediate(true);
    listSelectGoldstandard.setHeight("120px");
    listSelectGoldstandard.setWidth("100%");
    listSelectGoldstandard.setNullSelectionAllowed(false);
    this.listSelectFramework = new ListSelect("Framework:");
    listSelectFramework.setImmediate(true);
    listSelectFramework.setHeight("120px");
    listSelectFramework.setWidth("100%");
    listSelectFramework.setNullSelectionAllowed(false);
    hlay1.setSpacing(true);
    hlay1.setMargin(false);
    hlay1.setWidth("100%");
    hlay1.addComponent(listSelectGoldstandard);
    hlay1.addComponent(listSelectFramework);
    tab3Content.addComponent(hlay1);

    return tab3Content;
  }
  private VerticalLayout displayMyBalSheetsInRows(List<BalanceSheet> myBalSheets) {
    VerticalLayout vl = new VerticalLayout();
    vl.setSizeFull();
    vl.setSpacing(true);
    vl.setStyleName("bal-sheet-panel");

    // Display placeholder if no current balance sheets
    if (myBalSheets.size() == 0) {
      Button balSheet = new Button();
      balSheet.setStyleName(BaseTheme.BUTTON_LINK);
      balSheet.setIcon(IconManager.getIcon(IconManager.BALANCE_SHEET));
      balSheet.setEnabled(false);

      vl.addComponent(balSheet);

      return vl;
    }

    // Build the viewable list of my balance sheets
    List<HorizontalLayout> balSheetRows = new ArrayList<>();
    for (int i = 0; i < myBalSheets.size(); i++) {
      HorizontalLayout row;
      if (i % NUM_COLS == 0) {
        row = new HorizontalLayout();
        balSheetRows.add(row);
      } else {
        row = balSheetRows.get(balSheetRows.size() - 1);
      }

      final BalanceSheet balSheet = myBalSheets.get(i);
      Button balSheetBtn = new Button(balSheet.getSheetName());
      balSheetBtn.setDescription(balSheet.getDescription());
      balSheetBtn.setStyleName(BaseTheme.BUTTON_LINK);
      balSheetBtn.setIcon(IconManager.getIcon(IconManager.BALANCE_SHEET));
      if (!balSheet.isActive()) {
        balSheetBtn.setEnabled(false);
      } else {
        balSheetBtn.addListener(
            new Button.ClickListener() {

              private static final long serialVersionUID = 1L;

              @Override
              public void buttonClick(ClickEvent event) {
                AccountsApplication.getInstance().nav.loadNewView(new SingleBalanceSheet(balSheet));
              }
            });
      }

      row.addComponent(balSheetBtn);
    }

    for (HorizontalLayout hl : balSheetRows) {
      vl.addComponent(hl);
    }

    return vl;
  }
  @Override
  public void createWidget(MUIElement element, MElementContainer<MUIElement> parent) {
    if (perspectiveSwitcherPanel == null)
      initializedPerspectiveSwticherPanel((MPerspectiveStack) element);

    VerticalLayout perspectiveStackContent = new VerticalLayout();
    perspectiveStackContent.setSizeFull();
    element.setWidget(perspectiveStackContent);
  }
Beispiel #16
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);
 }
  @Override
  protected void init(VaadinRequest request) {
    setSizeFull();

    VerticalLayout layout = new VerticalLayout();
    layout.setSizeFull();
    final Label label = new Label("+PlainUI");
    label.setId("label");
    layout.addComponent(label);
    setContent(layout);
  }
  @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);
  }
  @Override
  protected void init(VaadinRequest request) {
    setSizeFull();
    layout = new VerticalLayout();
    layout.setSizeFull();

    ticketService = new TicketService();
    UI.getCurrent().addWindow(new LoginWindow(this, ticketService));

    setContent(layout);
  }
Beispiel #20
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;
  }
  public LookAndFeelLayout(BeanFieldGroup<DiagrammePreference> preferences) {
    super(preferences);
    addComponent(splitLayout);

    chartSplit.addComponent(chartContainer);
    chartSplit.addComponent(btnPreview);

    btnPreview.setIcon(FontAwesome.PLAY);
    chartSplit.setComponentAlignment(chartContainer, Alignment.MIDDLE_CENTER);
    chartSplit.setExpandRatio(chartContainer, 1f);

    chartSplit.setSizeFull();
    colourContainer.setSizeFull();

    splitLayout.setSizeFull();
    splitLayout.addComponent(chartSplit);
    splitLayout.setSplitPosition(70f);
    splitLayout.addComponent(colourContainer);

    bindHandlers();
  }
 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
  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);
  }
Beispiel #24
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);
  }
Beispiel #25
0
  public JsonForm(
      FormID formId, String templateRef, String valueId, String valueName, String value) {
    super(new VerticalLayout());

    this.formId = formId;
    this.templateRef = templateRef;
    this.valueId = valueId;
    formField = new JsonFormField(valueId, valueName);

    startValue = value;
    setSizeFull();
    setImmediate(true);
    VerticalLayout layout = (VerticalLayout) getLayout();
    layout.setSizeFull();
  }
  private Component buildPreferencesTab() {
    VerticalLayout root = new VerticalLayout();
    root.setCaption("Preferences");
    root.setIcon(FontAwesome.COGS);
    root.setSpacing(true);
    root.setMargin(true);
    root.setSizeFull();

    Label message = new Label("Not implemented in this demo");
    message.setSizeUndefined();
    message.addStyleName(ValoTheme.LABEL_LIGHT);
    root.addComponent(message);
    root.setComponentAlignment(message, Alignment.MIDDLE_CENTER);

    return root;
  }
  private void buidMainLayout() {
    setMainWindow(new Window(FactoryI18nManager.getI18nManager().getMessage(Messages.APP_TITLE)));
    VerticalLayout container = new VerticalLayout();
    container.setSpacing(true);
    container.setMargin(true);
    container.setSizeFull();

    final OpenIdHandler openIdHandler = new OpenIdHandler(this);
    openIdHandler.setRequestedAttributes(UserAttribute.values());

    Link link =
        createLoginLink(
            openIdHandler,
            "http://openid.unc.edu.ar:8080/openaselect/profiles/openid/",
            "Iniciar Sesión");

    container.addComponent(link);
    container.setComponentAlignment(link, Alignment.TOP_RIGHT);
    openIdHandler.addListener(
        new OpenIdHandler.OpenIdLoginListener() {

          public void onLogin(String id, Map<UserAttribute, String> userInfo) {
            Set<UserAttribute> missingFields = EnumSet.allOf(UserAttribute.class);
            for (UserAttribute field : userInfo.keySet()) {
              userName = userInfo.get(field);
              missingFields.remove(field);
            }
            openIdHandler.close();
            if (isUserValid()) {
              onSuccessfulLogin();
            } else {
              getMainWindow()
                  .showNotification(
                      "El usuario ingresado no existe en el sistema",
                      Notification.TYPE_ERROR_MESSAGE);
              openIdHandler.close();
            }
          }

          public void onCancel() {
            getMainWindow().addComponent(new Label("Too sad you didn't want to log in."));
            openIdHandler.close();
          }
        });

    getMainWindow().setContent(container);
  }
  /**
   * Build content 'annotation process' of tab 2.
   *
   * @return content of second tab
   */
  private Layout buildTab2Content() {
    VerticalLayout tab2Content = new VerticalLayout();
    tab2Content.setSpacing(true);
    tab2Content.setMargin(true);
    tab2Content.setSizeFull();

    this.textAreaSentence = new TextArea("Sentence:");
    textAreaSentence.setImmediate(true);
    textAreaSentence.setRows(7);
    textAreaSentence.setWidth("100%");
    tab2Content.addComponent(textAreaSentence);

    HorizontalLayout hlay1 = new HorizontalLayout();
    this.buttonNew = new Button("New");
    buttonNew.setImmediate(true);
    buttonNew.setDescription("Type in new sentences");
    this.buttonAnnotate = new Button("Annotate");
    buttonAnnotate.setImmediate(true);
    buttonAnnotate.setDescription("Annotate the sentences above");
    hlay1.setSpacing(true);
    hlay1.setMargin(false);
    hlay1.addComponent(buttonNew);
    hlay1.addComponent(buttonAnnotate);
    tab2Content.addComponent(hlay1);

    this.listSelectAnnotation = new ListSelect("Annotations:");
    listSelectAnnotation.setImmediate(true);
    listSelectAnnotation.setHeight("150px");
    listSelectAnnotation.setWidth("100%");
    listSelectAnnotation.setNullSelectionAllowed(false);
    tab2Content.addComponent(listSelectAnnotation);

    this.textAreaAnnotation = new TextArea("Further annotations with other surface forms:");
    textAreaAnnotation.setImmediate(false);
    textAreaAnnotation.setRows(4);
    textAreaAnnotation.setReadOnly(true);
    textAreaAnnotation.setWidth("100%");
    tab2Content.addComponent(textAreaAnnotation);

    // this.buttonNext = new Button("Next");
    // buttonNext.setImmediate(true);
    // buttonNext.setDescription("Get next annotation");
    // tab2Content.addComponent(buttonNext);

    return tab2Content;
  }
Beispiel #29
0
 @Override
 public Layout runningLayout() {
   HorizontalLayout hl = new HorizontalLayout();
   hl.setMargin(true);
   ProgressBar pb = new ProgressBar();
   pb.setIndeterminate(true);
   Label running = new Label("Scan en Cours");
   hl.setSizeFull();
   hl.setSpacing(true);
   hl.addComponents(pb, running);
   hl.setSizeUndefined();
   VerticalLayout vl = new VerticalLayout();
   vl.setSizeFull();
   vl.addComponent(hl);
   vl.setComponentAlignment(hl, Alignment.MIDDLE_CENTER);
   return vl;
 }
  @Override
  protected void init(VaadinRequest request) {
    final VerticalLayout layout = new VerticalLayout();
    layout.setMargin(true);
    layout.setSizeFull();
    setContent(layout);

    HorizontalSplitPanel hPanel = new HorizontalSplitPanel();
    VerticalSplitPanel vPanel = new VerticalSplitPanel();
    Panel playerPanel = new Panel("Player");
    Panel roundsPanel = new Panel("Rounds");
    Panel matchesPanel = new Panel("Matches");
    Table playersTable = new Table("PlayersTable");
    playersTable.addContainerProperty("Id", Integer.class, null);
    playersTable.addContainerProperty("Name", String.class, null);
    playersTable.addContainerProperty("Score", Integer.class, null);
    playersTable.addContainerProperty("Handicap", Integer.class, null);
    Table roundsTable = new Table("RoundsTable");
    Table matchesTable = new Table("MatchesTable");
    playerPanel.setContent(playersTable);
    HorizontalLayout newPlayerLayout = new HorizontalLayout();
    TextField newPlayer = new TextField(null, "newPlayer");
    Button addPlayerButton = new Button("addPlayer");
    newPlayerLayout.addComponent(newPlayer);
    newPlayerLayout.addComponent(addPlayerButton);
    hPanel.addComponent(newPlayerLayout);
    roundsPanel.setContent(roundsTable);
    matchesPanel.setContent(matchesTable);

    VerticalLayout playerLayout = new VerticalLayout();
    playerLayout.addComponent(playerPanel);
    playerLayout.addComponent(newPlayerLayout);

    VerticalLayout roundsLayout = new VerticalLayout();
    roundsLayout.addComponent(roundsPanel);
    Button addRoundButton = new Button("addRound");
    roundsLayout.addComponent(roundsPanel);
    roundsLayout.addComponent(addRoundButton);

    layout.addComponent(hPanel);
    hPanel.setFirstComponent(playerLayout);
    hPanel.setSecondComponent(vPanel);
    vPanel.setFirstComponent(roundsLayout);
    vPanel.setSecondComponent(matchesPanel);
  }