Codota Logo
Composite.setLayout
Code IndexAdd Codota to your IDE (free)

How to use
setLayout
method
in
org.eclipse.swt.widgets.Composite

Best Java code snippets using org.eclipse.swt.widgets.Composite.setLayout (Showing top 20 results out of 2,034)

Refine searchRefine arrow

  • Composite.<init>
  • Label.<init>
  • Composite.setLayoutData
  • GridLayout.<init>
  • GridData.<init>
  • Label.setText
  • Button.<init>
  • Label.setLayoutData
  • Common ways to obtain Composite
private void myMethod () {
Composite c =
  • Codota IconControl control;control.getParent()
  • Codota IconStatusDialog zuper;(Composite) zuper.createDialogArea(parent)
  • Codota IconTitleAreaDialog zuper;(Composite) zuper.createDialogArea(parent)
  • Smart code suggestions by Codota
}
origin: caoxinyu/RedisClient

protected void initContents() {
  Composite composite_1 = new Composite(shell, SWT.NONE);
  composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
  composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false,
      false, 1, 1));
  btnOk = new Button(composite_1, SWT.NONE);
  btnOk.addSelectionListener(okSelection);
  btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK));
  Button btnCancel = new Button(composite_1, SWT.NONE);
  btnCancel.addSelectionListener(cancelSelection);
  btnCancel.setText(RedisClient.i18nFile.getText(I18nFile.CANCEL));
}
origin: pentaho/pentaho-kettle

@Override
protected Control createMessageArea( Composite composite ) {
 GridLayout gridLayout = (GridLayout) composite.getLayout();
 gridLayout.numColumns = 1;
 composite.setLayout( gridLayout );
 if ( this.message != null ) {
  this.messageLabel = new Label( composite, this.getMessageLabelStyle() );
  this.messageLabel.setText( this.message );
 }
 if ( this.details != null ) {
  this.detailsText = new Text( composite, SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL );
  this.detailsText.pack();
  this.detailsText.setText( this.details );
  GridData gridData = new GridData( );
  gridData.widthHint = 1024;
  gridData.heightHint = 300;
  this.detailsText.setLayoutData( gridData );
  this.detailsText.setSelection( this.details.length() );
 }
 return composite;
}
origin: pentaho/pentaho-kettle

public Composite getComposite( Composite parent, ImportRuleInterface importRule ) {
 composite = new Composite( parent, SWT.NONE );
 PropsUI.getInstance().setLook( composite );
 composite.setLayout( new FillLayout() );
 return composite;
}
origin: pentaho/pentaho-kettle

private void buildProperiesTab() {
 CTabItem wPropertiesTab = new CTabItem( wTabFolder, SWT.NONE );
 wPropertiesTab.setText( BaseMessages.getString( PKG, "JmsProducerDialog.Properties.Tab" ) );
 Composite wPropertiesComp = new Composite( wTabFolder, SWT.NONE );
 props.setLook( wPropertiesComp );
 FormLayout fieldsLayout = new FormLayout();
 fieldsLayout.marginHeight = 15;
 fieldsLayout.marginWidth = 15;
 wPropertiesComp.setLayout( fieldsLayout );
 FormData propertiesFormData = new FormData();
 propertiesFormData.left = new FormAttachment( 0, 0 );
 propertiesFormData.top = new FormAttachment( wPropertiesComp, 0 );
 propertiesFormData.right = new FormAttachment( 100, 0 );
 propertiesFormData.bottom = new FormAttachment( 100, 0 );
 wPropertiesComp.setLayoutData( propertiesFormData );
 buildPropertiesTable( wPropertiesComp );
 wPropertiesComp.layout();
 wPropertiesTab.setControl( wPropertiesComp );
}
origin: caoxinyu/RedisClient

