本文整理匯總了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);
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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 ();
}
示例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;
}
}
示例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;
}
}
示例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);
}
示例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;
}
示例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;
}
}