本文整理汇总了Java中org.eclipse.swt.custom.StackLayout类的典型用法代码示例。如果您正苦于以下问题:Java StackLayout类的具体用法?Java StackLayout怎么用?Java StackLayout使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
StackLayout类属于org.eclipse.swt.custom包,在下文中一共展示了StackLayout类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: attachTableButtonListner
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/**
*
* @param selectionComposite
* @param layout
*/
private void attachTableButtonListner(final ELTSubGroupCompositeWithStack selectionComposite,
final StackLayout layout) {
final Button tableRadioBtn = (Button) tableNameRadioButton.getSWTWidgetControl();
tableRadioBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (tableRadioBtn.getSelection()) {
unRegisterTableOrSQLQueryTextListner();
layout.topControl = tableComposite.getContainerControl();
selectionComposite.getContainerControl().layout();
if (databaseSelectionConfig != null) {
databaseSelectionConfig.setTableNameSelection(true);
databaseSelectionConfig.setTableName(textBoxTableName.getText());
populateWidget();
}
showHideErrorSymbol(widgets);
propertyDialogButtonBar.enableApplyButton(true);
}
}
});
}
示例2: attachSQLQueryListner
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/**
*
* @param selectionComposite
* @param layout
*/
private void attachSQLQueryListner(final ELTSubGroupCompositeWithStack selectionComposite,
final StackLayout layout) {
final Button sqlRadioBtn = (Button) sqlQueryRadioButton.getSWTWidgetControl();
sqlRadioBtn.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
if (sqlRadioBtn.getSelection()) {
unRegisterTableOrSQLQueryTextListner();
layout.topControl = sqlQueryComposite.getContainerControl();
selectionComposite.getContainerControl().layout();
if (databaseSelectionConfig != null) {
databaseSelectionConfig.setTableNameSelection(false);
databaseSelectionConfig.setSqlQuery(sqlQueryTextBox.getText());
//databaseSelectionConfig.setSqlQueryCounter(sqlQueryCountertextbox.getText());
populateWidget();
}
showHideErrorSymbol(widgets);
propertyDialogButtonBar.enableApplyButton(true);
}
}
});
}
示例3: testCorrectPanelIsShownForFacetedProject
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Test
public void testCorrectPanelIsShownForFacetedProject() {
DeployPropertyPage page = new DeployPropertyPage(loginService, googleApiFactory);
Shell parent = shellTestResource.getShell();
page.setElement(getProject());
page.createControl(parent);
page.setVisible(true);
Composite preferencePageComposite = (Composite) parent.getChildren()[0];
for (Control control : preferencePageComposite.getChildren()) {
if (control instanceof Composite) {
Composite maybeDeployPageComposite = (Composite) control;
Layout layout = maybeDeployPageComposite.getLayout();
if (layout instanceof StackLayout) {
StackLayout stackLayout = (StackLayout) layout;
assertThat(stackLayout.topControl, instanceOf(getPanelClass()));
return;
}
}
}
fail("Did not find the deploy preferences panel");
}
示例4: createContents
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
protected Control createContents(Composite parent) {
container = new Composite(parent, SWT.NONE);
stackLayout = new StackLayout();
container.setLayout(stackLayout);
IProject project = AdapterUtil.adapt(getElement(), IProject.class);
try {
facetedProject = ProjectFacetsManager.create(project);
} catch (CoreException ex) {
logger.log(Level.WARNING, ex.getMessage());
return container;
}
GridDataFactory.fillDefaults().grab(true, true).applyTo(container);
return container;
}
示例5: initCardPanel
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
private void initCardPanel(final Composite composite) {
cardPanel = new Composite(composite, SWT.NONE);
stackLayout = new StackLayout();
stackLayout.marginHeight = 0;
stackLayout.marginWidth = 0;
cardPanel.setLayout(stackLayout);
final GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
gridData.horizontalSpan = 2;
gridData.horizontalIndent = 0;
gridData.verticalIndent = 0;
cardPanel.setLayoutData(gridData);
initNonePanel();
initTemplatePanel();
initForeignKeyPanel();
initEnumPanel();
}
示例6: initCardPanel
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
private void initCardPanel(Composite composite) {
this.cardPanel = new Composite(composite, SWT.NONE);
this.stackLayout = new StackLayout();
this.stackLayout.marginHeight = 0;
this.stackLayout.marginWidth = 0;
this.cardPanel.setLayout(this.stackLayout);
GridData gridData = new GridData();
gridData.grabExcessHorizontalSpace = true;
gridData.horizontalAlignment = GridData.FILL;
gridData.horizontalSpan = 2;
gridData.horizontalIndent = 0;
gridData.verticalIndent = 0;
this.cardPanel.setLayoutData(gridData);
this.initNonePanel();
this.initTemplatePanel();
this.initForeignKeyPanel();
this.initEnumPanel();
}
示例7: createFieldEditors
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/** Create fields controlling converter selection */
@Override
public void createFieldEditors() {
Composite parent = getFieldEditorParent();
base = SwtUtil.makeGroupComposite(parent, 3, 1, "Conversion filter selection");
// Converter selection
combo = new ConverterSelectFieldEditor(EDITOR_MD_CONVERTER, "Converter:", converters, base);
addField(combo);
stack = SwtUtil.makeCompositeStack(parent, 3, 1);
stackSel = (StackLayout) stack.getLayout();
// stacked options
pandoc = new ConverterPandocOps(this, stack, "Pandoc Options");
bfriday = new ConverterBlackFridayOps(this, stack, "BlackFriday Options");
txtmark = new ConverterTxtmarkOps(this, stack, "TxtMark Options");
external = new ConverterExternalOps(this, stack, "External Options");
other = new ConverterNullOps(this, stack, "Default Options");
// rest
dotgen = new ConverterDotOps(this, parent, "Graphviz Options");
// Converter option selection
updateOptionsBlock(stack, getPreferenceStore().getString(EDITOR_MD_CONVERTER));
}
示例8: PlotComposite
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
/**
* The default constructor.
*
* @param parent
* a widget which will be the parent of the new instance (cannot
* be null)
* @param style
* the style of widget to construct
*/
public PlotComposite(Composite parent, int style) {
super(parent, style);
plottedSeries = new HashSet<ISeries>();
// Configure the Composite settings.
setFont(parent.getFont());
setBackground(parent.getBackground());
setLayout(new StackLayout());
// Load the plot actions and context Menu.
plotActions = getPlotActions();
contextMenu = createContextMenu(this);
return;
}
示例9: createSourceViewer
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
Composite composite = new Composite(parent, SWT.NONE);
GridLayout compositeLayout = new GridLayout(1, false);
compositeLayout.marginHeight = 0;
compositeLayout.marginWidth = 0;
compositeLayout.horizontalSpacing = 0;
compositeLayout.verticalSpacing = 0;
composite.setLayout(compositeLayout);
topPanel = new Composite(composite, SWT.NONE);
topPanel.setLayout(new StackLayout());
topPanel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false));
Composite editorComposite = new Composite(composite, SWT.NONE);
editorComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
FillLayout fillLayout = new FillLayout(SWT.VERTICAL);
fillLayout.marginHeight = 0;
fillLayout.marginWidth = 0;
fillLayout.spacing = 0;
editorComposite.setLayout(fillLayout);
ISourceViewer result = doCreateSourceViewer(editorComposite, ruler, styles);
return result;
}
示例10: createDataset
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
public void createDataset(Composite composite) {
sComposite = new Composite(composite, SWT.NONE);
stacklayout = new StackLayout();
sComposite.setLayout(stacklayout);
sComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
map.put(JRDesignCategoryDataset.class, new DSCategory(sComposite, this));
map.put(JRDesignGanttDataset.class, new DSGantt(sComposite, this));
map.put(JRDesignHighLowDataset.class, new DSHighLow(sComposite, this));
map.put(JRDesignPieDataset.class, new DSPie(sComposite, this));
map.put(JRDesignTimePeriodDataset.class, new DSTimePeriod(sComposite,
this));
map.put(JRDesignTimeSeriesDataset.class, new DSTimeSeries(sComposite,
this));
map.put(JRDesignValueDataset.class, new DSValue(sComposite, this));
map.put(JRDesignXyDataset.class, new DSXy(sComposite, this));
map.put(JRDesignXyzDataset.class, new DSXyz(sComposite, this));
// here we can add other datasources ...
map.put(StandardSpiderDataset.class, new DSSpider(sComposite, this));
stacklayout.topControl = map.get(JRDesignCategoryDataset.class)
.getControl();
}
示例11: TFContainer
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
public TFContainer(Composite parent, int style) {
super(parent, style);
GridLayout layout = new GridLayout(2,false);
layout.marginHeight = 0;
layout.marginWidth = 0;
layout.verticalSpacing = 0;
setLayout(layout);
toolBar = new ToolBar(this, SWT.HORIZONTAL | SWT.FLAT | SWT.WRAP | SWT.RIGHT);
additionalToolbar = new ToolBar(this, SWT.HORIZONTAL | SWT.FLAT | SWT.WRAP | SWT.RIGHT);
GridData additionalToolbarGD = new GridData(SWT.RIGHT, SWT.CENTER, true, false);
additionalToolbar.setLayoutData(additionalToolbarGD);
additionalToolbarManager = new ToolBarManager(additionalToolbar);
content = new Composite(this, SWT.NONE);
stackLayout = new StackLayout();
stackLayout.marginWidth = 0;
stackLayout.marginHeight = 0;
content.setLayout(stackLayout);
content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 2, 1));
}
示例12: createPartControl
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
public void createPartControl(Composite parent) {
fParent= new Composite(parent, SWT.NONE);
fStackLayout= new StackLayout();
fParent.setLayout(fStackLayout);
fViewerComposite= new Composite(fParent, SWT.NONE);
fViewerComposite.setLayout(new FillLayout());
super.createPartControl(fViewerComposite);
fStackLayout.topControl= fViewerComposite;
fParent.layout();
try {
verifyInput(getEditorInput());
} catch (CoreException e) {
String title= JavaEditorMessages.ClassFileEditor_error_title;
String message= JavaEditorMessages.ClassFileEditor_error_message;
ExceptionHandler.handle(e, fParent.getShell(), title, message);
}
}
示例13: performUpdate
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
public void performUpdate() {
// TODO Auto-generated method stub
//if (this.softwareService == data.getSoftwareService()) return;
Overview overviewModel = data.getOverviewModel();
this.softwareService = data.getSoftwareService();
System.out.println("Model: "+overviewModel.getArchitecture().getCloudEnvironments().get(0).getSoftwareLayer().getServices().get(0).getName());
System.out.println("Software Service: "+this.softwareService.getName());
if (softwareService.getRequiredInterfaces().isEmpty())
{
((StackLayout)container.getLayout()).topControl = emptyComposite;
checkComplete();
}
else
{
((StackLayout)container.getLayout()).topControl = mainComposite;
initBindings();
createServiceComponent();
checkComplete();
}
container.layout();
container.redraw();
}
示例14: updateServiceComopsite
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
private void updateServiceComopsite()
{
StackLayout layout = (StackLayout)stackedComposite.getLayout();
if (rbIaaS.getSelection())
{
layout.topControl = cIaaS;
}
if (rbPaaS.getSelection())
{
layout.topControl = cPaaS;
}
if (rbSaaS.getSelection())
{
layout.topControl = cSaaS;
}
if (rbExternal.getSelection())
{
layout.topControl = cExternal;
}
stackedComposite.layout();
updateDeploymentComposite();
}
示例15: createDataDragSource
import org.eclipse.swt.custom.StackLayout; //导入依赖的package包/类
@Override
public Composite createDataDragSource( Composite parent )
{
cmpStack = new Composite( parent, SWT.NONE );
cmpStack.setLayoutData( new GridData( GridData.FILL_BOTH ) );
stackLayout = new StackLayout( );
stackLayout.marginHeight = 0;
stackLayout.marginWidth = 0;
cmpStack.setLayout( stackLayout );
cmpCubeTree = this.createTreeViewComposite( cmpStack );
cmpDataPreview = this.createTableViewComposite( cmpStack );
cmpColumnsList = this.createColumnListViewComposite( cmpStack );
updateDragDataSource( );
return cmpStack;
}