@PanelSample
public class IntegrationSamplePane extends Composite implements SamplePanel {
public IntegrationSamplePane() {
final DoubleHorizontalSplitPanel hsp = new DoubleHorizontalSplitPanel();
hsp.setLeftWidget(addScroll(createContent(createVeryLongText(), "white")));
hsp.setRightWidget(addScroll(createContent(createVeryLongText(), "white")));
FixedVerticalPanel vp = new FixedVerticalPanel();
vp.addWidget(createContent("Console", "green"), new VerticalLayoutData().setHeight("25px"));
vp.addWidget(createContent(createVeryLongText(), "orange"), new VerticalLayoutData().setExpandToFit(true).setOverflow("auto"));
final SimpleVerticalSplitPanel vsp = new SimpleVerticalSplitPanel();
vsp.setTopWidget(hsp);
vsp.setBottomWidget(vp);
vsp.setSplitPosition("75%");
HorizontalPanel buttons = new HorizontalPanel();
final SimpleToggleButton hideLeftButton = new SimpleToggleButton("Hide Left");
hideLeftButton.getDownFace().setText("Show Left");
hideLeftButton.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
hsp.setLeftWidgetVisible(!hideLeftButton.isDown());
}
});
buttons.add(hideLeftButton);
addGap(buttons, "10px");
final SimpleToggleButton hideRightButton = new SimpleToggleButton("Hide Right");
hideRightButton.getDownFace().setText("Show Right");
hideRightButton.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
hsp.setRightWidgetVisible(!hideRightButton.isDown());
}
});
buttons.add(hideRightButton);
addGap(buttons, "10px");
final SimpleToggleButton hideBottomButton = new SimpleToggleButton("Hide Bottom");
hideBottomButton.getDownFace().setText("Show Bottom");
hideBottomButton.addChangeHandler(new ChangeHandler() {
public void onChange(ChangeEvent event) {
vsp.setBottomWidgetVisible(!hideBottomButton.isDown());
}
});
buttons.add(hideBottomButton);
buttons.setWidth("100%");
hsp.setCenterWidget(buttons);
FitPanel fitPanel = new FitPanel(vsp);
fitPanel.setSize("100%", "100%");