Java 类org.eclipse.swt.widgets.Composite 实例源码

项目:n4js    文件:CustomElementSelectionForm.java   
/**
 * Create the composite.
 */
public CustomElementSelectionForm(Composite parent, int style) {
    super(parent, style);
    setLayout(new GridLayout(2, false));

    treeViewer = new TreeViewer(this, SWT.BORDER);
    Tree tree = getTreeViewer().getTree();

    // Set a minimum height to prevent weird dialog dimensions
    tree.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).span(2, 1).minSize(0, 200).create());

    elementLabel = new Label(this, SWT.NONE);
    elementLabel.setLayoutData(GridDataFactory.swtDefaults().create());
    elementLabel.setText("New Label");

    elementInput = new SuffixText(this, SWT.BORDER);// new Text(this, SWT.BORDER);
    elementInput.setLayoutData(GridDataFactory.fillDefaults().grab(true, false).create());
}
项目:gw4e.project    文件:GW4ELaunchConfigurationTab.java   
/**
 * Create the element that allow to select a project See the GraphWalker
 * offline command for more information
 */
private void createProjectSection(Composite parent) {
    fProjLabel = new Label(parent, SWT.NONE);
    fProjLabel.setText(MessageUtil.getString("label_project"));
    GridData gd = new GridData();
    gd.horizontalIndent = 25;
    fProjLabel.setLayoutData(gd);

    fProjText = new Text(parent, SWT.SINGLE | SWT.BORDER);
    fProjText.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    fProjText.addModifyListener(new ModifyListener() {
        @Override
        public void modifyText(ModifyEvent evt) {
            validatePage();
            updateConfigState();

        }
    });
    fProjText.setData(GW4E_LAUNCH_CONFIGURATION_CONTROL_ID, GW4E_LAUNCH_CONFIGURATION_TEXT_ID_PROJECT);

}
项目:BiglyBT    文件:DHTOpsView.java   
public void initialize(Composite composite) {
    if ( autoDHT ){
        CoreFactory.addCoreRunningListener(new CoreRunningListener() {

            @Override
            public void coreRunning(Core core) {
                DHTOpsView.this.core = core;
                init(core);
            }
        });
    }

    panel = new Composite(composite,SWT.NULL);
    panel.setLayout(new FillLayout());
    drawPanel = new DHTOpsPanel(panel);
    drawPanel.setAutoAlpha(autoAlpha);
}
项目:time4sys    文件:DesignModelPropertiesEditionPartForm.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
 * @generated
 */
public void createControls(final FormToolkit widgetFactory, Composite view) {
    CompositionSequence designModelStep = new BindingCompositionSequence(propertiesEditionComponent);
    CompositionStep propertiesStep = designModelStep.addStep(DesignViewsRepository.DesignModel.Properties.class);
    propertiesStep.addStep(DesignViewsRepository.DesignModel.Properties.endToEndFlows);
    propertiesStep.addStep(DesignViewsRepository.DesignModel.Properties.name);


    composer = new PartComposer(designModelStep) {

        @Override
        public Composite addToPart(Composite parent, Object key) {
            if (key == DesignViewsRepository.DesignModel.Properties.class) {
                return createPropertiesGroup(widgetFactory, parent);
            }
            if (key == DesignViewsRepository.DesignModel.Properties.endToEndFlows) {
                return createEndToEndFlowsTableComposition(widgetFactory, parent);
            }
            if (key == DesignViewsRepository.DesignModel.Properties.name) {
                return createNameText(widgetFactory, parent);
            }
            return parent;
        }
    };
    composer.compose(view);
}
项目:Hydrograph    文件:ExcelFormattingDialog.java   
/**
 * Create contents of the dialog.
 * 
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));
    container.getShell().setText(this.windowLabel);

    Composite main_composite = new Composite(container, SWT.NONE);
    main_composite.setLayout(new GridLayout(1, false));
    main_composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    createTopComposite(main_composite);

    createTableComposite(main_composite);

    populateWidget();

    return container;
}
项目:BiglyBT    文件:IntListParameter.java   
public IntListParameter(Composite composite, final String name,
    int defaultValue, final String labels[], final int values[]) {
super(name);
this.name = name;
this.values = values;

    if(labels.length != values.length)
      return;
    int value = COConfigurationManager.getIntParameter(name,defaultValue);
    int index = findIndex(value,values);
    list = new Combo(composite,SWT.SINGLE | SWT.READ_ONLY);
    for(int i = 0 ; i < labels.length  ;i++) {
      list.add(labels[i]);
    }

    setIndex(index);

    list.addListener(SWT.Selection, new Listener() {
         @Override
         public void handleEvent(Event e) {
             setIndex(list.getSelectionIndex());
         }
       });

  }
项目:time4sys    文件:ResourceSchedulingParameterValuePropertiesEditionPartForm.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createControls(org.eclipse.ui.forms.widgets.FormToolkit, org.eclipse.swt.widgets.Composite)
 * @generated
 */
