下面列出了org.eclipse.swt.events.TreeAdapter#org.eclipse.swt.custom.SashForm 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@Override
protected void createFormContent(IManagedForm managedForm) {
form = UI.formHeader(this);
toolkit = managedForm.getToolkit();
Composite body = UI.formBody(form, toolkit);
Section section = UI.section(body, toolkit,
M.NormalizationWeightingSets);
UI.gridData(section, true, true);
Composite client = toolkit.createComposite(section);
section.setClient(client);
UI.gridLayout(client, 1);
SashForm sashForm = createSash(client);
setViewer = createNwSetViewer(section, sashForm);
factorViewer = new NwFactorViewer(sashForm, editor);
sashForm.setWeights(new int[] { 25, 75 });
setViewer.selectFirst();
body.setFocus();
form.reflow(true);
editor.getEventBus().register(this);
editor.onSaved(() -> updateInput());
}
/** {@code key} defines which data source will be used for display. */
public DashboardComposite(String key, Composite parent, int style) {
super(parent, style);
this.key = key;
this.setLayout(new FillLayout());
final SashForm sf = new SashForm(this, SWT.HORIZONTAL);
sf.setLayout(new FillLayout());
this.canvas = new VisualisationCanvas(sf, SWT.NONE);
this.text = new Text(sf, SWT.LEFT | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI);
text.setText("");
createVisualisationControls(sf);
sf.setWeights(new int[] { 45, 45, 10 });
}
/**
* {@inheritDoc}
*/
@Override
public void createControl(final Composite parent) {
sash = new SashForm(parent, SWT.VERTICAL);
// コンストラクタで指定したビューワの作成
viewer.createControl(sash);
// EditPartFactory の設定
final ERDiagramOutlineEditPartFactory editPartFactory = new ERDiagramOutlineEditPartFactory();
viewer.setEditPartFactory(editPartFactory);
// グラフィカル・エディタのルート・モデルをツリー・ビューワにも設定
viewer.setContents(diagram);
final Canvas canvas = new Canvas(sash, SWT.BORDER);
// サムネイル・フィギュアを配置する為の LightweightSystem
lws = new LightweightSystem(canvas);
resetView(registry);
final AbstractTransferDragSourceListener dragSourceListener = new ERDiagramTransferDragSourceListener(viewer, TemplateTransfer.getInstance());
viewer.addDragSourceListener(dragSourceListener);
diagram.refreshOutline();
}
/**
* An instance should be constructed only after all children have been added to the sash form.
*
* @param s the section which we will listen for collapse and expansion on
* @param sf the sash form in which the section sits
* @throws IllegalArgumentException if the section is not one of the sash form's children
*/
public ExpandableSpaceReclaimer(final Section s, final SashForm sf) {
m_section = s;
m_sashForm = sf;
final Control[] children = m_sashForm.getChildren();
int index = -1;
for (int i = 0; i < children.length; i++) {
if (s == children[i]) {
index = i;
break;
}
}
if (index == -1) {
throw new IllegalArgumentException("Section could not be found in the sash form.");
}
m_sectionIndex = index;
m_otherChildrenCount = children.length - 1;
m_section.addExpansionListener(this);
m_lastSectionSizeOnCollapse = null;
}
@Override
public void createPartControl(@Nullable Composite parent) {
super.createPartControl(parent);
final SashForm sashForm = new SashForm(parent, SWT.NONE);
fTableViewer = createSegmentStoreTableViewer(sashForm);
fDensityViewer = createSegmentStoreDensityViewer(sashForm);
fDensityViewer.addDataListener(new DataChangedListener());
sashForm.setWeights(DEFAULT_WEIGHTS);
Action zoomOut = new ZoomOutAction(this);
IToolBarManager toolBar = getViewSite().getActionBars().getToolBarManager();
toolBar.add(zoomOut);
ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace();
if (trace != null) {
TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace);
if (fDensityViewer != null) {
fDensityViewer.traceSelected(signal);
}
if (fTableViewer != null) {
fTableViewer.traceSelected(signal);
}
}
}
@Override
public void createPartControl(@Nullable Composite parent) {
super.createPartControl(parent);
final SashForm sashForm = new SashForm(parent, SWT.NONE);
fTableViewer = createSegmentStoreTableViewer(sashForm);
fDensityViewer = createSegmentStoreDensityViewer(sashForm);
fDensityViewer.addDataListener(new DataChangedListener());
sashForm.setWeights(DEFAULT_WEIGHTS);
Action zoomOut = new ZoomOutAction(this);
IToolBarManager toolBar = getViewSite().getActionBars().getToolBarManager();
toolBar.add(zoomOut);
ITmfTrace trace = TmfTraceManager.getInstance().getActiveTrace();
if (trace != null) {
TmfTraceSelectedSignal signal = new TmfTraceSelectedSignal(this, trace);
if (fDensityViewer != null) {
fDensityViewer.traceSelected(signal);
}
if (fTableViewer != null) {
fTableViewer.traceSelected(signal);
}
}
}
MasterDetailsPage(Composite parent, CodeSelectorFactory master, IDetailDisplay detail){
super(parent, SWT.NONE);
if (PersistentObject.class.isAssignableFrom(detail.getElementClass())) {
eeli_div = new ElexisUiEventListenerImpl(detail.getElementClass(),
ElexisEvent.EVENT_SELECTED) {
@Override
public void runInUi(ElexisEvent ev){
detailDisplay.display(ev.getObject());
}
};
ElexisEventDispatcher.getInstance().addListeners(eeli_div);
}
setLayout(new FillLayout());
sash = new SashForm(this, SWT.NONE);
cv = new CommonViewer();
cv.create(master.createViewerConfigurer(cv), sash, SWT.NONE, getViewSite());
// cv.getViewerWidget().addSelectionChangedListener(
// GlobalEventDispatcher.getInstance().getDefaultListener());
/* Composite page= */detail.createDisplay(sash, getViewSite());
cv.getConfigurer().getContentProvider().startListening();
detailDisplay = detail;
}
@Override
protected void createFormContent(IManagedForm mform) {
form = UI.formHeader(this);
toolkit = mform.getToolkit();
Composite body = UI.formBody(form, toolkit);
SashForm sash = new SashForm(body, SWT.VERTICAL);
UI.gridData(sash, true, true);
toolkit.adapt(sash);
inputTable = createTable(sash, true);
outputTable = createTable(sash, false);
body.setFocus();
form.reflow(true);
sortExchanges();
inputTable.setInput(getModel());
outputTable.setInput(getModel());
editor.onSaved(() -> {
inputTable.setInput(getModel());
outputTable.setInput(getModel());
});
}
@Override
public void createControl(Composite parent) {
this.sash = new SashForm(parent, SWT.VERTICAL);
viewer.createControl(sash);
editPartFactory = new ERDiagramOutlineEditPartFactory();
editPartFactory.setQuickMode(quickMode);
viewer.setEditPartFactory(editPartFactory);
viewer.setContents(diagram);
if (!quickMode) {
final Canvas canvas = new Canvas(sash, SWT.BORDER);
lws = new LightweightSystem(canvas);
}
resetView(registry);
final AbstractTransferDragSourceListener dragSourceListener =
new ERDiagramTransferDragSourceListener(viewer, TemplateTransfer.getInstance());
viewer.addDragSourceListener(dragSourceListener);
expandVirturalDiagramTree();
}
private void createTreeAndSourceViewer(Composite superComposite) {
SashForm composite= new SashForm(superComposite, SWT.HORIZONTAL);
initializeDialogUnits(superComposite);
GridData gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(20);
gd.widthHint= convertWidthInCharsToPixels(10);
composite.setLayoutData(gd);
GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginWidth= 0;
layout.marginHeight= 0;
composite.setLayout(layout);
createSimilarElementTreeComposite(composite);
createSourceViewerComposite(composite);
composite.setWeights(new int[] { 50, 50 });
}
private void createTreeAndSourceViewer(final Composite superComposite) {
final SashForm composite= new SashForm(superComposite, SWT.HORIZONTAL);
initializeDialogUnits(superComposite);
final GridData gd= new GridData(GridData.FILL_BOTH);
gd.heightHint= convertHeightInCharsToPixels(20);
gd.widthHint= convertWidthInCharsToPixels(10);
composite.setLayoutData(gd);
final GridLayout layout= new GridLayout();
layout.numColumns= 2;
layout.marginWidth= 0;
layout.marginHeight= 0;
layout.horizontalSpacing= 1;
layout.verticalSpacing= 1;
composite.setLayout(layout);
createHierarchyTreeComposite(composite);
createSourceViewerComposite(composite);
composite.setWeights(new int[] { 50, 50});
}
protected void placeComponents( )
{
foSashForm = new SashForm( topControl, SWT.VERTICAL );
{
GridLayout layout = new GridLayout( );
foSashForm.setLayout( layout );
GridData gridData = new GridData( GridData.FILL_BOTH );
// TODO verify Bug 194391 in Linux
gridData.heightHint = 680;
foSashForm.setLayoutData( gridData );
}
createTopPreviewArea( foSashForm );
createBottomTypeArea( foSashForm );
initUIPropertiesAndData( );
}
/**
* create page control for sql edit page
*
* @param parent
* @return
*/
private Control createPageControl( Composite parent )
{
SashForm pageContainer = new SashForm( parent, SWT.NONE );
GridLayout layout = new GridLayout( );
layout.numColumns = 3;
layout.marginWidth = 0;
layout.marginHeight = 0;
layout.horizontalSpacing = 2;
pageContainer.setLayout( layout );
pageContainer.setLayoutData( new GridData( GridData.FILL_BOTH ) );
pageContainer.setSashWidth( 3 );
Control left = createDBMetaDataSelectionComposite( pageContainer );
Control right = createTextualQueryComposite( pageContainer );
setWidthHints( pageContainer, left, right );
return pageContainer;
}
@Override
public void createPageCustomControl( Composite parent )
{
Composite pageComposite = new Composite( parent, SWT.NONE );
pageComposite.setLayout( new FillLayout( ) );
SashForm sf = new SashForm( pageComposite, SWT.HORIZONTAL );
createLeftComposite( pageComposite, sf );
createRightComposite( sf );
setControl( pageComposite );
refreshColumnMappingTable( );
this.design = this.getInitializationDesign( );
initPageControls( );
updateButtonStatus( );
HelpUtil.setSystemHelp( pageComposite,
HelpUtil.CONEXT_ID_DATASET_POJO_COLUMN_MAPPING );
}
@Override
protected Control createContents(final Composite parent) {
final Composite mainComposite = new Composite(parent, SWT.NONE);
mainComposite.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).create());
mainComposite.setLayout(GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 0).create());
createFunctionCategories(mainComposite);
final SashForm sashForm = new SashForm(mainComposite, SWT.VERTICAL);
sashForm.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(250, 250).minSize(100, SWT.DEFAULT).create());
final GridLayout gridLaout = GridLayoutFactory.fillDefaults().numColumns(1).margins(0, 2).create();
sashForm.setLayout(gridLaout);
createFunctionsList(sashForm);
createFunctionDocumentaion(sashForm);
sashForm.setWeights(new int[] { 1, 1 });
return mainComposite;
}
/**
* Tries to fix a bug when resizing sash forms in OSX
* @param sash
*/
public static void fixOSXSashBug(final SashForm sash) {
// Only if on OSX
if (isMac()) {
// Listen for resize event in first composite
for (Control c : sash.getChildren()) {
if (c instanceof Composite) {
// In case of resize, redraw the sash form
c.addControlListener(new ControlAdapter(){
@Override
public void controlResized(ControlEvent arg0) {
sash.redraw();
}
});
return;
}
}
}
}
public void open() {
shell = new Shell( display );
shell.setLayout( new FillLayout() );
shell.setText( APP_NAME );
shell.setImage( GuiResource.getInstance().getImageLogoSmall() );
try {
readFiles();
} catch ( Exception e ) {
new ErrorDialog(
shell, "Error reading translations", "There was an unexpected error reading the translations", e );
}
// Put something on the screen
sashform = new SashForm( shell, SWT.HORIZONTAL );
sashform.setLayout( new FormLayout() );
addLists();
addGrid();
addListeners();
sashform.setWeights( new int[] { 30, 70 } );
sashform.setVisible( true );
shell.pack();
refresh();
wPackages.optWidth( true );
wPackages.getTable().getColumn( 1 ).setWidth( 1 );
BaseTransformDialog.setSize( shell);
shell.open();
}
/**
* @see org.eclipse.swt.widgets.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite composite = (Composite) super.createDialogArea(parent);
composite.setLayoutData(new GridData(GridData.FILL_BOTH));
Composite dialog = new Composite(composite, SWT.NONE);
dialog.setLayout(new GridLayout(1, false));
dialog.setLayoutData(new GridData(GridData.FILL_BOTH));
Control commonArea = createCommonArea(dialog);
commonArea.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
SashForm sashForm = new SashForm(dialog, SWT.VERTICAL);
GridData gd = new GridData(GridData.FILL_BOTH);
gd.widthHint = 500;
gd.heightHint = 400;
sashForm.setLayoutData(gd);
sashForm.setLayout(new GridLayout());
Control patternArea = createFileMatchPatternPart(sashForm);
patternArea.setLayoutData(new GridData(GridData.FILL_BOTH));
Control matchArea = createTestArea(sashForm);
matchArea.setLayoutData(new GridData(GridData.FILL_BOTH));
sashForm.setWeights(new int[] { 50, 50 });
// init the data
initializeControls();
return composite;
}
@Override
public void createPartControl(Composite parent) {
createActions();
//add toolbar actions
contributeToActionBars();
GridLayoutFactory.fillDefaults().applyTo(parent);
this.toolkit = new FormToolkit(parent.getDisplay());
//create the main staging form
this.mainForm = this.toolkit.createForm(parent);
this.mainForm.setText(Messages.AbapGitStaging_no_repository_selected);
this.mainForm
.setImage(AbstractUIPlugin.imageDescriptorFromPlugin(AbapGitUIPlugin.PLUGIN_ID, "icons/obj/repository.png").createImage()); //$NON-NLS-1$
GridDataFactory.fillDefaults().grab(true, true).applyTo(this.mainForm);
this.toolkit.decorateFormHeading(this.mainForm);
GridLayoutFactory.swtDefaults().applyTo(this.mainForm.getBody());
//sash form holding staging section and commit section
SashForm mainSashForm = createSashForm(this.mainForm.getBody(), SWT.HORIZONTAL);
//sash form holding unstaged section and staged section
SashForm stagingSashForm = createSashForm(mainSashForm, SWT.VERTICAL);
this.createUnstagedComposite(stagingSashForm);
this.createCommitComposite(mainSashForm);
this.createStagedComposite(stagingSashForm);
validateInputs(); //do the initial validation
updateButtonsState(); //update button state
//create project change listener
this.projectChangeListener = new ProjectChangeListener(this, ResourcesPlugin.getWorkspace());
}
@Override
protected void activateView ()
{
if ( this.chart != null )
{
return;
}
this.wrapper = new SashForm ( this.viewHolder, SWT.HORIZONTAL );
this.wrapper.setLayout ( new FillLayout ( SWT.HORIZONTAL ) );
final Composite subWrapper = new Composite ( this.wrapper, SWT.NONE );
subWrapper.setLayout ( GridLayoutFactory.slimStack () );
final Composite extensionSpace = new Composite ( subWrapper, SWT.NONE );
extensionSpace.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, false ) );
extensionSpace.setLayout ( new RowLayout ( SWT.HORIZONTAL ) );
this.chartArea = new ChartArea ( subWrapper, SWT.NONE );
this.chartArea.setLayoutData ( new GridData ( SWT.FILL, SWT.FILL, true, true ) );
this.configuration = ChartHelper.loadConfiguraton ( this.descriptor.getUri ().toString () );
this.chart = new ChartViewer ( this.chartArea.getDisplay (), this.chartArea.getChartRenderer (), this.configuration, new CompositeExtensionSpace ( extensionSpace ), new ResetHandler () {
@Override
public void reset ()
{
reload ();
}
} );
if ( this.showSelector )
{
this.selector = new ChartInputSelector ( this.wrapper, this.chart, true );
this.wrapper.setWeights ( new int[] { 85, 15 } );
}
this.viewManagerContext.setSelectionProvider ( this.chart );
this.chart.setFocus ();
}
/**
* Create contents of the view part.
*
* @param parent
*/
@Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
Composite container = new Composite(parent, SWT.NONE);
container.setBackgroundMode(SWT.INHERIT_FORCE);
container.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
container.setLayout(new GridLayout(1, false));
{
SashForm sashForm = new SashForm(container, SWT.NONE);
sashForm.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
{
resultsComposite = new Composite(sashForm, SWT.NONE);
resultsComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
resultsComposite.setLayout(new FillLayout(SWT.HORIZONTAL));
{
Label lblInitiateACode = new Label(resultsComposite, SWT.NONE);
lblInitiateACode.setText("Initiate a code recommendation request first, to see the results here");
}
}
{
previewComposite = new Composite(sashForm, SWT.NONE);
StackLayout layout = new StackLayout();
previewComposite.setLayout(layout);
lblSelectAPattern = new Label(previewComposite, SWT.CENTER);
lblSelectAPattern.setEnabled(false);
lblSelectAPattern.setText("Select a pattern to open in preview");
layout.topControl = lblSelectAPattern;
}
sashForm.setWeights(new int[] { 1, 1 });
}
createActions();
initializeToolBar();
initializeMenu();
}
private Control buildBottomControl( final Composite parent){
Composite bottom = new Composite(parent, SWT.NULL);
FillLayout layout = new FillLayout();
bottom.setLayout(layout);
bottom.setLayoutData(new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL));
vSash = new SashForm(bottom, SWT.HORIZONTAL);
vSash.setLayout(layout);
Composite leftBottom = new Composite(vSash, SWT.NULL);
leftBottom.setLayout(new FillLayout(SWT.VERTICAL));
hSash = new SashForm(leftBottom, SWT.VERTICAL);
hSash.setLayout(layout);
requestView = new RequestView(model, vSash);
responseView = new ResponseView(model, vSash);
vSash.setWeights(model.getVSashWeights());
headerView = new HeaderView(model, hSash);
paramView = new ParamView(model, hSash);
bodyView = new BodyView(model, hSash);
hSash.setWeights(model.getHSashWeights());
return bottom;
}
@Override
public void createPartControl(@Nullable Composite parent) {
super.createPartControl(parent);
SashForm sf = new SashForm(parent, SWT.NONE);
fContainer = sf;
/* Add a menu for adding charts */
Action addChart = new NewChartAction();
addChart.setText(MENU_TITLE);
IMenuManager menuMgr = getViewSite().getActionBars().getMenuManager();
menuMgr.add(addChart);
}
/**
* This is a callback that will allow us to create the viewer and initialize
* it.
*/
@Override
public void createPartControl(Composite parent) {
final SashForm sashForm = new SashForm(parent, SWT.NONE);
final SashForm sashForm2 = new SashForm(sashForm, SWT.NONE);
tsfviewer = new TimeGraphViewer(sashForm2, SWT.NONE);
tsfviewer.setTimeGraphProvider(new TsfImplProvider());
tsfviewer2 = new TimeGraphViewer(sashForm2, SWT.NONE);
tsfviewer2.setTimeGraphProvider(new TsfImplProvider());
viewer = new TreeViewer(sashForm, SWT.MULTI | SWT.H_SCROLL
| SWT.V_SCROLL);
drillDownAdapter = new DrillDownAdapter(viewer);
viewer.setContentProvider(new ViewContentProvider());
viewer.setLabelProvider(new ViewLabelProvider());
viewer.setComparator(new ViewerComparator());
viewer.setInput(getViewSite());
sashForm.setWeights(new int[] { 5, 1 });
sashForm2.setWeights(new int[] { 1, 1 });
fact = new TraceModelImplFactory();
ITimeGraphEntry[] traceArr = fact.createTraces();
tsfviewer.setInput(traceArr);
tsfviewer.addSelectionListener(this);
tsfviewer.addRangeListener(this);
tsfviewer.setTimeFormat(TimeFormat.CALENDAR);
tsfviewer2.setInput(traceArr);
tsfviewer2.addSelectionListener(this);
tsfviewer2.addRangeListener(this);
// tsfviewer2.setTimeFormat(TimeGraphViewer.timeFormat.epoch);
makeActions();
hookContextMenu();
hookDoubleClickAction();
contributeToActionBars();
}
@Test
public void testCloseExpandedContentManager() throws Exception {
TransGraph transGraph = mock( TransGraph.class );
Browser browser = mock( Browser.class );
SashForm sashForm = mock( SashForm.class );
setupExpandedContentMocks( transGraph, browser, sashForm );
ExpandedContentManager.closeExpandedContent( transGraph );
verify( browser ).close();
verify( sashForm ).setWeights( new int[] { 3, 2, 1 } );
}
@Override
public void createControl(final Composite parent) {
container = new Composite(parent, SWT.NULL);
container.setLayout(new GridLayout());
sash = new SashForm(container, SWT.VERTICAL);
sash.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
sash.setBackground(sash.getDisplay().getSystemColor(SWT.COLOR_GRAY));
outputsScrolledComposite = new ScrolledComposite(sash, SWT.V_SCROLL);
outputsScrolledComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
outputsContainer = new Composite(outputsScrolledComposite, SWT.NONE);
final GridLayout outputsLayout = new GridLayout(4, false);
outputsLayout.marginHeight = 10;
outputsLayout.marginWidth = 0;
outputsContainer.setLayout(outputsLayout);
outputsScrolledComposite.setContent(outputsContainer);
outputsScrolledComposite.setExpandHorizontal(true);
outputsScrolledComposite.setExpandVertical(true);
outputsContainer.layout();
outputsScrolledComposite.setMinSize(outputsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).x, outputsContainer.computeSize(SWT.DEFAULT, SWT.DEFAULT).y-5);
tableContainer = new Composite(sash, SWT.NONE);
final GridLayout tableLayout = new GridLayout();
tableLayout.marginHeight = 0;
tableLayout.marginWidth = 0;
tableContainer.setLayout(tableLayout);
previewTable = new TmfEventsTable(tableContainer, 0, CustomEventAspects.generateAspects(new CustomTxtTraceDefinition()));
previewTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
if (wizard.definition != null) {
loadDefinition(wizard.definition);
}
setControl(container);
}
public void createControl(Composite parent) {
getShell().setBounds(calculatePosition(WIZARD_SIZE_SCALE_FACOTR, WIZARD_SIZE_OFFSET));
Composite root = new Composite(parent, SWT.NONE);
root.setLayout(new GridLayout(1, true));
createUpdateGroup(root);
SashForm container = new SashForm(root, SWT.NONE);
GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
GridLayout layout = new GridLayout(2, false);
container.setLayout(layout);
createTreeViewer(container);
createDetailsPane(container);
container.setWeights(new int[] { 1, 2 });
setControl(container);
parent.layout();
}
@Override
public void createPartControl(Composite parent) {
GridLayoutFactory.fillDefaults().spacing(0, 0).applyTo(parent);
createBreadcrumbViewer(parent);
sash = (SashForm) createParentSash(parent);
createTextEditor(sash);
super.createPartControl(sash);
}
protected Composite createParentSash(Composite parent) {
GridDataFactory.fillDefaults().grab(true, true).applyTo(parent);
SashForm sash = new SashForm(parent, SWT.HORIZONTAL);
sash.setBackground(ColorConstants.white);
sash.setSashWidth(SASH_WIDTH);
GridDataFactory.fillDefaults().grab(true, true).applyTo(sash);
GridLayoutFactory.fillDefaults().applyTo(sash);
return sash;
}
public StatechartDefinitionSection(Composite parent, int style, DiagramPartitioningEditor editorPart) {
super(parent, style);
this.sash = (SashForm) parent;
this.editorPart = editorPart;
this.switchControl = createSwitchControl();
this.labelComposite = createDefinitionSectionComponents();
this.embeddedEditor = createSpecificationEditor();
registerResizeListener();
GridLayoutFactory.fillDefaults().numColumns(2).spacing(0, 0).applyTo(this);
initSynchronizer();
}