Search in sources :

Example 1 with Tab

use of com.twosigma.beakerx.widget.Tab in project beakerx by twosigma.

the class TabTest method shouldSendCommOpenWhenCreateWithChildren.

@Test
public void shouldSendCommOpenWhenCreateWithChildren() throws Exception {
    // given
    List<Widget> children = asList(new IntSlider(), new Text());
    kernel.clearPublishedMessages();
    // when
    new Tab(children, asList("t1", "t2"));
    // then
    verifyInternalOpenCommMsgWitLayout(kernel.getPublishedMessages(), Tab.MODEL_NAME_VALUE, Tab.VIEW_NAME_VALUE);
    verifyChildren(children);
    verifyTitles();
}
Also used : Tab(com.twosigma.beakerx.widget.Tab) Widget(com.twosigma.beakerx.widget.Widget) Text(com.twosigma.beakerx.widget.Text) IntSlider(com.twosigma.beakerx.widget.IntSlider) Test(org.junit.Test) KernelTest(com.twosigma.beakerx.KernelTest)

Example 2 with Tab

use of com.twosigma.beakerx.widget.Tab in project beakerx by twosigma.

the class TabbedOutputContainerLayoutManager method display.

@Override
public void display(OutputContainer container) {
    List<Widget> items = getWidgets(container);
    Tab tab = new Tab(items, container.getLabels());
    tab.display();
}
Also used : Tab(com.twosigma.beakerx.widget.Tab) Widget(com.twosigma.beakerx.widget.Widget)

Aggregations

Tab (com.twosigma.beakerx.widget.Tab)2 Widget (com.twosigma.beakerx.widget.Widget)2 KernelTest (com.twosigma.beakerx.KernelTest)1 IntSlider (com.twosigma.beakerx.widget.IntSlider)1 Text (com.twosigma.beakerx.widget.Text)1 Test (org.junit.Test)1