public void createControls(final FormToolkit widgetFactory, Composite view) {
    CompositionSequence resourceSchedulingParameterValueStep = new BindingCompositionSequence(propertiesEditionComponent);
    CompositionStep propertiesStep = resourceSchedulingParameterValueStep.addStep(AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.class);
    propertiesStep.addStep(AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.name);
    propertiesStep.addStep(AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.value);


    composer = new PartComposer(resourceSchedulingParameterValueStep) {

        @Override
        public Composite addToPart(Composite parent, Object key) {
            if (key == AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.class) {
                return createPropertiesGroup(widgetFactory, parent);
            }
            if (key == AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.name) {
                return createNameText(widgetFactory, parent);
            }
            if (key == AnalysisViewsRepository.ResourceSchedulingParameterValue.Properties.value) {
                return createValueText(widgetFactory, parent);
            }
            return parent;
        }
    };
    composer.compose(view);
}
项目:pgcodekeeper    文件:DbStorePrefPage.java   
@Override
protected ListViewer createViewer(Composite parent) {
    ListViewer viewerObjs = new ListViewer(parent, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
    GridData gd =  new GridData(SWT.FILL, SWT.FILL, true, true, 1, 5);
    gd.widthHint = PREF_PAGE.WIDTH_HINT_PX;
    viewerObjs.getControl().setLayoutData(gd);

    viewerObjs.setContentProvider(ArrayContentProvider.getInstance());
    viewerObjs.setLabelProvider(new LabelProvider() {

        @Override
        public String getText(Object element) {
            return ((DbInfo) element).getName();
        }
    });
    return viewerObjs;
}
项目:parabuild-ci    文件:ChartComposite.java   
/**
 * Constructs a panel containing a chart.
 *
 * @param comp The parent.
 * @param style The style of the composite.
 * @param chart  the chart.
 * @param useBuffer  a flag controlling whether or not an off-screen buffer
 *                   is used.
 */
public ChartComposite(Composite comp, int style, JFreeChart chart, 
        boolean useBuffer) {

    this(comp, style, chart,
            DEFAULT_WIDTH,
            DEFAULT_HEIGHT,
            DEFAULT_MINIMUM_DRAW_WIDTH,
            DEFAULT_MINIMUM_DRAW_HEIGHT,
            DEFAULT_MAXIMUM_DRAW_WIDTH,
            DEFAULT_MAXIMUM_DRAW_HEIGHT,
            useBuffer,
            true,  // properties
            true,  // save
            true,  // print
            true,  // zoom
            true   // tooltips
            );
}
项目:SimQRI    文件:ScalarPropertiesEditionPartImpl.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 *          createControls(org.eclipse.swt.widgets.Composite)
 * 
 */
public void createControls(Composite view) { 
    CompositionSequence scalarStep = new BindingCompositionSequence(propertiesEditionComponent);
    scalarStep
        .addStep(MetamodelViewsRepository.Scalar.Properties.class)
        .addStep(MetamodelViewsRepository.Scalar.Properties.value);


    composer = new PartComposer(scalarStep) {

        @Override
        public Composite addToPart(Composite parent, Object key) {
            if (key == MetamodelViewsRepository.Scalar.Properties.class) {
                return createPropertiesGroup(parent);
            }
            if (key == MetamodelViewsRepository.Scalar.Properties.value) {
                return createValueText(parent);
            }
            return parent;
        }
    };
    composer.compose(view);
}
项目:ide-plugins    文件:PluginDialog.java   
@Override
protected Control createButtonBar(Composite parent) {
    final Composite buttonBar = new Composite(parent, SWT.NONE);
    buttonBar.setBackground(backColor);

    final GridLayout layout = new GridLayout();
    layout.marginLeft = 10;
    layout.numColumns = 2;
    layout.makeColumnsEqualWidth = false;
    layout.horizontalSpacing = convertHorizontalDLUsToPixels(IDialogConstants.HORIZONTAL_SPACING);
    buttonBar.setLayout(layout);

    final GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false);
    data.grabExcessHorizontalSpace = true;
    data.grabExcessVerticalSpace = false;
    buttonBar.setLayoutData(data);

    buttonBar.setFont(parent.getFont());

    // add the dialog's button bar to the right
    buttonControl = super.createButtonBar(buttonBar);
    buttonControl.setBackground(backColor);
    buttonControl.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false));

    return buttonBar;
}
项目:time4sys    文件:ResourceProtectionParameterValuePropertiesEditionPartImpl.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 *          createControls(org.eclipse.swt.widgets.Composite)
 * @generated
 */
