本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite.setAlwaysShowScrollBars方法的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite.setAlwaysShowScrollBars方法的具体用法?Java ScrolledComposite.setAlwaysShowScrollBars怎么用?Java ScrolledComposite.setAlwaysShowScrollBars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.ScrolledComposite
的用法示例。
在下文中一共展示了ScrolledComposite.setAlwaysShowScrollBars方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createControl(Composite parent) {
scompo = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
scompo.setExpandHorizontal(true);
scompo.setExpandVertical(true);
scompo.setAlwaysShowScrollBars(false);
scompo.setMinSize(100, 100);
composite = new Composite(scompo, SWT.BORDER);
composite.setBackgroundMode(SWT.INHERIT_FORCE);
composite.setBackground(parent.getBackground());
GridLayout layout = new GridLayout();
layout.marginBottom = 20;
composite.setLayout(layout);
scompo.setContent(composite);
return scompo;
}
示例2: 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;
}
示例3: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
Composite composite = (Composite) super.createDialogArea( parent );
ScrolledComposite sc = new ScrolledComposite( composite, SWT.V_SCROLL );
sc.setAlwaysShowScrollBars( false );
sc.setExpandHorizontal( true );
sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );
Composite content = new Composite( sc, SWT.NONE );
sc.setContent( content );
content.setLayout( new GridLayout( ) );
// sc.setBackground( Display.getCurrent( ).getSystemColor(
// SWT.COLOR_BLACK ) );
// content.setBackground( Display.getCurrent( ).getSystemColor(
// SWT.COLOR_BLUE ) );
// composite.setBackground( Display.getCurrent( ).getSystemColor(
// SWT.COLOR_RED ) );
dialogHelper.setExpressionProvider( expressionProvider );
dialogHelper.createContent( content );
UIUtil.bindHelp( content, isTimePeriod || isEditTimePeriod()? IHelpContextIds.RELATIVE_TIME_PERIOD_DIALOG : IHelpContextIds.DATA_COLUMN_BINDING_DIALOG );
return content;
}
示例4: addScrolledCompositeToTab
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private ScrolledComposite addScrolledCompositeToTab(CTabFolder tabFolder,CTabItem tabItem) {
ScrolledComposite scrolledComposite = new ScrolledComposite(tabFolder,SWT.V_SCROLL);
tabItem.setControl(scrolledComposite);
//scrolledComposite.setLayout(new GridLayout(1, false));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
scrolledComposite.setAlwaysShowScrollBars(false);
attachMouseScrollButtonListener(scrolledComposite);
return scrolledComposite;
}
示例5: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea(Composite parent) {
Composite tparent = (Composite) super.createDialogArea(parent);
tparent.setLayout(new GridLayout());
GridDataFactory.fillDefaults().align(SWT.FILL, SWT.FILL).hint(300, 250).grab(true, true).applyTo(tparent);
ScrolledComposite cmpScrolled = new ScrolledComposite(tparent, SWT.V_SCROLL);
cmpScrolled.setAlwaysShowScrollBars(false);
cmpScrolled.setLayoutData(new GridData(GridData.FILL_BOTH));
cmpScrolled.setExpandHorizontal(true);
cmpScrolled.setShowFocusedControl(true);
Composite cmpContent = new Composite(cmpScrolled, SWT.None);
cmpScrolled.setContent(cmpContent);
cmpContent.setLayout(new GridLayout(2, false));
cmpContent.setLayoutData(new GridData(GridData.FILL_BOTH));
arrCmbLangs = new Combo[size];
for (int i = 0; i < size; i++) {
createLabel(cmpContent, languages.get(i) + " : ");
arrCmbLangs[i] = new Combo(cmpContent, SWT.READ_ONLY);
arrCmbLangs[i].setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
arrCmbLangs[i].setItems(LocaleService.getLanguages());
String name = LocaleService.getLanguage(languages.get(i));
if (!name.equals(languages.get(i))) {
arrCmbLangs[i].setText(name);
}
}
cmpContent.setSize(cmpContent.computeSize(SWT.DEFAULT, SWT.DEFAULT));
return tparent;
}
示例6: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createDialogArea( Composite parent )
{
UIUtil.bindHelp( parent, IHelpContextIds.MEASURE_DIALOG );
Composite area = (Composite) super.createDialogArea( parent );
ScrolledComposite sc = new ScrolledComposite( area, SWT.V_SCROLL );
sc.setAlwaysShowScrollBars( false );
sc.setExpandHorizontal( true );
sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );
Composite contents = new Composite( sc, SWT.NONE);
sc.setContent( contents );
GridLayout layout = new GridLayout( );
layout.verticalSpacing = 0;
layout.marginWidth = 20;
contents.setLayout( layout );
GridData data = new GridData( GridData.FILL_BOTH );
data.widthHint = convertWidthInCharsToPixels( 70 );
contents.setLayoutData( data );
createMeasureArea( contents );
createVisibilityGroup( contents);
WidgetUtil.createGridPlaceholder( contents, 1, true );
initMeasureDialog( );
// calculate the size explicitly as it is in scrollable composite
Point size = contents.computeSize( SWT.DEFAULT, SWT.DEFAULT );
contents.setSize( Math.max( size.x, 400 ), Math.max( size.y, 320 ) );
return contents;
}
示例7: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
Composite composite = (Composite) super.createDialogArea( parent );
ScrolledComposite scrollContent = new ScrolledComposite( composite,
SWT.H_SCROLL | SWT.V_SCROLL );
scrollContent.setAlwaysShowScrollBars( false );
scrollContent.setExpandHorizontal( true );
scrollContent.setLayout( new FillLayout( ) );
scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) );
switch ( type )
{
case STRING :
page = new FormatStringPage( scrollContent,
SWT.NONE,
IFormatPage.PAGE_ALIGN_VIRTICAL,
false );
break;
case NUMBER :
page = new FormatNumberPage( scrollContent,
SWT.NONE,
IFormatPage.PAGE_ALIGN_VIRTICAL,
false );
break;
case DATETIME :
case DATE :
case TIME :
page = new FormatDateTimePage( scrollContent,
type,
SWT.NONE,
IFormatPage.PAGE_ALIGN_VIRTICAL,
false );
break;
}
Point size = ( (Composite) page ).computeSize( SWT.DEFAULT, SWT.DEFAULT );
( (Composite) page ).setSize( size );
scrollContent.setContent( (Composite) page );
UIUtil.bindHelp( composite, IHelpContextIds.FORMAT_BUILDER_ID );
return composite;
}
示例8: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
setMessage( Messages.getString( "ParameterDialog.message" ) ); //$NON-NLS-1$
ScrolledComposite scrollContent = new ScrolledComposite( (Composite) super.createDialogArea( parent ),
SWT.H_SCROLL | SWT.V_SCROLL );
scrollContent.setAlwaysShowScrollBars( false );
scrollContent.setExpandHorizontal( true );
scrollContent.setMinWidth( 600 );
scrollContent.setLayout( new FillLayout( ) );
scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) );
displayArea = new Composite( scrollContent, SWT.NONE );
Composite topComposite = new Composite( displayArea, SWT.NONE );
topComposite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
topComposite.setLayout( new GridLayout( 2, false ) );
createPropertiesSection( topComposite );
createDisplayOptionsSection( topComposite );
createValuesDefineSection( displayArea );
displayArea.setLayout( new GridLayout( ) );
Point size = displayArea.computeSize( SWT.DEFAULT, SWT.DEFAULT );
displayArea.setSize( size );
scrollContent.setContent( displayArea );
UIUtil.bindHelp( parent, IHelpContextIds.PARAMETER_DIALOG_ID );
return scrollContent;
}
示例9: createMainWindowComposite
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public Composite createMainWindowComposite(Composite parent) {
removeImage = CloudFoundryImages.REMOVE.createImage();
group = new Group(parent, SWT.SHADOW_IN);
group.setText(Messages.CloudFoundryServiceWizardPageRightPanel_SERVICES_TO_CREATE);
group.setLayout(new FillLayout());
group.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
if (boldFont != null && !boldFont.isDisposed()) {
boldFont.dispose();
}
if (removeImage != null && !removeImage.isDisposed()) {
removeImage.dispose();
}
}
});
scrollComp = new ScrolledComposite(group, SWT.V_SCROLL);
scrollComp.setAlwaysShowScrollBars(false);
layoutList = createLayoutList(scrollComp);
scrollComp.setContent(layoutList);
scrollComp.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent event) {
Control c = scrollComp.getContent();
if (c == null) {
return;
}
Rectangle r = scrollComp.getClientArea();
r.height = c.computeSize(r.width, SWT.DEFAULT).y;
c.setBounds(r);
}
});
return group;
}
示例10: createMainWindowComposite
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public Composite createMainWindowComposite(Composite parent) {
removeImage = DockerFoundryImages.REMOVE.createImage();
group = new Group(parent, SWT.SHADOW_IN);
group.setText(Messages.DockerFoundryServiceWizardPageRightPanel_SERVICES_TO_CREATE);
group.setLayout(new FillLayout());
group.addDisposeListener(new DisposeListener() {
@Override
public void widgetDisposed(DisposeEvent e) {
if (boldFont != null && !boldFont.isDisposed()) {
boldFont.dispose();
}
if (removeImage != null && !removeImage.isDisposed()) {
removeImage.dispose();
}
}
});
scrollComp = new ScrolledComposite(group, SWT.V_SCROLL);
scrollComp.setAlwaysShowScrollBars(false);
layoutList = createLayoutList(scrollComp);
scrollComp.setContent(layoutList);
scrollComp.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent event) {
Control c = scrollComp.getContent();
if (c == null) {
return;
}
Rectangle r = scrollComp.getClientArea();
r.height = c.computeSize(r.width, SWT.DEFAULT).y;
c.setBounds(r);
}
});
return group;
}
示例11: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
* Create contents of the dialog.
* @param parent
*/
@Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite) super.createDialogArea(parent);
container.setLayout(new GridLayout(1, false));
Composite composite = new Composite(container, SWT.NONE);
composite.setLayout(new GridLayout(2, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Label filterNameLabel = new Label(composite, SWT.NONE);
filterNameLabel.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
filterNameLabel.setText(Messages.getString("dialog.ExportFilterSettingDialog.filterNameLabel"));
filterNameText = new Text(composite, SWT.BORDER);
filterNameText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Composite optionComposite = new Composite(container, SWT.NONE);
optionComposite.setLayout(new GridLayout(2, false));
optionComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
isAllCbtn = new Button(optionComposite, SWT.RADIO);
isAllCbtn.setSize(152, 26);
isAllCbtn.setText(Messages.getString("dialog.ExportFilterSettingDialog.isAllCbtn"));
isAllCbtn.setSelection(true);
isAnyCbtn = new Button(optionComposite, SWT.RADIO);
isAnyCbtn.setText(Messages.getString("dialog.ExportFilterSettingDialog.isAnyCbtn"));
ScrolledComposite scrolledComposite = new ScrolledComposite(container, SWT.V_SCROLL | SWT.BORDER);
scrolledComposite.setAlwaysShowScrollBars(false);
scrolledComposite.setLayoutData(new GridData(GridData.FILL_BOTH));
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
dynaComposite = new Composite(scrolledComposite, SWT.NONE);
dynaComposite.setBackground(Display.getDefault().getSystemColor((SWT.COLOR_WHITE)));
scrolledComposite.setContent(dynaComposite);
scrolledComposite.setMinSize(dynaComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
GridLayout gl_dynaComposite = new GridLayout(1, false);
dynaComposite.setLayout(gl_dynaComposite);
ExportFilterComposite exportFilterComponent = new ExportFilterComposite(dynaComposite, SWT.None, ruleType);
exportFilterComponent.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
exportFilterComponent.setDeleteButtonEnabled(false);
dynaComposite.setData("currentNumber", 1);
scrolledComposite.setMinSize(dynaComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT));
initData();
return container;
}
示例12: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
// Assert.isNotNull( dataSetList );
if ( sytleChoicesAll == null )
{
sytleChoicesAll = getAllStyleChoices( );
}
// Composite topComposite = (Composite) super.createDialogArea( parent
// );
ScrolledComposite scrollContent = new ScrolledComposite( (Composite) super.createDialogArea( parent ),
SWT.H_SCROLL | SWT.V_SCROLL );
scrollContent.setAlwaysShowScrollBars( false );
scrollContent.setExpandHorizontal( true );
scrollContent.setMinWidth( 600 );
scrollContent.setLayout( new FillLayout( ) );
scrollContent.setLayoutData( new GridData( GridData.FILL_BOTH ) );
applyDialogFont( scrollContent );
Composite topComposite = new Composite( scrollContent, SWT.NONE );
GridLayout layout = new GridLayout( );
layout.marginHeight = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_MARGIN );
layout.marginWidth = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_MARGIN );
layout.verticalSpacing = convertVerticalDLUsToPixels( IDialogConstants.VERTICAL_SPACING );
layout.horizontalSpacing = convertHorizontalDLUsToPixels( IDialogConstants.HORIZONTAL_SPACING );
topComposite.setLayout( layout );
createTitleArea( topComposite );
Composite composite = new Composite( topComposite, SWT.NONE );
composite.setLayoutData( new GridData( GridData.FILL_HORIZONTAL ) );
composite.setLayout( new GridLayout( 2, true ) );
createFieldArea( composite );
createGroupArea( composite );
createBookmarkArea( topComposite );
createTOCArea( topComposite );
createFilterSortingArea( topComposite );
UIUtil.bindHelp( parent, IHelpContextIds.GROUP_DIALOG_ID );
Point size = topComposite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
topComposite.setSize( size.x, size.y );
scrollContent.setContent( topComposite );
return scrollContent;
}