本文整理汇总了Java中org.eclipse.swt.custom.ScrolledComposite.setMinWidth方法的典型用法代码示例。如果您正苦于以下问题:Java ScrolledComposite.setMinWidth方法的具体用法?Java ScrolledComposite.setMinWidth怎么用?Java ScrolledComposite.setMinWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.swt.custom.ScrolledComposite
的用法示例。
在下文中一共展示了ScrolledComposite.setMinWidth方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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;
}
示例2: 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 );
}
示例3: setMinWidth
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void setMinWidth(Position pos, int width) {
ScrolledComposite sc = widgets.get(pos);
if (sc!=null) {
sc.setMinWidth(width);
}
}
示例4: createScrolledArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
private ScrolledComposite createScrolledArea(Composite parent) {
final ScrolledComposite scrolledComp = new ScrolledComposite(parent,
SWT.V_SCROLL | SWT.H_SCROLL);
scrolledComp.setMinHeight(CONTENT_MIN_HEIGHT);
scrolledComp.setMinWidth(CENTER_AREA_WIDTH);
scrolledComp.setExpandVertical(true);
scrolledComp.setExpandHorizontal(true);
return scrolledComp;
}
示例5: createContents
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@Override
protected Control createContents(@Nullable Composite parent) {
// new StringFieldEditor(WurstConstants.WURST_WC3_PATH, "Warcraft installation path: ", comp1);
final Composite rootComposite = new Composite(parent, SWT.NONE);
rootComposite.setLayout(GridLayoutFactory.fillDefaults().create());
final ScrolledComposite sc = new ScrolledComposite(rootComposite, SWT.BORDER | SWT.V_SCROLL);
sc.setLayoutData(GridDataFactory.fillDefaults().grab(true, true).hint(SWT.DEFAULT, 200).create());
sc.setExpandHorizontal(true);
sc.setExpandVertical(true);
final Composite comp = new Composite(sc, SWT.NONE);
sc.setContent(comp);
comp.setLayout(new GridLayout(1, false));
// createReconcilationControls(comp);
// createAutocompleteControls(comp);
createPathControls(comp);
createAdditionalOptions(comp);
loadSettings();
sc.setMinWidth(0);
comp.addListener(SWT.Resize, new Listener() {
@Override
public void handleEvent(@Nullable Event event) {
sc.setMinHeight(comp.computeSize(comp.getSize().x, SWT.DEFAULT).y);
}
});
sc.setMinHeight(comp.computeSize(comp.getSize().x, SWT.DEFAULT).y);
sc.setContent(comp);
return rootComposite;
}
示例6: createPageCustomControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void createPageCustomControl( Composite parent )
{
this.parent = parent;
ScrolledComposite sComposite = new ScrolledComposite( parent,
SWT.H_SCROLL | SWT.V_SCROLL );
sComposite.setLayout( new GridLayout( ) );
sComposite.setMinWidth( 560 );
sComposite.setExpandHorizontal( true );
sComposite.setMinHeight( 400 );
sComposite.setExpandVertical( true );
Composite composite = new Composite( sComposite, SWT.NONE );
GridLayout layout = new GridLayout( 1, false );
layout.horizontalSpacing = 10;
composite.setLayout( layout );
createTabFolderArea( composite );
createCheckboxArea( composite );
Point size = composite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
composite.setSize( size.x, size.y );
sComposite.setContent( composite );
HelpUtil.setSystemHelp( parent, HelpUtil.CONEXT_ID_DATASOURCE_POJO );
}
示例7: 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;
}
示例8: postConstruct
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
@PostConstruct
public void postConstruct(Composite parent) {
GridLayout gl_parent = new GridLayout(1, false);
gl_parent.verticalSpacing = 0;
gl_parent.marginWidth = 0;
gl_parent.marginHeight = 0;
gl_parent.horizontalSpacing = 0;
parent.setLayout(gl_parent);
part = partService
.findPart("org.bbaw.bts.ui.corpus.part.AnnotationsPart");
resizeListener = new Listener() {
@Override
public void handleEvent(
org.eclipse.swt.widgets.Event event) {
Rectangle r = scrollComposite
.getClientArea();
composite.layout();
scrollComposite.setMinSize(composite
.computeSize(r.width, SWT.DEFAULT));
}
};
selectionListener = new Listener() {
@Override
public void handleEvent(
org.eclipse.swt.widgets.Event event) {
RelatedObjectGroup roGroup = (RelatedObjectGroup) event.widget;
selfselection = true;
setSelectedInternal(new Vector<>(Arrays.asList(roGroup)), true);
selfselection = false;
}
};
scrollComposite = new ScrolledComposite(parent,
SWT.V_SCROLL | SWT.H_SCROLL);
scrollComposite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
scrollComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
scrollComposite.setMinWidth(100);
scrollComposite.setMinHeight(400);
composite = new Composite(scrollComposite, SWT.BORDER);
scrollComposite.setExpandHorizontal(true);
scrollComposite.setExpandVertical(true);
scrollComposite.addControlListener(new ControlAdapter() {
@Override
public void controlResized(ControlEvent e) {
Rectangle r = scrollComposite.getClientArea();
scrollComposite.setMinSize(composite.computeSize(r.width,
SWT.DEFAULT));
}
});
composite.setBackground(SWTResourceManager.getColor(SWT.COLOR_WHITE));
composite.setLayout(new GridLayout(1, false));
((GridLayout)composite.getLayout()).marginHeight = 0;
((GridLayout)composite.getLayout()).marginWidth = 0;
((GridLayout)composite.getLayout()).verticalSpacing = 0;
// populate extended annotation filter menu and initialize context node
extendAnnotationsFilterMenu();
scrollComposite.setContent(composite);
constructed = true;
// request input from text editor
eventBroker.post(BTSUIConstants.EVENT_EGY_TEXT_EDITOR_INPUT_REQUESTED+"annotations_part", relatingObjectsEvent);
}
示例9: createDBMetaDataSelectionComposite
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
/**
* Creates the composite, for displaying the list of available db objects
*
* @param parent
*/
private Control createDBMetaDataSelectionComposite( Composite parent )
{
sComposite = new ScrolledComposite( parent, SWT.H_SCROLL
| SWT.V_SCROLL );
sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
sComposite.setExpandHorizontal( true );
sComposite.setExpandVertical( true );
sComposite.setMinHeight( 500 );
sComposite.setMinWidth( 250 );
sComposite.addControlListener( new ControlAdapter( ) {
public void controlResized( ControlEvent e )
{
computeSize( );
}
} );
boolean supportsSchema = false ;
boolean supportsProcedure = false;
if ( continueConnect )
{
supportsSchema = JdbcMetaDataProvider.getInstance( )
.isSupportSchema( );
supportsProcedure = JdbcMetaDataProvider.getInstance( )
.isSupportProcedure( );
}
tablescomposite = new Composite( sComposite, SWT.NONE );
tablescomposite.setLayout( new GridLayout( ) );
GridData data = new GridData( GridData.FILL_BOTH );
data.grabExcessVerticalSpace = true;
tablescomposite.setLayoutData( data );
createDBObjectTree( tablescomposite );
createObjectTreeMenu();
createSchemaFilterComposite( supportsSchema,
supportsProcedure,
tablescomposite );
createSQLOptionGroup( tablescomposite );
addDragSupportToTree( );
// bidi_hcg: pass value of metadataBidiFormatStr
addFetchDbObjectListener( metadataBidiFormatStr );
sComposite.setContent( tablescomposite );
return tablescomposite;
}
示例10: createPageCustomControl
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
public void createPageCustomControl( Composite parent )
{
sComposite = new ScrolledComposite( parent, SWT.H_SCROLL | SWT.V_SCROLL );
sComposite.setLayout( new GridLayout( ) );
sComposite.setLayoutData( new GridData( GridData.FILL_BOTH ) );
sComposite.setMinWidth( 600 );
sComposite.setExpandHorizontal( true );
Composite mainComposite = new Composite( sComposite, SWT.NONE );
mainComposite.setLayout( new GridLayout( 1, false ) );
GridData gridData = new GridData( GridData.FILL_BOTH );
mainComposite.setLayoutData( gridData );
createTopArea( mainComposite );
createFieldsSelectionArea( mainComposite );
createBottomArea( mainComposite );
Point size = mainComposite.computeSize( SWT.DEFAULT, SWT.DEFAULT );
mainComposite.setSize( size.x, size.y );
sComposite.setContent( mainComposite );
setControl( sComposite );
setPageComplete( false );
try
{
initPageInfos( );
}
catch ( final OdaException e )
{
initializeControl( );
Display.getDefault( ).asyncExec( new Runnable( ) {
public void run( )
{
String errorMsg = UIHelper.getUserErrorMessage( "MongoDBDataSetWizardPage.MessageDialog.ErrorMessage.InitPage", e ); //$NON-NLS-1$
ExceptionHandler.showException( sComposite.getShell( ),
Messages.getString( "MongoDBDataSetWizardPage.MessageDialog.title.GeneralError" ), //$NON-NLS-1$
errorMsg,
e );
}
} );
return;
}
initializeControl( );
resetLabelWidth( );
modelChanged = false;
UIHelper.setSystemHelp( getControl( ),
IHelpConstants.CONTEXT_ID_WIZARD_DATASET_MONGODB );
}
示例11: 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;
}
示例12: createDialogArea
import org.eclipse.swt.custom.ScrolledComposite; //导入方法依赖的package包/类
protected Control createDialogArea( Composite parent )
{
// Composite composite = (Composite) super.createDialogArea( parent );
ScrolledComposite sc = new ScrolledComposite( (Composite) super.createDialogArea( parent ),
SWT.H_SCROLL | SWT.V_SCROLL );
sc.setLayout( new FillLayout( ) );
sc.setLayoutData( new GridData( GridData.FILL_BOTH ) );
applyDialogFont( sc );
mainContent = new Composite( sc, 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 );
mainContent.setLayout( layout );
UIUtil.bindHelp( parent, IHelpContextIds.CASCADING_PARAMETER_DIALOG_ID );
GridData data = new GridData( GridData.FILL_BOTH );
maxStrLengthProperty = getMaxStrLength( PROPERTY_LABEL_STRING,
mainContent );
maxStrLengthOption = getMaxStrLength( OPTION_LABEL_STRING, mainContent );
mainContent.setLayoutData( data );
createGeneralPart( mainContent );
createChoicePart( mainContent );
createDynamicParamsPart( mainContent );
createPropertiesPart( mainContent );
createSortingArea( mainContent );
createOptionsPart( mainContent );
createLabel( mainContent, null );
errorMessageLine = new CLabel( mainContent, SWT.NONE );
GridData msgLineGridData = new GridData( GridData.FILL_HORIZONTAL );
msgLineGridData.horizontalSpan = 2;
errorMessageLine.setLayoutData( msgLineGridData );
sc.setContent( mainContent );
sc.setExpandHorizontal( true );
// sc.setExpandVertical( true );
sc.setMinWidth( 500 );
// sc.setMinHeight( 570 );
Point size = mainContent.computeSize( SWT.DEFAULT, SWT.DEFAULT );
mainContent.setSize( size );
return sc;
}