Beispiel #1
0
  /*
   * @see TextViewer#createControl(Composite, int)
   */
  protected void createControl(Composite parent, int styles) {

    if (fVerticalRuler != null || fOverviewRuler != null) {
      styles = (styles & ~SWT.BORDER);
      fComposite = new Canvas(parent, SWT.NONE);
      fComposite.setLayout(createLayout());
      parent = fComposite;
    }

    super.createControl(parent, styles);

    if (fVerticalRuler != null) fVerticalRuler.createControl(fComposite, this);
    if (fOverviewRuler != null) fOverviewRuler.createControl(fComposite, this);
  }