本文整理匯總了Java中org.eclipse.swt.custom.ScrolledComposite.setLayout方法的典型用法代碼示例。如果您正苦於以下問題:Java ScrolledComposite.setLayout方法的具體用法?Java ScrolledComposite.setLayout怎麽用?Java ScrolledComposite.setLayout使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.eclipse.swt.custom.ScrolledComposite
的用法示例。
在下文中一共展示了ScrolledComposite.setLayout方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createFeatureListTab
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void createFeatureListTab(TabFolder tabFolder, ActiveTab type) {
TabItem tabItem = new TabItem(tabFolder, SWT.NULL);
if (type == ActiveTab.ALL_FEATURES) {
tabItem.setText(ALL_FEATURES_TAB_TITLE);
} else {
tabItem.setText(UPDATES_TAB_TITLE);
}
ScrolledComposite scroll = new ScrolledComposite(tabFolder, SWT.V_SCROLL | SWT.H_SCROLL);
scroll.setLayout(new GridLayout());
scroll.setLayoutData(new GridData());
Group group = new Group(scroll, SWT.NONE);
group.setLayout(new GridLayout());
group.setLayoutData(new GridData());
listFeatures(group, type);
scroll.setContent(group);
scroll.setExpandHorizontal(true);
scroll.setExpandVertical(true);
scroll.setMinSize(group.computeSize(SWT.DEFAULT, SWT.DEFAULT));
tabItem.setControl(scroll);
}
示例2: NotesCheckinControl
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
protected NotesCheckinControl(final Composite parent, final int style, final CheckinControlOptions options) {
super(parent, style, Messages.getString("NotesCheckinControl.Title"), CheckinSubControlType.CHECKIN_NOTES); //$NON-NLS-1$
this.options = options;
final FillLayout layout = new FillLayout();
layout.marginHeight = 0;
layout.marginWidth = 0;
setLayout(layout);
final int rootStyle = options.isForDialog() ? SWT.BORDER : SWT.NONE;
rootComposite = new ScrolledComposite(this, SWT.V_SCROLL | rootStyle);
rootComposite.setLayout(new FillLayout());
rootComposite.setExpandHorizontal(true);
rootComposite.setExpandVertical(true);
addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(final DisposeEvent e) {
if (pendingCheckin != null) {
pendingCheckin.getPendingChanges().removeAffectedTeamProjectsChangedListener(teamProjectsListener);
}
}
});
}
示例3: createPartControl
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
public void createPartControl(final Composite parent) {
try {
final Composite outer = toolkit.createComposite(parent, SWT.NONE);
final GridLayout layout = new GridLayout(1, false);
layout.marginHeight = layout.marginWidth = 0;
outer.setLayout(layout);
final GridData layoutData = new GridData(GridData.FILL_BOTH);
outer.setLayoutData(layoutData);
createValidationComposite(outer);
final ScrolledComposite content = new ScrolledComposite(outer, SWT.H_SCROLL | SWT.V_SCROLL);
content.setExpandHorizontal(true);
content.setExpandVertical(true);
content.setLayout(layout);
content.setLayoutData(layoutData);
final Composite children = initUi(content);
content.setMinSize(children.computeSize(SWT.DEFAULT, SWT.DEFAULT));
content.setContent(children);
createBinding();
additionalTasks();
} catch (final ConnectException e) {
handle(e);
}
}
示例4: createControl
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
Composite mainComposite = new Composite(parent, SWT.NONE);
mainComposite.setLayout(GridLayoutFactory.fillDefaults().create());
Label titleLabel = new Label(mainComposite, SWT.NONE);
titleLabel.setText(Messages.ShowServersPage_label);
ScrolledComposite scrollComp = new ScrolledComposite(mainComposite, SWT.V_SCROLL | SWT.H_SCROLL);
scrollComp.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
scrollComp.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
scrollComp.setLayout(new GridLayout(1,false));
scrollComp.setExpandHorizontal(true);
scrollComp.setExpandVertical(true);
content = new Composite(scrollComp, SWT.NONE);
scrollComp.setContent(content);
content.setLayout(new GridLayout(1,false));
content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
setControl(mainComposite);
}
示例5: createControl
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
public void createControl(Composite parent) {
Composite mainComposite = new Composite(parent, SWT.NONE);
mainComposite.setLayout(GridLayoutFactory.fillDefaults().create());
Label titleLabel = new Label(mainComposite, SWT.NONE);
titleLabel.setText(Messages.ShowAdaptersPage_label);
ScrolledComposite scrollComp = new ScrolledComposite(mainComposite, SWT.V_SCROLL | SWT.H_SCROLL);
scrollComp.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
scrollComp.setLayout(new GridLayout(1,false));
scrollComp.setExpandHorizontal(true);
scrollComp.setExpandVertical(true);
content = new Composite(scrollComp, SWT.NONE);
scrollComp.setContent(content);
content.setLayout(new GridLayout(1,false));
content.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
setControl(mainComposite);
}
示例6: createPartControl
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
public void createPartControl(Composite parent) {
scrollComp = new ScrolledComposite(parent, SWT.V_SCROLL);
scrollComp.setLayoutData(new GridData(GridData.FILL_BOTH));
scrollComp.setLayout(new GridLayout(1,false));
scrollComp.setExpandVertical(true);
scrollComp.setExpandHorizontal(true);
scrollComp.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
refreshScrolledHeight();
}
});
mainContainer = new Composite(scrollComp, SWT.BORDER);
mainContainer.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
scrollComp.setContent(mainContainer);
mainContainer.setLayout(new ButtonFillLayout());
IWorkbenchPart editor = getContributingPart();
if (editor instanceof CachedSelectionProvider){
CachedSelectionProvider cachedSelEditor = (CachedSelectionProvider)editor;
cachedSelEditor.getSelectionCache().addSelectionChangeListener(selectionListener);
}
}
示例7: designControl
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected void designControl(Composite theControl) {
theControl.setLayout( new FillLayout(SWT.HORIZONTAL));
scrolledComposite = new ScrolledComposite( theControl, SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER);
scrolledComposite.setLayout( new FillLayout( SWT.HORIZONTAL));
scrolledComposite.setLayoutData( new GridData(SWT.FILL, SWT.TOP, true, true, 0, 0));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
editorsContainer = new Composite( scrolledComposite, SWT.None);
editorsContainer.setLayout( new GridLayout( 1, true));
editorsContainer.setLayoutData( new GridData(SWT.FILL, SWT.TOP, true, false, 0, 0));
createParameterEditors();
scrolledComposite.setContent( editorsContainer);
scrolledComposite.setMinSize( editorsContainer.computeSize( SWT.DEFAULT, SWT.DEFAULT));
}
示例8: createBottomTypeArea
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
protected void createBottomTypeArea( Composite parent )
{
ScrolledComposite sc = new ScrolledComposite( parent, SWT.V_SCROLL
| SWT.H_SCROLL );
{
GridLayout layout = new GridLayout( );
sc.setLayout( layout );
GridData gridData = new GridData( GridData.FILL_BOTH );
sc.setLayoutData( gridData );
sc.setExpandHorizontal( true );
sc.setExpandVertical( true );
}
cmpType = new Composite( sc, SWT.NONE );
cmpType.setLayout( new GridLayout( 2, false ) );
cmpType.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
sc.setContent( cmpType );
createLeftTypeTable( cmpType );
populateChartTypes( );
createRightDetails( cmpType );
Point size = cmpType.computeSize( SWT.DEFAULT, SWT.DEFAULT );
sc.setMinSize( size );
}
示例9: createPageControls
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public Composite createPageControls( Composite parent )
{
ScrolledComposite scrolledComposite = new ScrolledComposite( parent,
SWT.V_SCROLL | SWT.H_SCROLL );
scrolledComposite.setAlwaysShowScrollBars( false );
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
scrolledComposite.setLayout( new FillLayout( ) );
Composite composite = new Composite( scrolledComposite, SWT.NONE );
composite.setLayout( new GridLayout( ) );
createURIRadioButtonsArea( composite );
createClientSettingsArea( composite );
createKerberosSettingsArea( composite );
Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
scrolledComposite.setMinWidth( size.x + 250 );
scrolledComposite.setMinHeight( size.y + 20 );
scrolledComposite.setContent( composite );
return composite;
}
示例10: addSettingTab
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void addSettingTab() {
// ////////////////////////
// START OF SETTING TAB ///
// ////////////////////////
wSettingTab = new CTabItem( wTabFolder, SWT.NONE );
wSettingTab.setText( BaseMessages.getString( PKG, "SdmxDialog.SettingTab.TabTitle" ) );
wSettingsSComp = new ScrolledComposite( wTabFolder, SWT.V_SCROLL | SWT.H_SCROLL );
wSettingsSComp.setLayout( new FillLayout() );
wSettingComp = new Composite( wSettingsSComp, SWT.NONE );
props.setLook(wSettingComp);
FormLayout settingLayout = new FormLayout();
settingLayout.marginWidth = 3;
settingLayout.marginHeight = 3;
wSettingComp.setLayout( settingLayout );
addProviderLabel();
addProviderCombo();
addFlowLabel();
addFlowTextInput();
addFlowBrowsingButton();
addDimensionTableView();
addDimensionButton();
addCodeListTableView();
addCodeButton();
addViewTimeSeriesButton();
wSettingComp.pack();
Rectangle bounds = wSettingComp.getBounds();
wSettingsSComp.setContent( wSettingComp );
wSettingsSComp.setExpandHorizontal( true );
wSettingsSComp.setExpandVertical( true );
wSettingsSComp.setMinWidth( bounds.width );
wSettingsSComp.setMinHeight( bounds.height );
fdSettingComp = new FormData();
fdSettingComp.left = new FormAttachment( 0, 0 );
fdSettingComp.top = new FormAttachment( 0, 0 );
fdSettingComp.right = new FormAttachment( 100, 0 );
fdSettingComp.bottom = new FormAttachment( 100, 0 );
wSettingComp.setLayoutData( fdSettingComp );
wSettingTab.setControl( wSettingsSComp );
}
示例11: setupCanvas
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
private void setupCanvas() {
imageScrolledComposite = new ScrolledComposite(shell, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER);
imageScrolledComposite.setLayout(new GridLayout());
imageScrolledComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, true));
imageScrolledComposite.setExpandVertical(true);
imageScrolledComposite.setExpandHorizontal(true);
canvas = new Canvas(imageScrolledComposite, SWT.NONE);
imageScrolledComposite.setMinSize(image.getBounds().width, image.getBounds().height);
imageScrolledComposite.setContent(canvas);
setupCanvasListeners();
}
示例12: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected Control createDialogArea(Composite parent) {
final GridData parentData = new GridData(SWT.FILL, SWT.FILL, true, true);
parent.setLayout(new GridLayout());
parent.setLayoutData(parentData);
final ScrolledComposite wrapper = new ScrolledComposite(parent, SWT.H_SCROLL | SWT.V_SCROLL);
wrapper.setExpandHorizontal(true);
wrapper.setExpandVertical(true);
final FillLayout wrapperLayout = new FillLayout();
wrapperLayout.marginHeight = 10;
wrapperLayout.marginWidth = 10;
wrapper.setLayout(wrapperLayout);
wrapper.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
final Composite emfFormsParent = new Composite(wrapper, SWT.NONE);
wrapper.setContent(emfFormsParent);
emfFormsParent.setLayout(new GridLayout());
emfFormsParent.setLayoutData(new GridData(500, 500));
try {
view = ECPSWTViewRenderer.INSTANCE.render(emfFormsParent, namedObj);
} catch (final ECPRendererException e) {
}
wrapper.setMinSize(wrapper.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return parent;
}
示例13: init
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
public void init(){
//all
wholeSash=new SashForm(parent, SWT.VERTICAL);
//top
SashForm topSash=new SashForm(wholeSash, SWT.HORIZONTAL);
//bottom
botSash=new SashForm(wholeSash, SWT.HORIZONTAL);
//top.left
wiScrollComp=new ScrolledComposite(topSash, SWT.H_SCROLL|SWT.V_SCROLL);
wiScrollComp.setLayout(new FillLayout());
wiComp=new Composite(wiScrollComp, SWT.FILL);
wiComp.setSize(width0, height0);
// wiComp.setLayout(new FillLayout());
GridLayout layout = new GridLayout();
layout.numColumns=1;
wiComp.setLayout(layout);
wiScrollComp.setContent(wiComp);
//top.right
eplTable=new EplTable(topSash, SWT.MULTI|SWT.V_SCROLL|SWT.H_SCROLL|SWT.FULL_SELECTION);
eplTable.getTable().addMouseListener(eplTableListener);
Composite flowGraphComp=new Composite(botSash, SWT.NONE);
flowGraphComp.setLayout(new FillLayout());
flowGraph=new CGraph(flowGraphComp, SWT.NONE);
flowGraph.setConnectionStyle(ZestStyles.CONNECTIONS_DIRECTED);
//bottom.right
//flowText=new Text(botSash, SWT.NONE);
initInstanceStatTable(botSash);
//set weights
topSash.setWeights(new int[]{3,1});
botSash.setWeights(new int[]{3,1});
wholeSash.setWeights(new int[]{3,1});
}
示例14: createPreferenceContent
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
@Override
protected Control createPreferenceContent(Composite parent) {
scrollPanel = new ScrolledComposite(parent, SWT.V_SCROLL);
GridData scrollPanelGridData = new GridData(GridData.FILL_BOTH);
scrollPanel.setLayoutData(scrollPanelGridData);
GridLayout scrollPanelLayout = new GridLayout(1, false);
scrollPanel.setLayout(scrollPanelLayout);
topPanel = new Composite(scrollPanel, SWT.NONE);
GridLayout layout = new GridLayout(1, false);
layout.marginHeight = 0;
layout.marginWidth = 0;
topPanel.setLayout(layout);
// Set up main composite to be scrollable
scrollPanel.setContent(topPanel);
scrollPanel.setExpandHorizontal(true);
scrollPanel.setExpandVertical(true);
// Create the list of problems (grouped by category)
createProblemsList(topPanel);
ExpandableComposite firstChild = (ExpandableComposite) problemsPanel.getChildren()[0];
firstChild.setExpanded(true);
// Initialize the severity combos
populateSeverityCombosFromWorkingCopy();
return topPanel;
}
示例15: createErrorsSection
import org.eclipse.swt.custom.ScrolledComposite; //導入方法依賴的package包/類
/**
* Create the composite with the controls to show the errors
*
* @param parent
* @return the parent composite where the controls are contained
*/
private Composite createErrorsSection(Composite parent){
Composite container = new Composite(parent, SWT.NULL);
GridLayout layout = new GridLayout(1,false);
layout.marginTop = 20;
layout.verticalSpacing = 10;
container.setLayout(layout);
Label lblCongratulations = new Label(container, SWT.NONE);
Font font = lblCongratulations.getFont();
lblCongratulations.setFont(SWTResourceManager.getFont(font.getFontData()[0].getName(), 18, SWT.NORMAL));
lblCongratulations.setForeground(ColorConstants.red);
lblCongratulations.setText(Messages.FinalPage_errorTitle);
lblCongratulations.setLayoutData(new GridData(SWT.FILL, SWT.LEFT, true, false));
scrolledComposite = new ScrolledComposite(container, SWT.V_SCROLL);
scrolledComposite.setLayout(new FillLayout(SWT.VERTICAL));
Composite areaComp = new Composite(scrolledComposite, SWT.NONE);
areaComp.setLayout(new FillLayout(SWT.VERTICAL));
errorsArea = new StyledText(areaComp, SWT.NONE);
errorsArea.setEditable(false);
errorsArea.setBackground(areaComp.getBackground());
scrolledComposite.setContent(areaComp);
scrolledComposite.getVerticalBar().setIncrement(10);
Label lblPressFinishTo = new Label(container, SWT.WRAP);
lblPressFinishTo.setText(Messages.FinalPage_errorConclusiveMessage);
GridData finishData = new GridData(SWT.FILL, SWT.LEFT, true, false);
finishData.widthHint = 170;
finishData.heightHint = 130;
lblPressFinishTo.setLayoutData(finishData);
return container;
}