当前位置: 首页>>代码示例>>Java>>正文


Java GridData类代码示例

本文整理汇总了Java中org.eclipse.swt.layout.GridData的典型用法代码示例。如果您正苦于以下问题:Java GridData类的具体用法?Java GridData怎么用?Java GridData使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


GridData类属于org.eclipse.swt.layout包,在下文中一共展示了GridData类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: setViewRequiresOneDownload

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
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 ));
	}

}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:24,代码来源:ViewUtils.java

示例2: createControl

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * (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);
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:21,代码来源:SpecProcessPage.java

示例3: newLabeledText

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
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;
}
 
开发者ID:openaudible,项目名称:openaudible,代码行数:25,代码来源:GridComposite.java

示例4: createSelectionComposite

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
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);
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:24,代码来源:ShowHideWizardPage.java

示例5: createDialogArea

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * 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;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:25,代码来源:ParamterValueDialog.java

示例6: createControl

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
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());

}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:21,代码来源:GW4EEditor.java

示例7: createQuantitySingleCompositionEditor

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:31,代码来源:StorageOutputFlowPropertiesEditionPartForm.java

示例8: createProcessOutputFlowDelaySingleCompositionEditor

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:31,代码来源:ProcessOutputFlowPropertiesEditionPartForm.java

示例9: exitMiniMode

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
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();
}
 
开发者ID:juanerasmoe,项目名称:pmTrans,代码行数:17,代码来源:PmTrans.java

示例10: createDialogArea

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
@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;
}
 
开发者ID:ModelWriter,项目名称:Tarski,代码行数:27,代码来源:PasswordDialog.java

示例11: createProcessOutputFlowDelaySingleCompositionEditor

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:30,代码来源:ProcessOutputFlowPropertiesEditionPartImpl.java

示例12: createDurationSingleCompositionEditor

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:cetic,项目名称:SimQRI,代码行数:30,代码来源:BatchProcessPropertiesEditionPartImpl.java

示例13: createComposite

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:convertigo,项目名称:convertigo-eclipse,代码行数:20,代码来源:SequenceEditorPart.java

示例14: createSimpleGrid

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
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 );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:30,代码来源:DetailComponentImpl.java

示例15: createPropertiesGroup

import org.eclipse.swt.layout.GridData; //导入依赖的package包/类
/**
 * @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;
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:17,代码来源:ResourceSchedulingParameterValuePropertiesEditionPartForm.java


注:本文中的org.eclipse.swt.layout.GridData类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。