Esempio n. 1
0
  /**
   * @param parent
   * @param style
   * @param setLayoutData
   */
  public DeliveryNoteSegmentComposite(
      Composite parent, DeliveryNoteSegmentEdit _deliverySegmentEdit) {
    super(parent, SWT.NONE, LayoutMode.TIGHT_WRAPPER, LayoutDataMode.GRID_DATA);
    this.deliverySegmentEdit = _deliverySegmentEdit;

    articleEditArea =
        new XComposite(this, getBorderStyle(), LayoutMode.TIGHT_WRAPPER, LayoutDataMode.GRID_DATA);
    articleEditArea.setData(IToolkit.KEY_DRAW_BORDER, IToolkit.TEXT_BORDER);
    articleEditArea.setBackground(Display.getDefault().getSystemColor(SWT.COLOR_LIST_BACKGROUND));
    addDisposeListener(
        new DisposeListener() {
          public void widgetDisposed(DisposeEvent e) {
            deliverySegmentEdit.onDispose();
            removeDisposeListener(this);
          }
        });
  }