public void createControls(Composite view) { 
    CompositionSequence resourceProtectionParameterValueStep = new BindingCompositionSequence(propertiesEditionComponent);
    CompositionStep propertiesStep = resourceProtectionParameterValueStep.addStep(AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.class);
    propertiesStep.addStep(AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.name);
    propertiesStep.addStep(AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.value);


    composer = new PartComposer(resourceProtectionParameterValueStep) {

        @Override
        public Composite addToPart(Composite parent, Object key) {
            if (key == AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.class) {
                return createPropertiesGroup(parent);
            }
            if (key == AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.name) {
                return createNameText(parent);
            }
            if (key == AnalysisViewsRepository.ResourceProtectionParameterValue.Properties.value) {
                return createValueText(parent);
            }
            return parent;
        }
    };
    composer.compose(view);
}
项目:time4sys    文件:GeneralPropertiesEditionPartForm.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *      createFigure(org.eclipse.swt.widgets.Composite,
 *      org.eclipse.ui.forms.widgets.FormToolkit)
 * 
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
    ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
    Form form = scrolledForm.getForm();
    view = form.getBody();
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    view.setLayout(layout);
    createControls(widgetFactory, view);
    return scrolledForm;
}
项目:time4sys    文件:DelayPropertiesEditionPartForm.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
 * @generated
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
    ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
    Form form = scrolledForm.getForm();
    view = form.getBody();
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    view.setLayout(layout);
    createControls(widgetFactory, view);
    return scrolledForm;
}
项目:Hydrograph    文件:ELTSaparater.java   
@Override
public void attachWidget(Composite container) {
    // TODO Auto-generated method stub
    label = new Label(container, SWT.SEPARATOR | SWT.HORIZONTAL);
    GridData gd_defaultELTLable = new GridData(SWT.LEFT, SWT.CENTER, grabExcessSpace, false, 1, 1);
    gd_defaultELTLable.widthHint = lableWidth;
    label.setLayoutData(gd_defaultELTLable);    
    label.setVisible(visible);

    widget = label;
}
项目:neoscada    文件:ControlImage.java   
/**
 * Get the client space and create if it does not yet exists.
 * <p>
 * Note that if the client space is not filled, the default size of the
 * empty composite will be 64x64 due to some strange SWT philosophy.
 * </p>
 * 
 * @return The client space composite
 */
public Composite getClientSpace ()
{
    if ( this.clientSpace == null )
    {
        this.clientSpace = new Composite ( this, SWT.NONE );
        this.clientSpace.setLayout ( new RowLayout ( SWT.HORIZONTAL ) );
    }
    return this.clientSpace;
}
项目:pgcodekeeper    文件:FeedBackDialog.java   
@Override
protected Control createDialogArea(Composite parent) {
    Composite container = new Composite(parent, SWT.NONE);
    container.setLayout(new GridLayout(2, false));
    container.setLayoutData(new GridData(GridData.FILL_BOTH));

    new Label(container, SWT.NONE).setText(Messages.FeedBackDialog_subject);

    txtSubject = new Text(container, SWT.BORDER);
    txtSubject.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    new Label(container, SWT.NONE).setText(Messages.e_mail);

    emailFrom = new Text(container, SWT.BORDER);
    emailFrom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

    new Label(container, SWT.NONE).setText(Messages.feedback_message);

    txtMessage = new Text(container, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL);
    GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    gd.heightHint = new PixelConverter(container).convertHeightInCharsToPixels(8);
    txtMessage.setLayoutData(gd);

    new Label(container, SWT.NONE);

    btnCheckLog = new Button(container, SWT.CHECK);
    btnCheckLog.setText(Messages.add_log);

    return container;
}
项目:n4js    文件:CustomElementSelectionDialog.java   
@Override
protected Control createDialogArea(Composite parent) {
    CustomElementSelectionForm form = new CustomElementSelectionForm(parent, SWT.FILL);
    form.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());

    TreeViewer v = form.getTreeViewer();
    for (ViewerFilter filter : filters) {
        v.addFilter(filter);
    }
    this.treeViewer = v;

    WorkbenchContentProvider contentProvider = new WorkbenchContentProvider();
    ILabelProvider labelProvider = new WorkbenchLabelProvider();

    this.treeViewer.setContentProvider(contentProvider);
    this.treeViewer.setLabelProvider(labelProvider);

    this.treeViewer.setComparator(new ViewerComparator());

    this.treeViewer.setAutoExpandLevel(this.getAutoExpandLevel());

    form.setElementLabel(this.elementLabel);

    this.elementNameInput = form.getElementInput();

    form.getElementInput().addPropertyChangeListener(new PropertyChangeListener() {

        @Override
        public void propertyChange(PropertyChangeEvent evt) {
            if (evt.getPropertyName().equals(SuffixText.TEXT_PROPERTY) ||
                    evt.getPropertyName().equals(SuffixText.SUFFIX_PROPERTY)) {
                validateElementInput();
                elementInputChanged();
            }

        }
    });
    return form;
}
项目:applecommander    文件:ExportGraphicsTypePane.java   
/**
 * Constructor for ExportGraphicsTypePane.
 */
