InterfacesComponentProvider.java 文件源码

java
阅读 30 收藏 0 点赞 0 评论 0

项目:n4js 作者:
/**
 * Creates a new interfaces component inside the parent composite using the given model.
 *
 * @param interfacesContainingModel
 *            A interface containing model
 * @param container
 *            The component container
 */
public InterfacesComponent(InterfacesContainingModel interfacesContainingModel,
        WizardComponentContainer container) {
    super(container);
    this.model = interfacesContainingModel;

    Composite parent = getParentComposite();

    Label interfacesLabel = new Label(parent, SWT.NONE);

    GridData interfacesLabelGridData = fillLabelDefaults();
    interfacesLabelGridData.verticalAlignment = SWT.TOP;
    interfacesLabel.setLayoutData(interfacesLabelGridData);

    interfacesLabel.setText("Interfaces:");

    interfacesTable = new Table(parent, SWT.BORDER | SWT.FULL_SELECTION | SWT.VIRTUAL);
    interfacesTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    Composite interfacesButtonsComposite = new Composite(parent, SWT.NONE);
    interfacesButtonsComposite.setLayoutData(GridDataFactory.fillDefaults().create());

    interfacesButtonsComposite.setLayout(GridLayoutFactory.swtDefaults().numColumns(1).margins(0, 0).create());

    interfacesAddButton = new Button(interfacesButtonsComposite, SWT.NONE);
    interfacesAddButton.setText("Add...");
    interfacesAddButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

    interfacesRemoveButton = new Button(interfacesButtonsComposite, SWT.NONE);
    interfacesRemoveButton.setText("Remove");
    interfacesRemoveButton.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());

    setupBindings();
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号