@Test public void testHeader_AddHeaderButton() { TestSection section = new TestSection("", false); HorizontalLayout header = section.getHeader(); Label captionLabel = (Label)header.getComponent(0); assertThat(header.isVisible(), is(false)); assertThat(captionLabel.isVisible(), is(false)); Button button = ComponentFactory.newButton(); section.addHeaderButton(button); assertThat(header.isVisible(), is(true)); assertThat(captionLabel.isVisible(), is(false)); }
public void addHeaderButton(Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); headerComponents.add(button); header.addComponent(button, 1); updateHeader(); }
AbstractSection extends VerticalLayout { public void addHeaderButton(Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); headerComponents.add(button); header.addComponent(button, 1); updateHeader(); } }
AbstractSection extends VerticalLayout { public void addHeaderButton(Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); headerComponents.add(button); header.addComponent(button, 1); updateHeader(); } AbstractSection(@CheckForNull String caption);  AbstractSection(@CheckForNull String caption, boolean closeable); @Deprecated  AbstractSection(@CheckForNull String caption, boolean closeable, Optional<Button> editButton); }
AbstractSection extends VerticalLayout { public void addHeaderButton(Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); headerComponents.add(button); header.addComponent(button, 1); updateHeader(); } AbstractSection(@CheckForNull String caption);  AbstractSection(@CheckForNull String caption, boolean closeable); @Deprecated  AbstractSection(@CheckForNull String caption, boolean closeable, Optional<Button> editButton); @Override void setCaption(@CheckForNull String caption); void addHeaderButton(Button button); void addHeaderComponent(Component component); boolean isOpen(); boolean isClosed(); void open(); void close(); }
AbstractSection extends VerticalLayout { public void addHeaderButton(Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); headerComponents.add(button); header.addComponent(button, 1); updateHeader(); } AbstractSection(@CheckForNull String caption);  AbstractSection(@CheckForNull String caption, boolean closeable); @Deprecated  AbstractSection(@CheckForNull String caption, boolean closeable, Optional<Button> editButton); @Override void setCaption(@CheckForNull String caption); void addHeaderButton(Button button); void addHeaderComponent(Component component); boolean isOpen(); boolean isClosed(); void open(); void close();  }