Java 类org.eclipse.swt.layout.GridData 实例源码

项目:BiglyBT    文件:ViewUtils.java   
public static void setViewRequiresOneDownload(Composite genComposite) {
    if (genComposite == null || genComposite.isDisposed()) {
        return;
    }
    Utils.disposeComposite(genComposite, false);

    Label lab = new Label(genComposite, SWT.NULL);
    GridData gridData = new GridData(SWT.CENTER, SWT.CENTER, true, true);
    gridData.verticalIndent = 10;
    lab.setLayoutData(gridData);
    Messages.setLanguageText(lab, "view.one.download.only");

    genComposite.layout(true);

    Composite parent = genComposite.getParent();
    if (parent instanceof ScrolledComposite) {
        ScrolledComposite scrolled_comp = (ScrolledComposite) parent;

        Rectangle r = scrolled_comp.getClientArea();
        scrolled_comp.setMinSize(genComposite.computeSize(r.width, SWT.DEFAULT ));
    }

}
项目:n4js    文件:SpecProcessPage.java   
/**
 * (non-Javadoc) Method declared on IDialogPage.
 */
@Override
public void createControl(Composite parent) {
    setPageComplete(true);
    initializeDialogUnits(parent);

    Composite composite = new Composite(parent, SWT.NULL);
    composite.setLayout(new GridLayout());
    composite.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_FILL | GridData.HORIZONTAL_ALIGN_FILL));

    new Label(composite, SWT.NONE).setText("Messages:");
    createErrorGroup(composite);

    Display display = getShell().getDisplay();
    highlightColor = display.getSystemColor(SWT.COLOR_RED);

    setControl(composite);
}
项目:openaudible    文件:GridComposite.java   
protected Text newLabeledText(Composite p, String label) {
    Composite c = p; // new Composite(p, SWT.NONE);
    // c.setLayout(new GridLayout(2, false));
    Label m = new Label(c, SWT.NONE);

    m.setText(label);
    m.setBackground(bgColor);

    GridData gdm = LayoutDataShop.createGridData(0, 1);
    m.setLayoutData(gdm);
    Text t = new Text(c, SWT.BORDER);
    t.setText("");
    t.setEditable(true);
    t.setBackground(bgColor);
    if (keyListener != null)
        t.addKeyListener(keyListener);

    GridData gdt = LayoutDataShop.createGridData(GridData.HORIZONTAL_ALIGN_FILL, 1);
    gdt.widthHint = 200;
    t.setLayoutData(gdt);
    WidgetShop.tweakTextWidget(t);

    return t;
}
项目:time4sys    文件:ShowHideWizardPage.java   
private void createSelectionComposite(final Composite parent) {
    final Composite pane = new Composite(parent, SWT.NONE);
    final GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true);
    gridData.horizontalAlignment = SWT.FILL;
    gridData.widthHint = 200;
    pane.setLayoutData(gridData);

    final GridLayout gridLayout = new GridLayout();
    gridLayout.marginHeight = 0;
    gridLayout.marginWidth = 0;
    gridLayout.numColumns = 1;
    pane.setLayout(gridLayout);

    final Label label = new Label(pane, SWT.NONE);
    label.setText(selectedValuesMessage);
    final GridData labelGridData = new GridData();
    labelGridData.verticalAlignment = SWT.FILL;
    labelGridData.horizontalAlignment = SWT.FILL;
    label.setLayoutData(labelGridData);

    selectedElementsTableViewer = createTableViewer(pane);
    selectedElementsTableViewer.setInput(this.selectedElements);
}
项目:Hydrograph    文件:ParamterValueDialog.java   
/**
 * Create contents of the dialog.
 * @param parent
 */