public ExportGraphicsTypePane(Composite parent, ExportWizard exportWizard, Object layoutData) {
    super();
    this.parent = parent;
    this.wizard = exportWizard;
    this.layoutData = layoutData;
}
项目:time4sys    文件:RequiredProtectionParameterPropertiesEditionPartImpl.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 *          createFigure(org.eclipse.swt.widgets.Composite)
 * @generated
 */
public Composite createFigure(final Composite parent) {
    view = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    view.setLayout(layout);
    createControls(view);
    return view;
}
项目:Hydrograph    文件:ExpressionComposite.java   
private void createSwitchToOperationButton(Composite switchToCompsite) {
    operationRadioButton = new Button(switchToCompsite, SWT.RADIO);
    operationRadioButton.setText("Operation");
    operationRadioButton.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            dialog.switchToOperation();
            dialog.getDataStructure().setOperation(true);
            dialog.refreshErrorLogs();
        }
    });
}
项目:convertigo-eclipse    文件:ProjectFileFieldEditor.java   
/**
 * Creates a file field editor.
 * 
 * @param name the name of the preference this field editor works on
 * @param labelText the label text of the field editor
 * @param enforceAbsolute <code>true</code> if the file path
 *  must be absolute, and <code>false</code> otherwise
 * @param parent the parent of the field editor's control
 */
public ProjectFileFieldEditor(String name, String labelText,
        boolean enforceAbsolute, Composite parent) {
    init(name, labelText);
    this.enforceAbsolute = enforceAbsolute;
    setErrorMessage(JFaceResources.getString("FileFieldEditor.errorMessage"));//$NON-NLS-1$
    setChangeButtonText(JFaceResources.getString("openBrowse"));//$NON-NLS-1$
    setValidateStrategy(VALIDATE_ON_FOCUS_LOST);
    createControl(parent);
}
项目:time4sys    文件:GeneralPropertiesEditionPartImpl.java   
/**
 * 
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(GqamMessages.GeneralPropertiesEditionPart_PropertiesGroupLabel);
    GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
    propertiesGroupData.horizontalSpan = 3;
    propertiesGroup.setLayoutData(propertiesGroupData);
    GridLayout propertiesGroupLayout = new GridLayout();
    propertiesGroupLayout.numColumns = 3;
    propertiesGroup.setLayout(propertiesGroupLayout);
    return propertiesGroup;
}
项目:Hydrograph    文件:RunConfigDialog.java   
/**
 * Create contents of the button bar.
 * 
 * @param parent
 */
