Ejemplo n.º 1
0
 private VerticalSplitPanel createContentPanel() {
   VerticalSplitPanel contentPanel = new VerticalSplitPanel();
   contentPanel.setSplitPosition(60);
   contentPanel.addComponent(mContentView);
   contentPanel.addComponent(mPreviewView);
   //        contentPanel.setMargin(true);
   return contentPanel;
 }
Ejemplo n.º 2
0
 @Override
 public Component createContents() {
   VerticalSplitPanel split = new VerticalSplitPanel();
   split.setSizeFull();
   propertyToolArea = createToolArea();
   split.setFirstComponent(createMainArea());
   split.setSecondComponent(propertyToolArea);
   split.setSplitPosition(70);
   return split;
 }
Ejemplo n.º 3
0
  @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);
  }
Ejemplo n.º 4
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;
  }