@Override
protected Control createDialogArea(Composite parent) {

    getShell().setText("Parameter value dialog");

    Composite container = (Composite) super.createDialogArea(parent);
    container.setLayout(new GridLayout(1, false));

    text = new Text(container, SWT.BORDER | SWT.MULTI | SWT.VERTICAL | SWT.HORIZONTAL);
    text.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

    Label lblNoteVaulesEntered = new Label(container, SWT.NONE);
    lblNoteVaulesEntered.setText(DIALOG_NOTE);

    if(StringUtils.isNotBlank(this.initialValue))
        text.setText(this.initialValue);

    getShell().setMinimumSize(getInitialSize());
    return container;
}
项目:gw4e.project    文件:GW4EEditor.java   
public void createControl(Composite parent) {
    sash = new SashForm(parent, SWT.VERTICAL);
    IActionBars bars = getSite().getActionBars();
    ActionRegistry ar = getActionRegistry();

    bars.setGlobalActionHandler(ActionFactory.COPY.getId(), ar.getAction(ActionFactory.COPY.getId()));
    bars.setGlobalActionHandler(ActionFactory.PASTE.getId(), ar.getAction(ActionFactory.PASTE.getId()));

    OutLineComposite composite = new OutLineComposite(filter, sash, SWT.NONE);

    Control tree = getViewer().createControl(composite.getComposite());
    tree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 10, 1));
    tree.setData(GW_WIDGET_ID,GW_OUTLINE_ELEMENTS_TREE);
    getViewer().setEditDomain(getEditDomain());
    getViewer().setEditPartFactory(gwtpf);
    getViewer().setContents(gWGraph);

    getSelectionSynchronizer().addViewer(getViewer());

}
项目:SimQRI    文件:StorageOutputFlowPropertiesEditionPartForm.java   
/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 * 
 */
protected Composite createQuantitySingleCompositionEditor(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, MetamodelViewsRepository.StorageOutputFlow.Properties.quantity, MetamodelMessages.StorageOutputFlowPropertiesEditionPart_QuantityLabel);
    //create widget
    quantity = new SingleCompositionEditor(widgetFactory, parent, SWT.NONE);
    GridData quantityData = new GridData(GridData.FILL_HORIZONTAL);
    quantity.setLayoutData(quantityData);
    quantity.addEditorListener(new SingleCompositionListener() {

        public void edit() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StorageOutputFlowPropertiesEditionPartForm.this,  MetamodelViewsRepository.StorageOutputFlow.Properties.quantity, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, null));             
            quantity.refresh();
        }

        public void clear() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(StorageOutputFlowPropertiesEditionPartForm.this,  MetamodelViewsRepository.StorageOutputFlow.Properties.quantity, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.UNSET, null, null));
            quantity.refresh();
        }
    });
    quantity.setID(MetamodelViewsRepository.StorageOutputFlow.Properties.quantity);
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(MetamodelViewsRepository.StorageOutputFlow.Properties.quantity, MetamodelViewsRepository.FORM_KIND), null); //$NON-NLS-1$
    // Start of user code for createQuantitySingleCompositionEditor

    // End of user code
    return parent;
}
项目:SimQRI    文件:ProcessOutputFlowPropertiesEditionPartForm.java   
/**
 * @param parent the parent composite
 * @param widgetFactory factory to use to instanciante widget of the form
 * 
 */
