package com.tssap.util.examples.tab;

 

 

import com.tssap.util.ui.pane.IGridLayoutData;

import com.tssap.util.ui.pane.IGridLayoutPane;

import com.tssap.util.ui.pane.ISashPane;

 

 

public class SashPaneTab {

 

  SashPaneTab() {

  }

 

  public static void createTabContents(IGridLayoutPane tabPane) {

 

     // Create a horizontal Sash Pane

     ISashPane outerSashPane = tabPane.addHorizontalSashPane(

                   tabPane.createGridLayoutData(

                                         IGridLayoutData.FILL,

                                         IGridLayoutData.FILL,

                                         true,

                                         true,

                                         1,

                                         1));

 

     // Create simple text pane

     outerSashPane.addTextPane("Text pane within the outer SashPane");

 

     // Create vertical inner Sash Pane

     ISashPane innerSashPane = outerSashPane.addVerticalSashPane();

 

     // Add Text Pane

     innerSashPane.addTextPane("Text pane within the inner SashPane");

 

     innerSashPane.addTextPane("Text pane within the inner SashPane");

 

     innerSashPane.addTextLabel("Text label within the inner SashPane");

 

     // Set weight of the sash panes

     outerSashPane.setWeights(new int[] { 1, 3 });

 

     innerSashPane.setWeights(new int[] { 4, 2, 1 });

  }

}