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


Java Composite.layout方法代码示例

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


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

示例1: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	_parent = parent;
	Composite area = new Composite(parent, SWT.NULL);
	GridLayout gl = new GridLayout(1, false);
	gl.marginHeight = 0;
	area.setLayout(gl);
	area.layout();
	setControl(area);

	Group modelArea = createGroup(area, "Model:");
	createModelLayout(modelArea, null);

	Group languageArea = createGroup(area, "Language:");
	createLanguageLayout(languageArea, null);

	Group debugArea = createGroup(area, "Animation:");
	createAnimationLayout(debugArea, null);

	_k3Area = createGroup(area, "Sequential DSA execution:");
	createK3Layout(_k3Area, null);

}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:24,代码来源:LaunchConfigurationMainTab.java

示例2: TimeNowActionController

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public TimeNowActionController ( final ControllerManager controllerManager, final ChartContext chartContext, final TimeNowAction controller )
{
    super ( controllerManager.getContext (), chartContext, controller );

    final Composite space = chartContext.getExtensionSpaceProvider ().getExtensionSpace ();
    if ( space != null )
    {
        this.button = new Button ( space, SWT.PUSH );
        this.button.setText ( Messages.TimeNowActionController_Label );
        this.button.setToolTipText ( Messages.TimeNowActionController_Description );
        this.button.addSelectionListener ( new SelectionAdapter () {
            @Override
            public void widgetSelected ( final SelectionEvent e )
            {
                action ();
            };

        } );
        space.layout ();
    }
    else
    {
        this.button = null;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:26,代码来源:TimeNowActionController.java

示例3: ResetControllerImpl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public ResetControllerImpl ( final ControllerManager controllerManager, final ChartContext chartContext, final ResetController controller )
{
    final Composite space = chartContext.getExtensionSpaceProvider ().getExtensionSpace ();
    this.resetHandler = chartContext.getResetHandler ();
    if ( space != null && this.resetHandler != null )
    {
        this.button = new Button ( space, SWT.PUSH );
        this.button.setText ( Messages.ResetControllerImpl_Label );
        this.button.addSelectionListener ( new SelectionAdapter () {
            @Override
            public void widgetSelected ( final SelectionEvent e )
            {
                action ();
            }
        } );
        space.layout ();
    }
    else
    {
        this.button = null;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:23,代码来源:ResetControllerImpl.java

示例4: initTable

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void initTable(Composite control) {
	if ( tv == null ){

		tv = TableViewFactory.createTableViewSWT(ChatInstance.class, TABLE_CHAT, TABLE_CHAT,
				new TableColumnCore[0], ColumnChatName.COLUMN_ID, SWT.MULTI
						| SWT.FULL_SELECTION | SWT.VIRTUAL);
		if (txtFilter != null) {
			tv.enableFilterCheck(txtFilter, this);
		}
		tv.setRowDefaultHeightEM(1);

		table_parent = new Composite(control, SWT.BORDER);
		table_parent.setLayoutData(Utils.getFilledFormData());
		GridLayout layout = new GridLayout();
		layout.marginHeight = layout.marginWidth = layout.verticalSpacing = layout.horizontalSpacing = 0;
		table_parent.setLayout(layout);

		tv.addMenuFillListener( this );
		tv.addSelectionListener(this, false);

		tv.initialize(table_parent);
	}

	control.layout(true);
}
 
开发者ID:BiglySoftware,项目名称:BiglyBT,代码行数:26,代码来源:SBC_ChatOverview.java

示例5: handleAdvancedButtonSelect

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * Shows/hides the advanced option widgets.
 */
protected void handleAdvancedButtonSelect() {
	Shell shell = getShell();
	Point shellSize = shell.getSize();
	Composite composite = (Composite) getControl();

	if (linkedResourceComposite != null) {
		linkedResourceComposite.dispose();
		linkedResourceComposite = null;
		composite.layout();
		shell.setSize(shellSize.x, shellSize.y - linkedResourceGroupHeight);
		advancedButton.setText(IDEWorkbenchMessages.showAdvanced);
	} else {
		linkedResourceComposite = linkedResourceGroup
				.createContents(linkedResourceParent);
		setupLinkedResourceTarget();
		if (linkedResourceGroupHeight == -1) {
			Point groupSize = linkedResourceComposite.computeSize(
					SWT.DEFAULT, SWT.DEFAULT, true);
			linkedResourceGroupHeight = groupSize.y;
		}
		shell.setSize(shellSize.x, shellSize.y + linkedResourceGroupHeight);
		composite.layout();
		advancedButton.setText(IDEWorkbenchMessages.hideAdvanced);
	}
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:29,代码来源:WizardNewFileCreationPage.java

示例6: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void createControl(Composite parent) {
	Composite content = new Composite(parent, SWT.NULL);
	GridLayout gl = new GridLayout(1, false);
	gl.marginHeight = 0;
	content.setLayout(gl);
	content.layout();
	setControl(content);

	createLayout(content);
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:12,代码来源:LaunchConfigurationDataProcessingTab.java

示例7: createControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public final void createControl(Composite parent) {
    _GridComposite = createGridComposite(parent);
    _GridComposite.init();
    _GridComposite.addGridCompositeEventListener(new IGridCompositeEventListener() {

        @Override
        public void modified(GridCompositeEvent event) {
            updateStatus(event);
        }
    });

    setControl(_GridComposite);
    parent.layout(true);
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:16,代码来源:GridWizardPage.java

示例8: forceLayout

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
protected void forceLayout() {
    ScrolledForm form = getManagedForm().getForm();
    Composite body = form.getBody();
    body.layout(true);
    Composite client = getClient();
    if (client != null) {
        client.layout(true);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:10,代码来源:DataModelFormPage.java

示例9: widgetSelected

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
@Override
public void widgetSelected(SelectionEvent e) {
    Control composite = getControl(_DataCompositeName);
    Composite dataStackComposite = (Composite) getControl(CONTROL_NAME_DATA_STACK_COMPOSITE);
    ((StackLayout) dataStackComposite.getLayout()).topControl = composite;
    dataStackComposite.layout();
    modified(composite);
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:9,代码来源:ZnodeNewWizardComposite1.java

示例10: createAllEntries

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private void createAllEntries ()
{
    final Composite extensionSpace = this.extensionSpaceProvider.getExtensionSpace ();
    if ( extensionSpace == null )
    {
        return;
    }

    this.wrapper = new Composite ( extensionSpace, SWT.NONE );
    final RowLayout layout = new RowLayout ( SWT.HORIZONTAL );
    layout.marginTop = layout.marginBottom = 0;
    this.wrapper.setLayout ( layout );

    int i = 0;
    for ( final Profile profile : this.profiles )
    {
        final ProfileEntry entry = createProfileEntry ( profile, i );
        if ( entry != null )
        {
            this.profileEntries.put ( profile.getId (), entry );
        }
        i++;
    }

    final Label sep = new Label ( this.wrapper, SWT.SEPARATOR | SWT.VERTICAL );
    sep.setLayoutData ( new RowData ( SWT.DEFAULT, 20 ) );

    extensionSpace.layout ();
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:30,代码来源:ProfileManager.java

示例11: TimeShiftActionController

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public TimeShiftActionController ( final ControllerManager controllerManager, final ChartContext chartContext, final TimeShiftAction controller )
{
    super ( controllerManager.getContext (), chartContext, controller );

    final DataBindingContext ctx = controllerManager.getContext ();

    final Composite space = chartContext.getExtensionSpaceProvider ().getExtensionSpace ();
    if ( space != null )
    {
        this.button = new Button ( space, SWT.PUSH );
        this.button.addSelectionListener ( new SelectionAdapter () {
            @Override
            public void widgetSelected ( final SelectionEvent e )
            {
                action ();
            };
        } );
        addBinding ( ctx.bindValue ( PojoObservables.observeValue ( this, "milliseconds" ), EMFObservables.observeValue ( controller, ChartPackage.Literals.TIME_SHIFT_ACTION__DIFF ) ) ); //$NON-NLS-1$
        addBinding ( ctx.bindValue ( SWTObservables.observeText ( this.button ), EMFObservables.observeValue ( controller, ChartPackage.Literals.TIME_SHIFT_ACTION__LABEL ) ) );
        addBinding ( ctx.bindValue ( SWTObservables.observeTooltipText ( this.button ), EMFObservables.observeValue ( controller, ChartPackage.Literals.TIME_SHIFT_ACTION__DESCRIPTION ) ) );

        this.layoutListener = new IValueChangeListener () {

            @Override
            public void handleValueChange ( final ValueChangeEvent event )
            {
                space.layout ();
            }
        };

        this.labelProperty = EMFObservables.observeValue ( controller, ChartPackage.Literals.TIME_SHIFT_ACTION__LABEL );
        this.labelProperty.addValueChangeListener ( this.layoutListener );

        space.layout ();
    }
    else
    {
        this.button = null;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:41,代码来源:TimeShiftActionController.java

示例12: SeparatorController

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public SeparatorController ( final ControllerManager controllerManager, final ChartContext chartContext, final org.eclipse.scada.ui.chart.model.SeparatorController controller )
{
    final Composite space = chartContext.getExtensionSpaceProvider ().getExtensionSpace ();
    if ( space != null )
    {
        this.label = new Label ( space, SWT.SEPARATOR | SWT.VERTICAL );
        this.label.setLayoutData ( new RowData ( 20, SWT.DEFAULT ) );
        space.layout ();
    }
    else
    {
        this.label = null;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:15,代码来源:SeparatorController.java

示例13: createPartControl

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
/**
 * This is a callback that will allow us to create the viewer and initialize
 * it.
 */
public void createPartControl(Composite parent) {
	GridLayout layout = new GridLayout();
	layout.numColumns = 2;
	parent.setLayout(layout);

	layoutData1 = new GridData(GridData.VERTICAL_ALIGN_BEGINNING);
	layoutData1.grabExcessHorizontalSpace = true;
	layoutData1.grabExcessVerticalSpace = true;
	layoutData1.horizontalAlignment = GridData.FILL;
	layoutData1.verticalAlignment = GridData.FILL;
	layoutData1.exclude = false;

	this.parent = parent;
	viewer = new List(this.parent, SWT.SINGLE | SWT.V_SCROLL);
	list = new List(this.parent, SWT.SINGLE | SWT.V_SCROLL);
	viewer.setLayoutData(layoutData1);
	list.setLayoutData(layoutData1);

	parent.layout();

	makeActions();
	hookDoubleClickAction();
	contributeToActionBars();

	IToolBarManager mgr = getViewSite().getActionBars().getToolBarManager();
	mgr.add(selectAction);
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:32,代码来源:TreeView.java

示例14: createDialogArea

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
private Control createDialogArea(Composite shell) {
       GridLayout layout = new GridLayout();
	layout.numColumns = 1;
	shell.setLayout(layout);

	lblStep = new Label(shell, SWT.NONE);
	lblStep.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblStep.setText("Step 1 / 999");

	lblMessage = new Label(shell, SWT.NONE);
	lblMessage.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	lblMessage.setText("Idle");

	pbProg = new ProgressBar(shell, SWT.SMOOTH | SWT.INDETERMINATE);
	pbProg.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));
	pbProg.setMaximum(1000);
	pbProg.setSelection(0);
	pbProg.setSelection(256);

	final Label lblSeparator = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL);
	lblSeparator.setLayoutData(new GridData(GridData.FILL, GridData.CENTER, true, false));

	txtLog = new Text(shell, SWT.MULTI
	          | SWT.BORDER
	          | SWT.H_SCROLL
	          | SWT.V_SCROLL);
	txtLog.setLayoutData(new GridData(GridData.FILL, GridData.FILL, true, true));
	txtLog.setEditable(false);
	txtLog.setBackground(new Color(shell.getDisplay(), 10,10,10));
	txtLog.setForeground(new Color(shell.getDisplay(), 200,200,200));

	shell.layout();

	return shell;
}
 
开发者ID:aserg-ufmg,项目名称:RefDiff,代码行数:36,代码来源:ProgressBarDialog.java

示例15: ScaleActionController

import org.eclipse.swt.widgets.Composite; //导入方法依赖的package包/类
public ScaleActionController ( final ControllerManager controllerManager, final ChartContext chartContext, final ScaleAction controller )
{
    super ( controllerManager.getContext (), chartContext, controller );

    final DataBindingContext ctx = controllerManager.getContext ();

    final Composite space = chartContext.getExtensionSpaceProvider ().getExtensionSpace ();
    if ( space != null )
    {
        this.button = new Button ( space, SWT.PUSH );
        this.button.addSelectionListener ( new SelectionAdapter () {
            @Override
            public void widgetSelected ( final SelectionEvent e )
            {
                action ();
            };
        } );

        addBinding ( ctx.bindValue ( PojoObservables.observeValue ( this, "milliseconds" ), EMFObservables.observeValue ( controller, ChartPackage.Literals.SCALE_ACTION__TIMESPAN ) ) ); //$NON-NLS-1$
        addBinding ( ctx.bindValue ( SWTObservables.observeText ( this.button ), EMFObservables.observeValue ( controller, ChartPackage.Literals.SCALE_ACTION__LABEL ) ) );
        addBinding ( ctx.bindValue ( SWTObservables.observeTooltipText ( this.button ), EMFObservables.observeValue ( controller, ChartPackage.Literals.SCALE_ACTION__DESCRIPTION ) ) );

        this.layoutListener = new IValueChangeListener () {

            @Override
            public void handleValueChange ( final ValueChangeEvent event )
            {
                space.layout ();
            }
        };

        this.labelProperty = EMFObservables.observeValue ( controller, ChartPackage.Literals.SCALE_ACTION__LABEL );
        this.labelProperty.addValueChangeListener ( this.layoutListener );

        space.layout ();
    }
    else
    {
        this.button = null;
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:42,代码来源:ScaleActionController.java


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