protected Composite createProcessOutputFlowDelaySingleCompositionEditor(Composite parent, FormToolkit widgetFactory) {
    createDescription(parent, MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, MetamodelMessages.ProcessOutputFlowPropertiesEditionPart_ProcessOutputFlowDelayLabel);
    //create widget
    processOutputFlowDelay = new SingleCompositionEditor(widgetFactory, parent, SWT.NONE);
    GridData processOutputFlowDelayData = new GridData(GridData.FILL_HORIZONTAL);
    processOutputFlowDelay.setLayoutData(processOutputFlowDelayData);
    processOutputFlowDelay.addEditorListener(new SingleCompositionListener() {

        public void edit() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ProcessOutputFlowPropertiesEditionPartForm.this,  MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, null));               
            processOutputFlowDelay.refresh();
        }

        public void clear() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ProcessOutputFlowPropertiesEditionPartForm.this,  MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.UNSET, null, null));
            processOutputFlowDelay.refresh();
        }
    });
    processOutputFlowDelay.setID(MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay);
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, MetamodelViewsRepository.FORM_KIND), null); //$NON-NLS-1$
    // Start of user code for createProcessOutputFlowDelaySingleCompositionEditor

    // End of user code
    return parent;
}
项目:pmTrans    文件:PmTrans.java   
public void exitMiniMode() {
    gKL.unregisterMainWindow();
    barManager.setBarVisible(true);
    textEditor = new EditingPane(shell, this);
    GridData gd = new GridData();
    gd.grabExcessHorizontalSpace = true;
    gd.horizontalAlignment = SWT.FILL;
    gd.verticalAlignment = SWT.FILL;
    gd.grabExcessVerticalSpace = true;
    textEditor.setLayoutData(gd);
    player.getVisualization().moveBelow(textEditor);

    shell.setSize(Config.getInstance().getInt(Config.SHELL_HEIGHT),
            Config.getInstance().getInt(Config.SHELL_LENGHT));
    shell.layout();
}
项目:Tarski    文件:PasswordDialog.java   
@Override
protected Control createDialogArea(Composite parent) {
  Composite container = (Composite) super.createDialogArea(parent);
  GridLayout layout = new GridLayout(2, false);
  layout.marginRight = 5;
  layout.marginLeft = 10;
  container.setLayout(layout);

  Label lblUser = new Label(container, SWT.NONE);
  lblUser.setText("User:");

  txtUser = new Text(container, SWT.BORDER);
  txtUser.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  txtUser.setText(user);

  Label lblPassword = new Label(container, SWT.NONE);
  GridData gd_lblNewLabel = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
  gd_lblNewLabel.horizontalIndent = 1;
  lblPassword.setLayoutData(gd_lblNewLabel);
  lblPassword.setText("Password:");

  txtPassword = new Text(container, SWT.BORDER | SWT.SINGLE | SWT.PASSWORD);
  txtPassword.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  txtPassword.setText(password);
  return container;
}
项目:SimQRI    文件:ProcessOutputFlowPropertiesEditionPartImpl.java   
/**
 * @param parent the parent composite
 * 
 */
protected Composite createProcessOutputFlowDelaySingleCompositionEditor(Composite parent) {
    createDescription(parent, MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, MetamodelMessages.ProcessOutputFlowPropertiesEditionPart_ProcessOutputFlowDelayLabel);
    //create widget
    processOutputFlowDelay = new SingleCompositionEditor(parent, SWT.NONE);
    GridData processOutputFlowDelayData = new GridData(GridData.FILL_HORIZONTAL);
    processOutputFlowDelay.setLayoutData(processOutputFlowDelayData);
    processOutputFlowDelay.addEditorListener(new SingleCompositionListener() {

        public void edit() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ProcessOutputFlowPropertiesEditionPartImpl.this,  MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, null));               
            processOutputFlowDelay.refresh();
        }

        public void clear() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(ProcessOutputFlowPropertiesEditionPartImpl.this,  MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.UNSET, null, null));
            processOutputFlowDelay.refresh();
        }
    });
    processOutputFlowDelay.setID(MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay);
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(MetamodelViewsRepository.ProcessOutputFlow.Properties.processOutputFlowDelay, MetamodelViewsRepository.SWT_KIND), null); //$NON-NLS-1$
    // Start of user code for createProcessOutputFlowDelaySingleCompositionEditor

    // End of user code
    return parent;
}
项目:SimQRI    文件:BatchProcessPropertiesEditionPartImpl.java   
/**
 * @param parent the parent composite
 * 
 */
