示例#1
0
  @Override
  protected Control createContents(Composite parent) {
    ColorController.assignMethodColors(parent.getDisplay(), mReader.getMethods());
    SelectionController selectionController = new SelectionController();

    GridLayout gridLayout = new GridLayout(1, false);
    gridLayout.marginWidth = 0;
    gridLayout.marginHeight = 0;
    gridLayout.horizontalSpacing = 0;
    gridLayout.verticalSpacing = 0;
    parent.setLayout(gridLayout);

    Display display = parent.getDisplay();
    Color darkGray = display.getSystemColor(SWT.COLOR_DARK_GRAY);

    // Create a sash form to separate the timeline view (on top)
    // and the profile view (on bottom)
    SashForm sashForm1 = new SashForm(parent, SWT.VERTICAL);
    sashForm1.setBackground(darkGray);
    sashForm1.SASH_WIDTH = 3;
    GridData data = new GridData(GridData.FILL_BOTH);
    sashForm1.setLayoutData(data);

    // Create the timeline view
    new TimeLineView(sashForm1, mReader, selectionController);

    // Create the profile view
    new ProfileView(sashForm1, mReader, selectionController);
    return sashForm1;
  }