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


Java Composite.getShell方法代码示例

本文整理汇总了Java中org.eclipse.swt.widgets.Composite.getShell方法的典型用法代码示例。如果您正苦于以下问题:Java Composite.getShell方法的具体用法?Java Composite.getShell怎么用?Java Composite.getShell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.eclipse.swt.widgets.Composite的用法示例。


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

示例1: createPartControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createPartControl ( final Composite parent )
{
    parent.setLayout ( new FillLayout () );

    this.wrapper = new Composite ( parent, SWT.NONE );
    this.wrapper.setLayout ( GridLayoutFactory.slimStack () );

    this.shell = parent.getShell ();

    PlatformUI.getWorkbench ().getHelpSystem ().setHelp ( this.wrapper, "org.eclipse.scada.ui.chart.view.chartView" ); //$NON-NLS-1$

    fillMenu ( getViewSite ().getActionBars ().getMenuManager () );
    fillToolbar ( getViewSite ().getActionBars ().getToolBarManager () );

    createChartControl ( parent );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:18,代码来源:AbstractChartView.java

示例2: init

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void init ( final VisibilityProviderFactory factory, final Composite parent, final Map<String, String> properties )
{
    this.shell = parent.getShell ();

    this.viewer = new RealTimeListViewer ();
    this.viewer.createControl ( parent );
    this.viewer.addDoubleClickListener ( new IDoubleClickListener () {

        @Override
        public void doubleClick ( final DoubleClickEvent event )
        {
            RealTimeGroupTab.this.handleDoubleClick ( event );
        }
    } );

    if ( this.input != null )
    {
        attachInput ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:22,代码来源:RealTimeGroupTab.java

示例3: createButton

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private Button createButton(Composite parent, String label,
		boolean defaultButton) {
	
	Button button = new Button(parent, SWT.NONE);
	button.setText(label);
	
	if (defaultButton) {
		Shell shell = parent.getShell();
		if (shell != null) {
			shell.setDefaultButton(button);
		}
	}
	
	setButtonLayoutData(button);
	return button;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:17,代码来源:FilterConditionsDialog.java

示例4: openSiriusModelSelection

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Opens the model selection dialog.
 * 
 * @param parent
 *            the parent {@link Composite}
 */
private void openSiriusModelSelection(final Composite parent) {
	ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(parent.getShell(),
			new WorkbenchLabelProvider(), new FilteredFileContentProvider(new String[] {
					SiriusUtil.SESSION_RESOURCE_EXTENSION }));
	dialog.setTitle("Select model file");
	dialog.setMessage("Select the model file to execute:");
	dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
	if (dialog.open() == Window.OK) {
		siriusResourceURIText.setText(((IFile)dialog.getFirstResult()).getFullPath().toString());
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:18,代码来源:DSLLaunchConfigurationTab.java

示例5: openModelSelection

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Opens the model selection dialog.
 * 
 * @param parent
 *            the parent {@link Composite}
 */
private void openModelSelection(final Composite parent) {
	ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(parent.getShell(),
			new WorkbenchLabelProvider(), new FilteredFileContentProvider(extensions));
	dialog.setTitle("Select model file");
	dialog.setMessage("Select the model file to execute:");
	dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
	if (dialog.open() == Window.OK) {
		resourceURIText.setText(((IFile)dialog.getFirstResult()).getFullPath().toString());
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:17,代码来源:DSLLaunchConfigurationTab.java

示例6: GenericComposite

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public GenericComposite ( final Composite parent, final int style, final Collection<Registration> registrations, final Map<String, String> properties )
{
    super ( parent, style );

    this.callbackHandler = new DisplayCallbackHandler ( parent.getShell (), "Operation", "Confirmation required" );

    this.registrationManager = new RegistrationManager ( Activator.getDefault ().getBundle ().getBundleContext () );
    this.registrationManager.addListener ( this );

    this.summaryProvider = new RegistrationManagerSummaryProvider ( this.registrationManager );

    if ( registrations != null )
    {
        for ( final Registration reg : registrations )
        {
            final DataItemDescriptor descriptor = DataItemDescriptor.create ( DetailComponentImpl.resolve ( reg.getDescriptor (), properties ) );
            this.registrationManager.registerItem ( reg.getKey (), descriptor.getItemId (), descriptor.getConnectionInformation (), reg.isAggregateState (), true );
        }
    }

    addDisposeListener ( new DisposeListener () {

        @Override
        public void widgetDisposed ( final DisposeEvent e )
        {
            handleDispose ();
        }
    } );
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:30,代码来源:GenericComposite.java

示例7: DirBrowseComposite

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public DirBrowseComposite(Composite composite) {
	super(composite, SWT.NONE);
	shell = composite.getShell();
	this.setSize(this.getParent().getBounds().width,
			this.getParent().getBounds().height /* buttonHeight*/ );

	GridDataFactory.swtDefaults().align(SWT.BEGINNING, SWT.TOP)
			.grab(true, false).applyTo(this);
	GridLayoutFactory.swtDefaults().equalWidth(false).numColumns(3)
			.applyTo(this);
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:12,代码来源:ConfigFormEx.java

示例8: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * 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));
	
	Shell shell=container.getShell();
	shell.setText("View Transform");
	shell.setImage(ImagePathConstant.APP_ICON.getImageFromRegistry());
	
	CoolBar coolBar = new CoolBar(container, SWT.FLAT);
	coolBar.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	 CoolItem buttonItem = new CoolItem(coolBar, SWT.NONE | SWT.DROP_DOWN);
	  Composite buttonComposite = new Composite(coolBar, SWT.NONE);
	  buttonComposite.setLayout(new GridLayout(3, false));
	 
	  	createWrapButton(buttonComposite);

	    createCopyButton(buttonComposite);
	    
	    buttonComposite.pack();

	    Point size = buttonComposite.getSize();
	    buttonItem.setControl(buttonComposite);
	    buttonItem.setSize(buttonItem.computeSize(size.x, size.y));

	    createStyleTextEditor(container);
	
		getShell().setMinimumSize(290,290);
		return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:37,代码来源:TransformViewDataDialog.java

示例9: InfoPopup

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public InfoPopup(Composite parent, String textToBeDisplayed) {
	super(parent.getShell(), SWT.ON_TOP, true, false, false, false, false, null,
			null);
	content = textToBeDisplayed;
}
 
开发者ID:sergueik,项目名称:SWET,代码行数:6,代码来源:InfoPopup.java

示例10: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	logger.debug("authentication editor dialog created");
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	container.getShell().setText(windowLabel);

	int CONST_HEIGHT = 226;
	
	Shell shell = container.getShell();
	shell.addControlListener(new ControlAdapter() {
           @Override
           public void controlResized(ControlEvent e) {
               Rectangle rect = shell.getBounds();
               if(rect.width != CONST_HEIGHT) {
                   shell.setBounds(rect.x, rect.y, rect.width, CONST_HEIGHT);
               }
           }
       });
	
	Composite composite = new Composite(container, SWT.BORDER);
	composite.setLayout(new GridLayout(2, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	Label partitionKeysLabel = (Label) ftpWidgetUtility.createLabel(composite, "Authentication Mode");
	setPropertyHelpText(partitionKeysLabel, "User needs to provide credentials to connect to the ftp server");
	authenticationModeCombo = (Combo) ftpWidgetUtility.CreateCombo(composite, optionList);
	
	
	Composite composite2 = new Composite(container, SWT.NONE);
	composite2.setLayout(new GridLayout(1, false));
	composite2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	Composite stackComposite = new Composite(composite2, SWT.NONE);
	StackLayout layout = new StackLayout();
	stackComposite.setLayout(layout);
	stackComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	stackComposite.getShell().setText("Authentication Editor");
	createAuthenticationEditorDialog(stackComposite, layout);
	
	addModifyListener(text1);
	addModifyListener(text2);
	
	populateWidget(stackComposite, layout);
	
	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:50,代码来源:FTPAuthenticEditorDialog.java

示例11: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
	Composite container = (Composite) super.createDialogArea(parent);
	container.setLayout(new GridLayout(1, false));
	container.getShell().setText(windowLabel);
	
	if(StringUtils.equalsIgnoreCase(protocol, Constants.AWS_S3)){
		COMPOSITE_CONST_HEIGHT = 330;
	}else {
		COMPOSITE_CONST_HEIGHT = 276;
	}
	
	Shell shell = container.getShell();
	shell.addControlListener(new ControlAdapter() {
           @Override
           public void controlResized(ControlEvent e) {
               Rectangle rect = shell.getBounds();
               if(rect.width != COMPOSITE_CONST_HEIGHT) {
                   shell.setBounds(rect.x, rect.y, rect.width, COMPOSITE_CONST_HEIGHT);
               }
           }
       });
	
	Composite composite = new Composite(container, SWT.BORDER);
	composite.setLayout(new GridLayout(2, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	FTPWidgetUtility ftpWidgetUtility = new FTPWidgetUtility();
	Label operationLabel = (Label) ftpWidgetUtility.createLabel(composite, Messages.OPERATION);
	setPropertyHelpText(operationLabel, "Used to select the Operation");
	authenticationModeCombo = (Combo) ftpWidgetUtility.CreateCombo(composite, optionList);
	
	
	Composite composite2 = new Composite(container, SWT.NONE);
	composite2.setLayout(new GridLayout(1, false));
	composite2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 1, 1));
	
	Composite stackComposite = new Composite(composite2, SWT.NONE);
	StackLayout layout = new StackLayout();
	stackComposite.setLayout(layout);
	stackComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
	
	stackComposite.getShell().setText(Messages.OPERATION_CONFIG);
	createOperationConfigArea(stackComposite, layout);
	
	addModifyListener(text1);
	addModifyListener(text2);
	addModifyListener(text3);
	addModifyListener(text4);
	
	populateWidget();
	
	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:55,代码来源:FTPOperationConfigDialog.java

示例12: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * 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(windowLabel);
	
	int CONST_HEIGHT = 181;
			
			Shell shell = container.getShell();
			
			shell.addControlListener(new ControlAdapter() {
	            @Override
	            public void controlResized(ControlEvent e) {
	                Rectangle rect = shell.getBounds();
	                if(rect.width != CONST_HEIGHT) {
	                    shell.setBounds(rect.x, rect.y, rect.width, CONST_HEIGHT);
	                }
	            }
	        });
	
	Composite composite = new Composite(container, SWT.NONE);
	composite.setLayout(new GridLayout(2, false));
	composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));

	chunkSize = new Label(composite, SWT.NONE);
	GridData gd_chunkSize = new GridData(SWT.LEFT, SWT.CENTER, false, false, 1, 1);
	gd_chunkSize.widthHint = 150;
	chunkSize.setLayoutData(gd_chunkSize);
	chunkSize.setText(Messages.DB_CHUNK_SIZE);

	chunkSizeTextBox = new Text(composite, SWT.BORDER);
	GridData gd_chunkSizeTextBox = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_chunkSizeTextBox.horizontalIndent = 10;
	chunkSizeTextBox.setLayoutData(gd_chunkSizeTextBox);
	chunkSizeTextBox.setText(CHUNK_SIZE_VALUE);
	controlDecoration = WidgetUtility.addDecorator(chunkSizeTextBox, Messages.DB_NUMERIC_PARAMETERZIATION_ERROR);
	controlDecoration.hide();
	controlDecoration.setMarginWidth(2);

	additionalDBParametersLabel = new Label(composite, SWT.NONE);
	GridData gd_additionalDBParametersLabel = new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1);
	gd_additionalDBParametersLabel.widthHint = 150;
	additionalDBParametersLabel.setLayoutData(gd_additionalDBParametersLabel);
	additionalDBParametersLabel.setText(Messages.ADDITIONAL_DB_PARAMETERS);

	additionalParameterTextBox = new Text(composite, SWT.BORDER);
	additionalParameterControlDecoration = WidgetUtility.addDecorator(additionalParameterTextBox,Messages.ADDITIONAL_PARAMETER_ERROR_DECORATOR_MESSAGE);
	additionalParameterControlDecoration.setMarginWidth(2);
	additionalParameterControlDecoration.hide();
	GridData gd_additionalParameter = new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1);
	gd_additionalParameter.horizontalIndent = 10;
	additionalParameterTextBox.setLayoutData(gd_additionalParameter);

	addListenerToChunkSize(chunkSizeTextBox);
	
	addModifyListener(chunkSizeTextBox);
	addModifyListener(additionalParameterTextBox);

	addListenerToAdditionalParameter(additionalParameterTextBox);

	addOutputAdditionalParameterValues();
	
	getShell().setMinimumSize(getInitialSize());
	
	setPropertyHelpText();

	return container;
}
 
开发者ID:capitalone,项目名称:Hydrograph,代码行数:74,代码来源:OutputAdditionalParametersDialog.java


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