當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。