protected Composite createDurationSingleCompositionEditor(Composite parent) {
    createDescription(parent, MetamodelViewsRepository.BatchProcess.Properties.duration, MetamodelMessages.BatchProcessPropertiesEditionPart_DurationLabel);
    //create widget
    duration = new SingleCompositionEditor(parent, SWT.NONE);
    GridData durationData = new GridData(GridData.FILL_HORIZONTAL);
    duration.setLayoutData(durationData);
    duration.addEditorListener(new SingleCompositionListener() {

        public void edit() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BatchProcessPropertiesEditionPartImpl.this,  MetamodelViewsRepository.BatchProcess.Properties.duration, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.EDIT, null, null));               
            duration.refresh();
        }

        public void clear() {
            propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(BatchProcessPropertiesEditionPartImpl.this,  MetamodelViewsRepository.BatchProcess.Properties.duration, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.UNSET, null, null));
            duration.refresh();
        }
    });
    duration.setID(MetamodelViewsRepository.BatchProcess.Properties.duration);
    SWTUtils.createHelpButton(parent, propertiesEditionComponent.getHelpContent(MetamodelViewsRepository.BatchProcess.Properties.duration, MetamodelViewsRepository.SWT_KIND), null); //$NON-NLS-1$
    // Start of user code for createDurationSingleCompositionEditor

    // End of user code
    return parent;
}
项目:convertigo-eclipse    文件:SequenceEditorPart.java   
/**
 * This method initializes composite    
 *
 */
private void createComposite() {
    GridData gridData7 = new org.eclipse.swt.layout.GridData();
    gridData7.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
    gridData7.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
    GridData gridData4 = new org.eclipse.swt.layout.GridData();
    gridData4.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
    gridData4.grabExcessHorizontalSpace = false;
    gridData4.verticalAlignment = org.eclipse.swt.layout.GridData.CENTER;
    GridLayout gridLayout4 = new GridLayout();
    gridLayout4.numColumns = 2;
    compositeOutputFooter = new Composite(compositeOutput, SWT.NONE);
    compositeOutputFooter.setBackground(new Color(Display.getCurrent(), 162, 194, 250));
    compositeOutputFooter.setLayout(gridLayout4);
    compositeOutputFooter.setLayoutData(gridData4);
}
项目:neoscada    文件:DetailComponentImpl.java   
private void createSimpleGrid ( final Composite parent, final SimpleGridComponent component, final Map<String, String> properties )
{
    final VisibilityProvider provider = this.visibleFactory.createProvider ( component.getVisibility () );

    final ComponentVisibility visibility = new ComponentVisibility ( provider, new SubTrackingVisibleComponent () {

        @Override
        public void create ()
        {
            final Composite childParent = new Composite ( parent, SWT.NONE );
            childParent.setLayout ( new GridLayout ( component.getCols (), component.isEqually () ) );

            for ( final Component child : component.getChildren () )
            {
                final DetailComponentImpl comp = new DetailComponentImpl ( child, DetailComponentImpl.this.viewContext );
                trackSub ( comp );

                final Composite wrapper = new Composite ( childParent, SWT.NONE );
                wrapper.setLayout ( new FillLayout () );
                wrapper.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );
                comp.init ( DetailComponentImpl.this.visibleFactory, wrapper, properties );
            }

            trackControl ( childParent );
        }
    } );

    addComponent ( visibility );
}
项目:time4sys    文件:ResourceSchedulingParameterValuePropertiesEditionPartForm.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(AnalysisMessages.ResourceSchedulingParameterValuePropertiesEditionPart_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    文件: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;
}
项目:convertigo-eclipse    文件:SequenceEditorPart.java   
/**
 * This method initializes sashForm 
 *
 */
