Exemplo n.º 1
0
  private Composite createOwnerGroup(Composite parent, IExtendedFileInfo fileInfo) {
    Group container = new Group(parent, SWT.NONE);
    container.setText(Messages.FileInfoPropertyPage_OwnerAndGroup);
    container.setLayout(GridLayoutFactory.swtDefaults().numColumns(2).margins(0, 0).create());

    Label label = new Label(container, SWT.NONE);
    label.setText(StringUtil.makeFormLabel(Messages.FileInfoPropertyPage_Owner));
    Text text = new Text(container, SWT.READ_ONLY);
    text.setText(fileInfo.getOwner());
    text.setLayoutData(
        GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).create());

    label = new Label(container, SWT.NONE);
    label.setText(StringUtil.makeFormLabel(Messages.FileInfoPropertyPage_Group));
    text = new Text(container, SWT.READ_ONLY);
    text.setText(fileInfo.getGroup());
    text.setLayoutData(
        GridDataFactory.swtDefaults().align(SWT.FILL, SWT.CENTER).grab(true, false).create());

    return container;
  }