@Override
protected void createButtonsForButtonBar(Composite parent) {
    okButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.OK_LABEL, true);
    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);

    applyServerDetailsCrossTextEmptyValidationListener(txtEdgeNode);
    applyServerDetailsCrossTextEmptyValidationListener(txtPassword);
    applyServerDetailsCrossTextEmptyValidationListener(txtUserName);
    applyServerDetailsCrossTextEmptyValidationListener(txtBasePath);
    applyServerDetailsCrossTextEmptyValidationListener(txtKeyFile);
    applyServerDetailsCrossTextEmptyValidationListener(txtRunUtility);
    applyServerDetailsCrossTextEmptyValidationListener(txtProjectPath);
    loadBuildProperties();
}
项目:Tarski    文件:BoundSelectionPage.java   
public static void setEnabledRecursive(final Composite composite, final boolean enabled) {
  Control[] children = composite.getChildren();
  for (int i = 0; i < children.length; i++) {
    if (children[i] instanceof Composite) {
      setEnabledRecursive((Composite) children[i], enabled);
    } else {
      children[i].setEnabled(enabled);
    }
  }
  composite.setEnabled(enabled);
}
项目:SimQRI    文件:DiracDeltaPropertiesEditionPartForm.java   
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(MetamodelMessages.DiracDeltaPropertiesEditionPart_PropertiesGroupLabel);
    GridData propertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
    propertiesSectionData.horizontalSpan = 3;
    propertiesSection.setLayoutData(propertiesSectionData);
    Composite propertiesGroup = widgetFactory.createComposite(propertiesSection);
    GridLayout propertiesGroupLayout = new GridLayout();
    propertiesGroupLayout.numColumns = 3;
    propertiesGroup.setLayout(propertiesGroupLayout);
    propertiesSection.setClient(propertiesGroup);
    return propertiesGroup;
}
项目:time4sys    文件:ConstraintContainerPropertiesEditionPartImpl.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.ISWTPropertiesEditionPart#
 *          createFigure(org.eclipse.swt.widgets.Composite)
 * @generated
 */
public Composite createFigure(final Composite parent) {
    view = new Composite(parent, SWT.NONE);
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    view.setLayout(layout);
    createControls(view);
    return view;
}
项目:convertigo-eclipse    文件:SqlQueryEditorComposite.java   
public SqlQueryEditorComposite(Composite parent, int style, AbstractDialogCellEditor cellEditor) {
    super(parent, style, cellEditor);
    initialize();

    String sqlQuery = (String)cellEditor.databaseObjectTreeObject.getPropertyValue(cellEditor.propertyDescriptor.getId());
    textAreaSQLQuery.setText(sqlQuery);
}
项目:convertigo-eclipse    文件:ReferencesView.java   
@Override
public void createPartControl(Composite parent) {
    treeViewer = new TreeViewer(parent);
    treeViewer.setContentProvider(new ViewRefContentProvider());
    treeViewer.setLabelProvider(new ViewRefLabelProvider());
    treeViewer.setInput(null);
    treeViewer.expandAll();

    getSite().setSelectionProvider(treeViewer);
    getSite().getPage().addSelectionListener(this);

}
项目:neoscada    文件:MonitorQueryEditorForm.java   
@Override
protected void populateFormContent ( final ConfigurationFormToolkit toolkit, final ScrolledForm form, final ConfigurationEditorInput input )
{
    final Composite client = toolkit.createStandardComposite ( form.getBody () );
    client.setLayout ( new GridLayout ( 3, false ) );
    client.setLayoutData ( new GridData ( GridData.FILL_BOTH ) );

    toolkit.createStandardMultiText ( client, "filter", "Filter", "Filter expression", input.getDataMap (), null );
}
项目:convertigo-eclipse    文件:ColumnEditor.java   
public ColumnEditor(Composite parent) {
    super(parent);

    dialogTitle = "Columns definition of the table";
    columnNames = new String[] { "Label", "Initial column", "Final column", "Line index" };
    templateData = new Object[] { "label", new Integer(0), new Integer(0), new Integer(0) };
}
项目:time4sys    文件:DesignModelPropertiesEditionPartForm.java   
/**
 * {@inheritDoc}
 * 
 * @see org.eclipse.emf.eef.runtime.api.parts.IFormPropertiesEditionPart#
 *  createFigure(org.eclipse.swt.widgets.Composite, org.eclipse.ui.forms.widgets.FormToolkit)
 * @generated
 */