public CTabItem init(){
  tbtmSubItem = new CTabItem(tabFolder, SWT.NONE);
  tbtmSubItem.setShowClose(true);
  Composite composite = new Composite(tabFolder, SWT.NONE);
  tbtmSubItem.setControl(composite);
  composite.setLayout(new GridLayout(1, false));
  tbtmSubItem.setText(subChannel + " " + RedisClient.i18nFile.getText(I18nFile.CHANNEL));
  EditListener listener = new EditListener(table, false, true);
  table.addListener(SWT.MouseDown, listener);
  table.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
origin: caoxinyu/RedisClient

@Override
public void execute() {
  super.execute();
  
  if(result.getType() != ResultType.Error){
    tbtmNewItem = new CTabItem(console.getTabFolder_2(), SWT.NONE);
    tbtmNewItem.setText(RedisClient.i18nFile.getText(I18nFile.DATA)+(console.getTabFolder_2().indexOf(tbtmNewItem)));
    Composite composite = new Composite(console.getTabFolder_2(), SWT.NONE);
    tbtmNewItem.setControl(composite);
    composite.setLayout(new GridLayout(1, false));
    
    initData(composite);
        
    console.getTabFolder_2().setSelection(tbtmNewItem);
  }
}
protected abstract void initData(Composite composite) ;
origin: pentaho/pentaho-kettle

private void addGrid() {
 Composite composite = new Composite( sashform, SWT.NONE );
 props.setLook( composite );
 formLayout.marginWidth = Const.FORM_MARGIN;
 formLayout.marginHeight = Const.FORM_MARGIN;
 composite.setLayout( formLayout );
 wReload = new Button( composite, SWT.NONE );
 wReload.setText( "  &Reload  " );
 wLocale = new Button( composite, SWT.NONE );
 wLocale.setText( "  &Select locale  " );
 wClose = new Button( composite, SWT.NONE );
 wClose.setText( "  &Close " );
 wVerify = new Button( composite, SWT.CHECK );
origin: caoxinyu/RedisClient

shell.setLayout(new GridLayout(1, false));
Composite composite = new Composite(shell, SWT.NONE);
composite.setLayout(new GridLayout(1, false));
composite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
Label lblNewLabel = new Label(composite, SWT.WRAP);
lblNewLabel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.DONATIONMESSAGE));
Label label = new Label(composite, SWT.NONE);
label.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 1, 1));
label.setAlignment(SWT.CENTER);
label.setImage(code);
Composite composite_1 = new Composite(shell, SWT.NONE);
composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, true, false, 1, 1));
composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
Button btnOk = new Button(composite_1, SWT.NONE);
btnOk.addSelectionListener(new SelectionAdapter() {
  @Override
origin: pentaho/pentaho-kettle

private void buildSetupTab() {
 wSetupTab = new CTabItem( wTabFolder, SWT.NONE );
 wSetupTab.setText( BaseMessages.getString( PKG, "BaseStreamingDialog.SetupTab" ) );
 wSetupComp = new Composite( wTabFolder, SWT.NONE );
 props.setLook( wSetupComp );
 FormLayout setupLayout = new FormLayout();
 setupLayout.marginHeight = 15;
 setupLayout.marginWidth = 15;
 wSetupComp.setLayout( setupLayout );
 buildSetup( wSetupComp );
 FormData fdSetupComp = new FormData();
 fdSetupComp.left = new FormAttachment( 0, 0 );
 fdSetupComp.top = new FormAttachment( 0, 0 );
 fdSetupComp.right = new FormAttachment( 100, 0 );
 fdSetupComp.bottom = new FormAttachment( 100, 0 );
 wSetupComp.setLayoutData( fdSetupComp );
 wSetupComp.layout();
 wSetupTab.setControl( wSetupComp );
}
origin: pentaho/pentaho-kettle

private void addList() {
 Composite composite = new Composite( sashform, SWT.NONE );
 props.setLook( composite );
 FillLayout fillLayout = new FillLayout();
 fillLayout.marginWidth = Const.FORM_MARGIN;
 fillLayout.marginHeight = Const.FORM_MARGIN;
 composite.setLayout( fillLayout );
 // Make a listbox
 wList = new List( composite, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL | SWT.H_SCROLL );
 // Add a selection listener.
 wList.addSelectionListener( new SelectionAdapter() {
  public void widgetSelected( SelectionEvent arg0 ) {
   refreshGrid();
  }
 } );
}
origin: caoxinyu/RedisClient

tbtmNewItem.setText("New Item");
tbtmNewItem.setShowClose(true);
Composite composite_2 = new Composite(tabFolder_1, SWT.NONE);
tbtmNewItem.setControl(composite_2);
composite_2.setLayout(new GridLayout(1, false));
tbtmNewItem.setText(key);
origin: pentaho/pentaho-kettle

public Composite getComposite( Composite parent, ImportRuleInterface importRule ) {
 PropsUI props = PropsUI.getInstance();
 composite = new Composite( parent, SWT.NONE );
 props.setLook( composite );
 composite.setLayout( new FillLayout() );
 Label label = new Label( composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT );
 props.setLook( label );
 label.setText( "Minimum length: " );
 text = new Text( composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT );
 props.setLook( text );
 return composite;
}
origin: pentaho/pentaho-kettle

private void buildFieldsTab() {
 CTabItem wFieldsTab = new CTabItem( wTabFolder, SWT.NONE, 3 );
 wFieldsTab.setText( BaseMessages.getString( PKG, "MQTTConsumerDialog.FieldsTab" ) );
 Composite wFieldsComp = new Composite( wTabFolder, SWT.NONE );
 props.setLook( wFieldsComp );
 FormLayout fieldsLayout = new FormLayout();
 fieldsLayout.marginHeight = 15;
 fieldsLayout.marginWidth = 15;
 wFieldsComp.setLayout( fieldsLayout );
 FormData fieldsFormData = new FormData();
 fieldsFormData.left = new FormAttachment( 0, 0 );
 fieldsFormData.top = new FormAttachment( wFieldsComp, 0 );
 fieldsFormData.right = new FormAttachment( 100, 0 );
 fieldsFormData.bottom = new FormAttachment( 100, 0 );
 wFieldsComp.setLayoutData( fieldsFormData );
 buildFieldTable( wFieldsComp, wFieldsComp );
 wFieldsComp.layout();
 wFieldsTab.setControl( wFieldsComp );
}
origin: pentaho/pentaho-kettle

private void addTree() {
 mainComposite = new Composite( sashform, SWT.BORDER );
 mainComposite.setLayout( new FormLayout() );
 props.setLook( mainComposite, Props.WIDGET_STYLE_TOOLBAR );
 tabFolder = new CTabFolder( mainComposite, SWT.HORIZONTAL );
 props.setLook( tabFolder, Props.WIDGET_STYLE_TAB );
 FormData fdTab = new FormData();
 fdTab.left = new FormAttachment( 0 );
 fdTab.top = new FormAttachment( mainComposite, 0 );
 fdTab.right = new FormAttachment( 100 );
 fdTab.bottom = new FormAttachment( 100 );
 tabFolder.setLayoutData( fdTab );
 addViewTab( tabFolder );
 addDesignTab( tabFolder );
 tabFolder.setSelection( view );
 coreStepToolTipMap = new Hashtable<>();
 coreJobToolTipMap = new Hashtable<>();
 addDefaultKeyListeners( tabFolder );
 addDefaultKeyListeners( mainComposite );
}
origin: pentaho/pentaho-kettle

public Composite getComposite( Composite parent, ImportRuleInterface importRule ) {
 PropsUI props = PropsUI.getInstance();
 composite = new Composite( parent, SWT.NONE );
 props.setLook( composite );
 composite.setLayout( new FillLayout() );
 Label label = new Label( composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT );
 props.setLook( label );
 label.setText( "Minimum length: " );
 text = new Text( composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT );
 props.setLook( text );
 return composite;
}
origin: pentaho/pentaho-kettle

public void buildFieldsTab() {
 checkArgument( wTabFolder.getItemCount() > 0 );
 CTabItem wFieldsTab = new CTabItem( wTabFolder, SWT.NONE, wTabFolder.getItemCount() - 1 );
 wFieldsTab.setText( BaseMessages.getString( PKG, "JmsConsumerDialog.FieldsTab" ) );
 Composite wFieldsComp = new Composite( wTabFolder, SWT.NONE );
 props.setLook( wFieldsComp );
 FormLayout fieldsLayout = new FormLayout();
 fieldsLayout.marginHeight = 15;
 fieldsLayout.marginWidth = 15;
 wFieldsComp.setLayout( fieldsLayout );
 FormData fieldsFormData = new FormData();
 fieldsFormData.left = new FormAttachment( 0, 0 );
 fieldsFormData.top = new FormAttachment( wFieldsComp, 0 );
 fieldsFormData.right = new FormAttachment( 100, 0 );
 fieldsFormData.bottom = new FormAttachment( 100, 0 );
 wFieldsComp.setLayoutData( fieldsFormData );
 buildFieldTable( wFieldsComp, wFieldsComp );
 wFieldsComp.layout();
 wFieldsTab.setControl( wFieldsComp );
}
origin: pentaho/pentaho-kettle

public void createControl( Composite parent ) {
 // create the composite to hold the widgets
 Composite composite = new Composite( parent, SWT.NONE );
 props.setLook( composite );
 FormLayout compLayout = new FormLayout();
 compLayout.marginHeight = Const.FORM_MARGIN;
 compLayout.marginWidth = Const.FORM_MARGIN;
 composite.setLayout( compLayout );
 MouseAdapter lsMouse = new MouseAdapter() {
  public void mouseDown( MouseEvent e ) {
   int s = getSize();
   // System.out.println("size = "+s);
   setPageComplete( s > 0 );
  }
 };
 wTable = new TableDraw( composite, props, this, fields );
 wTable.setRows( rows );
 props.setLook( wTable );
 wTable.setFields( fields );
 fdTable = new FormData();
 fdTable.left = new FormAttachment( 0, 0 );
 fdTable.right = new FormAttachment( 100, 0 );
 fdTable.top = new FormAttachment( 0, 0 );
 fdTable.bottom = new FormAttachment( 100, 0 );
 wTable.setLayoutData( fdTable );
 wTable.addMouseListener( lsMouse );
 // set the composite as the control for this page
 setControl( composite );
}
origin: pentaho/pentaho-kettle

public Composite getComposite( Composite parent, ImportRuleInterface importRule ) {
 rule = (DatabaseConfigurationImportRule) importRule;
 databaseMeta = rule.getDatabaseMeta();
 PropsUI props = PropsUI.getInstance();
 composite = new Composite( parent, SWT.NONE );
 props.setLook( composite );
 composite.setLayout( new FillLayout() );
 label = new Label( composite, SWT.SINGLE | SWT.BORDER | SWT.LEFT );
 props.setLook( label );
 label.setText( "Database configuration : (not configured)" );
 button = new Button( composite, SWT.PUSH );
 button.setText( "Edit..." );
 button.addSelectionListener( new SelectionAdapter() {
  public void widgetSelected( SelectionEvent event ) {
   editDatabase();
  }
 } );
 return composite;
}
origin: pentaho/pentaho-kettle

/**
 */
private void addGeneralTab() {
 wGeneralTab = new CTabItem( wTabFolder, SWT.NONE );
 wGeneralTab.setText( BaseMessages.getString( PKG, "ElasticSearchBulkDialog.General.Tab" ) );
 wGeneralComp = new Composite( wTabFolder, SWT.NONE );
 props.setLook( wGeneralComp );
 FormLayout generalLayout = new FormLayout();
 generalLayout.marginWidth = 3;
 generalLayout.marginHeight = 3;
 wGeneralComp.setLayout( generalLayout );
 // Index GROUP
 fillIndexGroup( wGeneralComp );
 // Options GROUP
 fillOptionsGroup( wGeneralComp );
 fdGeneralComp = new FormData();
 fdGeneralComp.left = new FormAttachment( 0, 0 );
 fdGeneralComp.top = new FormAttachment( wStepname, Const.MARGIN );
 fdGeneralComp.right = new FormAttachment( 100, 0 );
 fdGeneralComp.bottom = new FormAttachment( 100, 0 );
 wGeneralComp.setLayoutData( fdGeneralComp );
 wGeneralComp.layout();
 wGeneralTab.setControl( wGeneralComp );
}
origin: pentaho/pentaho-kettle

public void createControl( Composite parent ) {
 // create the composite to hold the widgets
 Composite composite = new Composite( parent, SWT.NONE );
 props.setLook( composite );
 FormLayout compLayout = new FormLayout();
 compLayout.marginHeight = Const.FORM_MARGIN;
 compLayout.marginWidth = Const.FORM_MARGIN;
 composite.setLayout( compLayout );
 MouseAdapter lsMouse = new MouseAdapter() {
  public void mouseDown( MouseEvent e ) {
   int s = getSize();
   // System.out.println("size = "+s);
   setPageComplete( s > 0 );
  }
 };
 wTable = new TableDraw( composite, props, this, fields );
 wTable.setRows( rows );
 props.setLook( wTable );
 wTable.setFields( fields );
 fdTable = new FormData();
 fdTable.left = new FormAttachment( 0, 0 );
 fdTable.right = new FormAttachment( 100, 0 );
 fdTable.top = new FormAttachment( 0, 0 );
 fdTable.bottom = new FormAttachment( 100, 0 );
 wTable.setLayoutData( fdTable );
 wTable.addMouseListener( lsMouse );
 // set the composite as the control for this page
 setControl( composite );
}
org.eclipse.swt.widgetsCompositesetLayout

Javadoc

Sets the layout which is associated with the receiver to be the argument which may be null.

Popular methods of Composite

  • <init>
    Constructs a new instance of this class given its parent and a style value describing its behavior a
  • setLayoutData
  • layout
    Forces a lay out (that is, sets the size and location) of all widgets that are in the parent hierarc
  • getDisplay
  • getChildren
    Returns a (possibly empty) array containing the receiver's children. Children are returned in the or
  • getShell
  • getFont
  • getLayout
    Returns layout which is associated with the receiver, or null if one has not been set.
  • setFont
  • getParent
  • computeSize
  • dispose
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Finding current android device location
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • setScale (BigDecimal)
    Returns a BigDecimal whose scale is the specified value, and whose value is numerically equal to thi
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • Format (java.text)
    The base class for all formats. This is an abstract base class which specifies the protocol for clas
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
  • Filter (javax.servlet)
    A filter is an object that performs filtering tasks on either the request to a resource (a servlet o
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now