Tabnine Logo
Composite
Code IndexAdd Tabnine to your IDE (free)

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

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

Refine searchRefine arrow

  • Label
  • GridLayout
  • GridData
  • Button
  • Display
  • Shell
  • Text
  • FormAttachment
origin: caoxinyu/RedisClient

shell.setText(RedisClient.i18nFile.getText(I18nFile.ADDFAVORITE));
shell.setLayout(new GridLayout(1, false));
tabFolder.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
Composite composite = new Composite(tabFolder, SWT.NONE);
tbtmString.setControl(composite);
composite.setLayout(new GridLayout(2, false));
Label lblNewKey = new Label(composite, SWT.NONE);
lblNewKey.setText(RedisClient.i18nFile.getText(I18nFile.NAME));
Composite composite_1 = new Composite(shell, SWT.NONE);
composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.BOTTOM, false, true, 1, 1));
composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
Button button = new Button(composite_1, SWT.NONE);
button.addMouseListener(new MouseAdapter() {
  @Override
  public void mouseUp(MouseEvent e) {
button.setText(RedisClient.i18nFile.getText(I18nFile.OK));
Button button_1 = new Button(composite_1, SWT.NONE);
origin: pentaho/pentaho-kettle

if ( perfComposite.isDisposed() ) {
 return;
Label label = new Label( perfComposite, SWT.CENTER );
label.setText( BaseMessages.getString( PKG, "TransLog.Dialog.PerformanceMonitoringNotEnabled.Message" ) );
label.setBackground( perfComposite.getBackground() );
label.setFont( GUIResource.getInstance().getFontMedium() );
fdLabel.left = new FormAttachment( 5, 0 );
fdLabel.right = new FormAttachment( 95, 0 );
fdLabel.top = new FormAttachment( 5, 0 );
label.setLayoutData( fdLabel );
Button button = new Button( perfComposite, SWT.CENTER );
button.setText( BaseMessages.getString( PKG, "TransLog.Dialog.PerformanceMonitoring.Button" ) );
button.setBackground( perfComposite.getBackground() );
button.setFont( GUIResource.getInstance().getFontMedium() );
button.setLayoutData( fdButton );
perfComposite.layout( true, true );
origin: pentaho/pentaho-kettle

private boolean checkPaste() {
 try {
  Clipboard clipboard = new Clipboard( xParent.getDisplay() );
  TextTransfer transfer = TextTransfer.getInstance();
  String text = (String) clipboard.getContents( transfer );
  if ( text != null && text.length() > 0 ) {
   return true;
  } else {
   return false;
  }
 } catch ( Exception e ) {
  return false;
 }
}
origin: pentaho/pentaho-kettle

public void layoutPerfComposite() {
 if ( !perfComposite.isDisposed() ) {
  perfComposite.layout( true, true );
 }
}
origin: pentaho/pentaho-kettle

private void setCompositeEnabled( Composite comp, boolean enabled ) {
 // TODO: move to TableView?
 comp.setEnabled( enabled );
 for ( Control child : comp.getChildren() ) {
  child.setEnabled( enabled );
 }
}
origin: pentaho/pentaho-kettle

 @Override public void widgetSelected( SelectionEvent selectionEvent ) {
  for ( Control control : contentArea.getChildren() ) {
   control.setVisible( false );
  }
  content.setVisible( true );
 }
} );
origin: pentaho/pentaho-kettle

public int open() {
 Shell parent = getParent();
 Display display = parent.getDisplay();
 shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX );
 props.setLook( shell );
 formLayout.marginHeight = 15;
 shell.setLayout( formLayout );
 Image image = display.getSystemImage( SWT.ICON_WARNING );
 Composite wcMessage = new Composite( shell, SWT.NONE );
 props.setLook( wcMessage );
 wcMessage.setLayout( new GridLayout() );
 wcMessage.setLayoutData( fdcMessage );
 Button wbNo = new Button( shell, SWT.PUSH );
 wbNo.setText( BaseMessages.getString( PKG, "System.Button.No" ) );
 wbNo.addSelectionListener( new SelectionAdapter() {
  @Override public void widgetSelected( SelectionEvent selectionEvent ) {
   quit( SWT.NO );
  if ( !display.readAndDispatch() ) {
   display.sleep();
origin: pentaho/pentaho-kettle

public RunConfiguration open() {
 Shell parent = getParent();
 Display display = parent.getDisplay();
 shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MIN | SWT.MAX );
 props.setLook( shell );
 formLayout.marginHeight = 15;
 shell.setLayout( formLayout );
 Composite wSettings = new Composite( shell, SWT.SHADOW_NONE );
 props.setLook( wSettings );
 specLayout.marginWidth = 0;
 specLayout.marginHeight = 0;
 wSettings.setLayout( specLayout );
 wName.setLayoutData( fdName );
 wName.addModifyListener( modifyEvent -> {
 gOptions.setLayoutData( fdOptions );
 wCancel = new Button( shell, SWT.PUSH );
 wSettings.setLayoutData( fdSettings );
  if ( !display.readAndDispatch() ) {
   display.sleep();
origin: pentaho/pentaho-kettle

@Override public String open() {
 Shell parent = getParent();
 Display display = parent.getDisplay();
 wTabFolder.setUnselectedCloseVisible( true );
 wCancel = new Button( shell, SWT.PUSH );
 wCancel.setText( BaseMessages.getString( PKG, "System.Button.Cancel" ) );
 wCancel.setLayoutData( fdCancel );
 wSetupTab.setText( BaseMessages.getString( PKG, "JmsProducerDialog.SetupTab" ) );
 Composite wSetupComp = new Composite( wTabFolder, SWT.NONE );
 props.setLook( wSetupComp );
 FormLayout setupLayout = new FormLayout();
 setupLayout.marginHeight = 15;
 setupLayout.marginWidth = 15;
 wSetupComp.setLayout( setupLayout );
 wSetupComp.setLayoutData( fdSetupComp );
 wSetupComp.layout();
 wSetupTab.setControl( wSetupComp );
  if ( !display.readAndDispatch() ) {
   display.sleep();
origin: pentaho/pentaho-kettle

public void open() {
 final Display display = parent.getDisplay();
 shell = new Shell( parent, SWT.DIALOG_TRIM | SWT.RESIZE | SWT.MAX | SWT.MIN );
 props.setLook( shell );
 shell.setImage( GUIResource.getInstance().getImageSpoon() );
 Button closeButton = new Button( shell, SWT.PUSH );
 closeButton.setText( BaseMessages.getString( getClass(), "System.Button.Close" ) );
 closeButton.addListener( SWT.Selection, new Listener() {
  public void handleEvent( Event e ) {
   shell.dispose();
 Composite mainPanel = new Composite( scrollpane, SWT.NONE );
 scrollpane.setContent( mainPanel );
 scrollpane.setSize( 250, 400 );
 mainPanel.setLayout( new GridLayout( 1, false ) );
  button.setLayoutData( new GridData( GridData.FILL_BOTH, SWT.BEGINNING, false, false ) );
 mainPanel.setSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
 scrollpane.setMinSize( mainPanel.computeSize( SWT.DEFAULT, SWT.DEFAULT ) );
 BaseStepDialog.setSize( shell, 250, 400, false );
  if ( !display.readAndDispatch() ) {
   display.sleep();
origin: caoxinyu/RedisClient

ttlTabItem.setText(RedisClient.i18nFile.getText(I18nFile.TTL));
ttlComposite = new Composite(tabFolder, SWT.NONE);
ttlTabItem.setControl(ttlComposite);
ttlComposite.setLayout(new GridLayout(2, false));
btnExpire = new Button(ttlComposite, SWT.CHECK);
btnExpire.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
btnExpire.setText(RedisClient.i18nFile.getText(I18nFile.EXPIRE));
labelTTL = new Label(ttlComposite, SWT.NONE);
labelTTL.setEnabled(false);
labelTTL.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
labelTTL.setText(RedisClient.i18nFile.getText(I18nFile.TTLS));
ttl = new Text(ttlComposite, SWT.BORDER);
ttl.setEnabled(false);
ttl.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
btnExpire.addSelectionListener(new SelectionAdapter() {
origin: caoxinyu/RedisClient

composite_3 = new Composite(tabFolder, SWT.NONE);
tbtmNewItem.setControl(composite_3);
composite_3.setLayout(new GridLayout(1, false));
tbtmNewItem.setText(server.getName() +" "+RedisClient.i18nFile.getText(I18nFile.SUBSCRIBE));
tbtmNewItem.setImage(subImage);
Composite composite_4 = new Composite(composite_3, SWT.NONE);
composite_4.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
composite_4.setLayout(new GridLayout(3, false));
lblNewLabel = new Label(composite_4, SWT.NONE);
lblNewLabel.setBounds(0, 0, 55, 15);
lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.CHANNEL));
final Text channel = new Text(composite_4, SWT.BORDER);
channel.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
channel.setBounds(0, 0, 88, 23);
btnNewButton = new Button(composite_4, SWT.NONE);
btnNewButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1));
btnNewButton.setBounds(0, 0, 75, 25);
Composite composite_5 = new Composite(composite_3, SWT.NONE);
composite_5.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
composite_5.setLayout(new GridLayout(1, false));
tabFolder_2.setSelectionBackground(Display.getCurrent().getSystemColor(SWT.COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT));
origin: caoxinyu/RedisClient

private void initNamespace(TabFolder tabFolder) {
  TabItem tbtmNamespace = new TabItem(tabFolder, SWT.NONE);
  tbtmNamespace.setText(RedisClient.i18nFile.getText(I18nFile.NAMESPACE));
  
  Composite composite = new Composite(tabFolder, SWT.NONE);
  tbtmNamespace.setControl(composite);
  composite.setLayout(new GridLayout(2, false));
  
  Label lblSeparator = new Label(composite, SWT.NONE);
  lblSeparator.setText(RedisClient.i18nFile.getText(I18nFile.SEPARATOR));
  
  separator = new Text(composite, SWT.BORDER);
  separator.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 1, 1));
  separator.setText(ConfigFile.getSeparator());
  separator.addModifyListener(new ModifyListener() {
    public void modifyText(ModifyEvent e) {
      separator.setData(true);
    }
  });
  separator.setData(false);
}
origin: pentaho/pentaho-kettle

public JobEntryInterface open() {
 Shell parent = getParent();
 display = parent.getDisplay();
 shell = new Shell( parent, props.getJobsDialogStyle() );
 props.setLook( shell );
 JobDialog.setShellImage( shell, jobEntry );
 shell.setImage( GUIResource.getInstance().getImageStart() );
 wName.setLayoutData( fdName );
 BaseStepDialog.setSize( shell, 350, 120, true );
  wRepeat = new Button( shell, SWT.CHECK );
  wRepeat.addListener( SWT.Selection, new Listener() {
   public void handleEvent( Event arg0 ) {
    enableDisableControls();
   wIntervalSeconds );
  Composite time = new Composite( shell, SWT.NONE );
  time.setLayout( new FillLayout() );
  wHour = new Spinner( time, SWT.SINGLE | SWT.LEFT | SWT.BORDER );
  wHour.setMinimum( 0 );
 wOK = new Button( shell, SWT.PUSH );
  if ( !display.readAndDispatch() ) {
   display.sleep();
origin: org.eclipse/org.eclipse.team.ui

protected Composite createComposite(Composite parent) {
  Composite composite = new Composite(parent, SWT.NONE);
  GridLayout layout = new GridLayout();
  composite.setLayout(layout);
  composite.setLayoutData(new GridData(GridData.FILL_BOTH));
  composite.setFont(parent.getFont());
  return composite;
}

origin: caoxinyu/RedisClient

shell.setText(RedisClient.i18nFile.getText(I18nFile.DELETE));
shell.setLayout(new GridLayout(2, false));
Label lblNewLabel_1 = new Label(shell, SWT.NONE);
lblNewLabel_1.setImage(questionImage);
Label lblNewLabel = new Label(shell, SWT.NONE);
lblNewLabel.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1));
if(containerNo == -1)
  lblNewLabel.setText(RedisClient.i18nFile.getText(I18nFile.DELETECONTAINERS));
  btnDeleteSubcontainerUnder = new Button(shell, SWT.CHECK);
  btnDeleteSubcontainerUnder.setSelection(true);
  btnDeleteSubcontainerUnder.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 2, 1));
  btnDeleteSubcontainerUnder.setText(RedisClient.i18nFile.getText(I18nFile.DELETESUBCONTAINER));
}else
  btnDeleteSubcontainerUnder = null;
Composite composite_1 = new Composite(shell, SWT.NONE);
composite_1.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 2, 1));
composite_1.setLayout(new FillLayout(SWT.HORIZONTAL));
Button button = new Button(composite_1, SWT.NONE);
origin: caoxinyu/RedisClient

shell.setText(RedisClient.i18nFile.getText(I18nFile.DONATION));
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
  public void widgetSelected(SelectionEvent arg0) {
btnOk.setText(RedisClient.i18nFile.getText(I18nFile.OK));
origin: pentaho/pentaho-kettle

Composite composite = new Composite( parent, SWT.NONE );
props.setLook( composite );
compLayout.marginHeight = Const.FORM_MARGIN;
compLayout.marginWidth = Const.FORM_MARGIN;
composite.setLayout( compLayout );
wlServername = new Label( composite, SWT.RIGHT );
wlServername.setText( BaseMessages.getString( PKG, "CreateDatabaseWizardPageInformix.Servername.Label" ) );
props.setLook( wlServername );
fdlServername = new FormData();
fdlServername.top = new FormAttachment( 0, 0 );
fdlServername.left = new FormAttachment( 0, 0 );
fdlServername.right = new FormAttachment( middle, 0 );
wlServername.setLayoutData( fdlServername );
wServername = new Text( composite, SWT.SINGLE | SWT.BORDER );
props.setLook( wServername );
fdServername = new FormData();
fdServername.left = new FormAttachment( middle, margin );
fdServername.right = new FormAttachment( 100, 0 );
wServername.setLayoutData( fdServername );
wServername.addModifyListener( new ModifyListener() {
 public void modifyText( ModifyEvent arg0 ) {
  setPageComplete( false );
origin: pentaho/pentaho-kettle

public int open() {
 display = parent.getDisplay();
 shell =
  new Shell( parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL | SWT.SHEET | SWT.RESIZE | SWT.MAX | SWT.MIN );
 props.setLook( shell );
 shell.setImage( GUIResource.getInstance().getImageTransGraph() );
 middle = props.getMiddlePct();
 wComposite = new Composite( shell, SWT.BORDER );
 props.setLook( wComposite );
 fdComposite.top = new FormAttachment( 0, margin );
 fdComposite.bottom = new FormAttachment( wOK, -margin * 2 );
 wComposite.setLayoutData( fdComposite );
 compositeLayout.marginWidth = Const.FORM_MARGIN;
 compositeLayout.marginHeight = Const.FORM_MARGIN;
 wComposite.setLayout( compositeLayout );
 while ( !shell.isDisposed() ) {
  if ( !display.readAndDispatch() ) {
   display.sleep();
origin: caoxinyu/RedisClient

protected Composite initDataTabItem(){
  dataTabItem = new TabItem(tabFolder, SWT.NONE);
  dataTabItem.setText(RedisClient.i18nFile.getText(dataTitle));
  Composite dataComposite = new Composite(tabFolder, SWT.NONE);
  dataTabItem.setControl(dataComposite);
  dataComposite.setLayout(new GridLayout(4, true));
  label = new Label(dataComposite, SWT.NONE);
  label.setText(RedisClient.i18nFile.getText(I18nFile.SERVER));
  Label label_1 = new Label(dataComposite, SWT.NONE);
  label_1.setText(server);
  label_2 = new Label(dataComposite, SWT.NONE);
  label_2.setText(RedisClient.i18nFile.getText(I18nFile.DATABASE));
  Label label_3 = new Label(dataComposite, SWT.NONE);
  label_3.setText(String.valueOf(db));
  lblKey = new Label(dataComposite, SWT.NONE);
  lblKey.setText(RedisClient.i18nFile.getText(I18nFile.KEY));
  
  inputKey = new Text(dataComposite, SWT.BORDER);
  inputKey.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1));
  inputKey.setText(key);
  inputKey.selectAll();
  inputKey.setFocus();
  
  return dataComposite;
}

org.eclipse.swt.widgetsComposite

Javadoc

Instances of this class are controls which are capable of containing other controls. Styles: NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, NO_REDRAW_RESIZE, NO_RADIO_GROUP, EMBEDDED, DOUBLE_BUFFERED Events: (none)

Note: The NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS, and NO_REDRAW_RESIZE styles are intended for use with Canvas. They can be used with Composite if you are drawing your own, but their behavior is undefined if they are used with subclasses of Composite other than Canvas.

Note: The CENTER style, although undefined for composites, has the same value as EMBEDDED which is used to embed widgets from other widget toolkits into SWT. On some operating systems (GTK), this may cause the children of this composite to be obscured.

This class may be subclassed by custom control implementors who are building controls that are constructed from aggregates of other controls.

Most used methods

  • setLayout
    Sets the layout which is associated with the receiver to be the argument which may be null.
  • <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
  • getParent,
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Start an intent from android
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • Collections (java.util)
    This class consists exclusively of static methods that operate on or return collections. It contains
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • JarFile (java.util.jar)
    JarFile is used to read jar entries and their associated data from jar files.
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now