public Composite createFigure(final Composite parent, final FormToolkit widgetFactory) {
    ScrolledForm scrolledForm = widgetFactory.createScrolledForm(parent);
    Form form = scrolledForm.getForm();
    view = form.getBody();
    GridLayout layout = new GridLayout();
    layout.numColumns = 3;
    view.setLayout(layout);
    createControls(widgetFactory, view);
    return scrolledForm;
}
项目:n4js    文件:MultiElementListSelectionDialog.java   
@Override
protected void createButtonsForButtonBar(Composite parent) {
    fBackButton = createButton(parent, IDialogConstants.BACK_ID, IDialogConstants.BACK_LABEL, false);

    // XXX: Workaround for https://bugs.eclipse.org/bugs/show_bug.cgi?id=279425
    boolean HAS_BUG_279425 = true;
    fNextButton = createButton(parent, IDialogConstants.NEXT_ID, IDialogConstants.NEXT_LABEL, !HAS_BUG_279425);
    fFinishButton = createButton(parent, IDialogConstants.OK_ID, IDialogConstants.FINISH_LABEL, HAS_BUG_279425);

    createButton(parent, IDialogConstants.CANCEL_ID, IDialogConstants.CANCEL_LABEL, false);
}
项目:bdf2    文件:ColumnSection.java   
private void createLengthLabel(Composite parent) {
    this.lengthLabel = getWidgetFactory().createCLabel(parent, "长度:");
    FormData data = new FormData();
    data.top = new FormAttachment(lengthText, 0, SWT.CENTER);
    data.left = new FormAttachment(0, 0);
    data.right = new FormAttachment(lengthText, -ITabbedPropertyConstants.HSPACE);
    this.lengthLabel.setLayoutData(data);
}
项目:bdf2    文件:DbTableRelationDialog.java   
private void createControl(Composite container) {
    GridLayout layout = new GridLayout();
    container.setLayout(layout);
    layout.numColumns = 3;
    layout.verticalSpacing = 10;
    layout.marginTop = 10;
    layout.marginWidth = 10;
    this.constraintNameText = createFieldControl(container, "约束名称:");
    this.pkColumnNameText = createFieldControl(container, "主键名称:");
    this.fkColumnNameText = createFieldControl(container, "外键名称:");
    this.typeCombo = createTypeComboControl(container, "对应关系:");
    initControlData();
    addListeners();
}
项目:SimQRI    文件:WeibullPropertiesEditionPartImpl.java   
/**
 * 
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(MetamodelMessages.WeibullPropertiesEditionPart_PropertiesGroupLabel);
    GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
    propertiesGroupData.horizontalSpan = 3;
    propertiesGroup.setLayoutData(propertiesGroupData);
    GridLayout propertiesGroupLayout = new GridLayout();
    propertiesGroupLayout.numColumns = 3;
    propertiesGroup.setLayout(propertiesGroupLayout);
    return propertiesGroup;
}
项目:time4sys    文件:CommunicationResourcePropertiesEditionPartImpl.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(AnalysisMessages.CommunicationResourcePropertiesEditionPart_PropertiesGroupLabel);
    GridData propertiesGroupData = new GridData(GridData.FILL_HORIZONTAL);
    propertiesGroupData.horizontalSpan = 3;
    propertiesGroup.setLayoutData(propertiesGroupData);
    GridLayout propertiesGroupLayout = new GridLayout();
    propertiesGroupLayout.numColumns = 3;
    propertiesGroup.setLayout(propertiesGroupLayout);
    return propertiesGroup;
}
项目:gw4e.project    文件:GraphModelPropertyPage.java   
/**
 * Label creation helper method
 * @param parent
 * @param text
 * @return
 */
protected Label createLabel(Composite parent, String text) {
    Label label = new Label(parent, SWT.LEFT);
    label.setText(text);
    GridData data = new GridData();
    data.horizontalAlignment = GridData.FILL;
    label.setLayoutData(data);
    return label;
}
项目:Hydrograph    文件:JoinMapDialog.java   
private void createDownButton(Composite composite_11) {
    btnDown = new Button(composite_11, SWT.NONE);
    btnDown.setToolTipText(Messages.MOVE_DOWN_KEY_SHORTCUT_TOOLTIP);
    btnDown.setImage(ImagePathConstant.MOVEDOWN_BUTTON.getImageFromRegistry());

    btnDown.addSelectionListener(new SelectionAdapter() {
        @Override
        public void widgetSelected(SelectionEvent e) {
            moveRowDown();
        }
    });
}
项目:eZooKeeper    文件:ZooKeeperServerModelFormPage.java   
@Override
protected Control createContents(Composite parent) {

    this.getShell().setText(_Command);

    ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL);
    scrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    scrolledComposite.setExpandHorizontal(true);
    Text text = new Text(scrolledComposite, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP);
    text.setText(_Result);
    text.pack();
    scrolledComposite.setContent(text);

    return scrolledComposite;
}