private void createSashForm() {
    GridData gridData3 = new org.eclipse.swt.layout.GridData();
    gridData3.horizontalAlignment = org.eclipse.swt.layout.GridData.FILL;
    gridData3.grabExcessHorizontalSpace = true;
    gridData3.grabExcessVerticalSpace = true;
    gridData3.verticalAlignment = org.eclipse.swt.layout.GridData.FILL;
    sashForm = new SashForm(compositeOutput, SWT.NONE);
    sashForm.setLayoutData(gridData3);
    createCompositeSequence();
    createCompositeXml();
    sashForm.setWeights(new int[]{20, 80});
}
项目:time4sys    文件:OtherPropertiesEditionPartForm.java   
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(LibraryMessages.OtherPropertiesEditionPart_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    文件:DesignModelPropertiesEditionPartForm.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(DesignMessages.DesignModelPropertiesEditionPart_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    文件:TaskPropertiesEditionPartImpl.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(AnalysisMessages.TaskPropertiesEditionPart_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    文件:SchedulerPropertiesEditionPartImpl.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(AnalysisMessages.SchedulerPropertiesEditionPart_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    文件:TimingPropertiesEditionPartForm.java   
/**
 * 
 */
protected Composite createTimingPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section timingPropertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    timingPropertiesSection.setText(GqamMessages.TimingPropertiesEditionPart_TimingPropertiesGroupLabel);
    GridData timingPropertiesSectionData = new GridData(GridData.FILL_HORIZONTAL);
    timingPropertiesSectionData.horizontalSpan = 3;
    timingPropertiesSection.setLayoutData(timingPropertiesSectionData);
    Composite timingPropertiesGroup = widgetFactory.createComposite(timingPropertiesSection);
    GridLayout timingPropertiesGroupLayout = new GridLayout();
    timingPropertiesGroupLayout.numColumns = 3;
    timingPropertiesGroup.setLayout(timingPropertiesGroupLayout);
    timingPropertiesSection.setClient(timingPropertiesGroup);
    return timingPropertiesGroup;
}
项目:time4sys    文件:TimingPropertiesEditionPartImpl.java   
protected Composite createIsPeriodicCheckbox(Composite parent) {
    isPeriodic = new Button(parent, SWT.CHECK);
    isPeriodic.setText(getDescription(SrmViewsRepository.Timing.Properties.isPeriodic,
            SrmMessages.TimingPropertiesEditionPart_IsPeriodicLabel));
    isPeriodic.addSelectionListener(new SelectionAdapter() {

        /**
         * {@inheritDoc}
         *
         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
         * 
         */
        public void widgetSelected(SelectionEvent e) {
            if (propertiesEditionComponent != null)
                propertiesEditionComponent
                        .firePropertiesChanged(new PropertiesEditionEvent(TimingPropertiesEditionPartImpl.this,
                                SrmViewsRepository.Timing.Properties.isPeriodic, PropertiesEditionEvent.COMMIT,
                                PropertiesEditionEvent.SET, null, new Boolean(isPeriodic.getSelection())));
        }

    });
    GridData isPeriodicData = new GridData(GridData.FILL_HORIZONTAL);
    isPeriodicData.horizontalSpan = 2;
    isPeriodic.setLayoutData(isPeriodicData);
    EditingUtils.setID(isPeriodic, SrmViewsRepository.Timing.Properties.isPeriodic);
    EditingUtils.setEEFtype(isPeriodic, "eef::Checkbox"); //$NON-NLS-1$
    SWTUtils.createHelpButton(parent, propertiesEditionComponent
            .getHelpContent(SrmViewsRepository.Timing.Properties.isPeriodic, SrmViewsRepository.SWT_KIND), null); // $NON-NLS-1$
    // Start of user code for createIsPeriodicCheckbox

    // End of user code
    return parent;
}
项目:time4sys    文件:GeneralPropertiesEditionPartForm.java   
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent,
            Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(HrmMessages.GeneralPropertiesEditionPart_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    文件:GeneralPropertiesEditionPartForm.java   
protected Composite createIsSynchronousCheckbox(FormToolkit widgetFactory, Composite parent) {
    isSynchronous = widgetFactory.createButton(parent, getDescription(LibraryViewsRepository.General.Properties.isSynchronous, LibraryMessages.GeneralPropertiesEditionPart_IsSynchronousLabel), SWT.CHECK);
    isSynchronous.addSelectionListener(new SelectionAdapter() {

        /**
         * {@inheritDoc}
         *
         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
         *  
         */
        public void widgetSelected(SelectionEvent e) {
            if (propertiesEditionComponent != null)
                propertiesEditionComponent.firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this, LibraryViewsRepository.General.Properties.isSynchronous, PropertiesEditionEvent.COMMIT, PropertiesEditionEvent.SET, null, new Boolean(isSynchronous.getSelection())));
        }

    });
    GridData isSynchronousData = new GridData(GridData.FILL_HORIZONTAL);
    isSynchronousData.horizontalSpan = 2;
    isSynchronous.setLayoutData(isSynchronousData);
    EditingUtils.setID(isSynchronous, LibraryViewsRepository.General.Properties.isSynchronous);
    EditingUtils.setEEFtype(isSynchronous, "eef::Checkbox"); //$NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent.getHelpContent(LibraryViewsRepository.General.Properties.isSynchronous, LibraryViewsRepository.FORM_KIND), null); //$NON-NLS-1$
    // Start of user code for createIsSynchronousCheckbox

    // End of user code
    return parent;
}
项目:time4sys    文件:SchedulerParameterValuePropertiesEditionPartImpl.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(AnalysisMessages.SchedulerParameterValuePropertiesEditionPart_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    文件:GeneralPropertiesEditionPartImpl.java   
/**
 * 
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(SrmMessages.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;
}
项目:bdf2    文件:DbConectionWizardPage.java   
private Button createTestConnectionControl(Composite container) {
    Button button = new Button(container, SWT.PUSH);
    button.setText("测试连接");
    GridData gd = new GridData();
    gd.horizontalSpan = 1;
    gd.widthHint = 80;
    button.setLayoutData(gd);
    return button;
}
项目:eclipse-batch-editor    文件:BatchEditorPreferencePage.java   
private Button addButton(Composite parent, int style, String label, int indentation, SelectionListener listener) {
    Button button = new Button(parent, style);
    button.setText(label);

    GridData gd = new GridData(32);
    gd.horizontalIndent = indentation;
    gd.horizontalSpan = 2;
    button.setLayoutData(gd);
    button.addSelectionListener(listener);

    return button;
}
项目:n4js    文件:ExportSelectionPage.java   
@Override
protected void createOptionsGroupButtons(Group optionsGroup) {
    Font font = optionsGroup.getFont();
    optionsGroup.setLayout(new GridLayout(2, true));

    Composite left = new Composite(optionsGroup, SWT.NONE);
    left.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, true, false));
    left.setLayout(new GridLayout(1, true));

    // compress... checkbox
    compressContentsCheckbox = new Button(left, SWT.CHECK | SWT.LEFT);
    compressContentsCheckbox.setText(DataTransferMessages.ZipExport_compressContents);
    compressContentsCheckbox.setFont(font);

}
项目:time4sys    文件:CommunicationPropertiesEditionPartImpl.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(AnalysisMessages.CommunicationPropertiesEditionPart_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    文件:GeneralPropertiesEditionPartForm.java   
protected Composite createIsProtectedCheckbox(FormToolkit widgetFactory, Composite parent) {
    isProtected = widgetFactory.createButton(parent,
            getDescription(GrmViewsRepository.General.Properties.isProtected,
                    GrmMessages.GeneralPropertiesEditionPart_IsProtectedLabel),
            SWT.CHECK);
    isProtected.addSelectionListener(new SelectionAdapter() {

        /**
         * {@inheritDoc}
         *
         * @see org.eclipse.swt.events.SelectionAdapter#widgetSelected(org.eclipse.swt.events.SelectionEvent)
         * 
         */
        public void widgetSelected(SelectionEvent e) {
            if (propertiesEditionComponent != null)
                propertiesEditionComponent
                        .firePropertiesChanged(new PropertiesEditionEvent(GeneralPropertiesEditionPartForm.this,
                                GrmViewsRepository.General.Properties.isProtected, PropertiesEditionEvent.COMMIT,
                                PropertiesEditionEvent.SET, null, new Boolean(isProtected.getSelection())));
        }

    });
    GridData isProtectedData = new GridData(GridData.FILL_HORIZONTAL);
    isProtectedData.horizontalSpan = 2;
    isProtected.setLayoutData(isProtectedData);
    EditingUtils.setID(isProtected, GrmViewsRepository.General.Properties.isProtected);
    EditingUtils.setEEFtype(isProtected, "eef::Checkbox"); //$NON-NLS-1$
    FormUtils.createHelpButton(widgetFactory, parent, propertiesEditionComponent
            .getHelpContent(GrmViewsRepository.General.Properties.isProtected, GrmViewsRepository.FORM_KIND), null); // $NON-NLS-1$
    // Start of user code for createIsProtectedCheckbox

    // End of user code
    return parent;
}
项目:n4js    文件:TestResultsView.java   
@Override
protected Composite createToolTipContentArea(final Event event, final Composite parent) {
    final Object layoutData = parent.getLayoutData();
    final StyledText text = lastDescriptor.toStyledText(parent, NONE);
    if (layoutData instanceof GridData) {
        ((GridData) layoutData).heightHint = text.getBounds().height;
        ((GridData) layoutData).widthHint = text.getBounds().width;
    }
    return parent;
}
项目:time4sys    文件:TimingPropertiesEditionPartImpl.java   
/**
 * 
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(SrmMessages.TimingPropertiesEditionPart_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    文件:ResourceProtectionParameterValuePropertiesEditionPartImpl.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(Composite parent) {
    Group propertiesGroup = new Group(parent, SWT.NONE);
    propertiesGroup.setText(AnalysisMessages.ResourceProtectionParameterValuePropertiesEditionPart_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    文件:InputStimulusPropertiesEditionPartForm.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(AnalysisMessages.InputStimulusPropertiesEditionPart_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;
}
项目:android-uiautomatorviewer    文件:UiAutomatorViewer.java   
@Override
protected Control createContents(Composite parent) {
  Composite c = new Composite(parent, SWT.BORDER);

  GridLayout gridLayout = new GridLayout(1, false);
  gridLayout.marginWidth = 0;
  gridLayout.marginHeight = 0;
  gridLayout.horizontalSpacing = 0;
  gridLayout.verticalSpacing = 0;
  c.setLayout(gridLayout);

  GridData gd = new GridData(GridData.FILL_HORIZONTAL);
  c.setLayoutData(gd);

  ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
  toolBarManager.add(new OpenFilesAction(this));
  toolBarManager.add(new ScreenshotAction(this, false));
  toolBarManager.add(new ScreenshotAction(this, true));
  toolBarManager.add(new SaveScreenShotAction(this));
  ToolBar tb = toolBarManager.createControl(c);
  tb.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));

  mUiAutomatorView = new UiAutomatorView(c, SWT.BORDER);
  mUiAutomatorView.setLayoutData(new GridData(GridData.FILL_BOTH));

  return parent;
}
项目:time4sys    文件:MutualExclusionResourcePropertiesEditionPartForm.java   
/**
 * @generated
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent, Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(AnalysisMessages.MutualExclusionResourcePropertiesEditionPart_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;
}
项目:OCCI-Studio    文件:OcciServerDialog.java   
@Override
protected Control createDialogArea(Composite parent) {
    Composite area = (Composite) super.createDialogArea(parent);
    Composite container = new Composite(area, SWT.NONE);
    container.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    GridLayout layout = new GridLayout(2, false);
    container.setLayout(layout);
    Label lbtOcciServerUrl = new Label(container, SWT.NONE);
    lbtOcciServerUrl.setText(Messages.OcciServerDialog_Label);
    txtOcciServerUrl = new Text(container, SWT.BORDER);
    txtOcciServerUrl.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
    return area;
}
项目:time4sys    文件:GeneralPropertiesEditionPartForm.java   
/**
 * 
 */
protected Composite createPropertiesGroup(FormToolkit widgetFactory, final Composite parent) {
    Section propertiesSection = widgetFactory.createSection(parent,
            Section.TITLE_BAR | Section.TWISTIE | Section.EXPANDED);
    propertiesSection.setText(GqamMessages.GeneralPropertiesEditionPart_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;
}