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

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

Best Java code snippets using org.eclipse.swt.widgets.Composite.getShell (Showing top 20 results out of 693)

  • 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: pentaho/pentaho-kettle

 @Override
 public void widgetSelected( SelectionEvent arg0 ) {
  openHelpDialog( parent.getShell(), plugin );
 }
} );
origin: pentaho/pentaho-kettle

 @Override
 public void widgetSelected( SelectionEvent arg0 ) {
  openHelpDialog( parent.getShell(), title, url, header );
 }
} );
origin: pentaho/pentaho-kettle

 @Override
 public void widgetSelected( SelectionEvent arg0 ) {
  String variableName = VariableButtonListenerFactory.getVariableName( composite.getShell(), space );
  if ( variableName != null ) {
   setVariableOnCheckBox( "${" + variableName + "}" );
  }
 }
} );
origin: pentaho/pentaho-kettle

private Shell getShell() {
 Object obj = document.getRootElement().getManagedObject();
 Shell parent;
 if ( obj instanceof Shell ) {
  parent = (Shell) obj;
 } else {
  parent = ( (Composite) obj ).getShell();
 }
 if ( parent == null ) {
  throw new IllegalStateException( "Could not get Shell reference from Xul Dialog Tree." );
 }
 return parent;
}
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    WatchDialog dialog = new WatchDialog(shell.getParent()
        .getShell(), image, text_value.getText());
    dialog.open();
  }
});
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    WatchDialog dialog = new WatchDialog(shell.getParent()
        .getShell(), image, currentData.getValue());
    dialog.open();
  }
});
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    WatchDialog dialog = new WatchDialog(shell.getParent()
        .getShell(), image, currentData.getValue());
    dialog.open();
  }
});
origin: pentaho/pentaho-kettle

 public void widgetSelected( SelectionEvent e ) {
  // Before focus is lost, we get the position of where the selected variable needs to be inserted.
  int position = 0;
  if ( getCaretPositionInterface != null ) {
   position = getCaretPositionInterface.getCaretPosition();
  }
  String variableName = getVariableName( composite.getShell(), space );
  if ( variableName != null ) {
   String var = "${" + variableName + "}";
   if ( insertTextInterface == null ) {
    destination.insert( var );
    e.doit = false;
   } else {
    insertTextInterface.insertText( var, position );
   }
  }
 }
};
origin: pentaho/pentaho-kettle

protected void editDatabase() {
 DatabaseMeta editMeta;
 if ( databaseMeta == null ) {
  editMeta = new DatabaseMeta();
 } else {
  editMeta = (DatabaseMeta) databaseMeta.clone();
 }
 DatabaseDialog databaseDialog = new DatabaseDialog( composite.getShell(), editMeta );
 if ( databaseDialog.open() != null ) {
  databaseMeta = editMeta;
  setCompositeData( rule );
 }
}
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    TableItem[] items = table.getSelection();
    WatchDialog dialog = new WatchDialog(shell.getParent()
        .getShell(), image, items[0].getText(1));
    dialog.open();
  }
});
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    TableItem[] items = table.getSelection();
    WatchDialog dialog = new WatchDialog(shell.getParent()
        .getShell(), image, items[0].getText());
    dialog.open();
  }
});
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    InputDialog inputDialog = new InputDialog(shell.getParent().getShell(),
        RedisClient.i18nFile.getText(I18nFile.INPUTVALUES),
        RedisClient.i18nFile.getText(I18nFile.LISTINPUTFORMAT), "", null);
    if (inputDialog.open() == InputDialog.OK) {
      String values = inputDialog.getValue();
      String[] setValues = values.split(";");
      long size = service.addValues(id, db, key, setValues);
      if(size == 0)
        MessageDialog.openInformation(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), RedisClient.i18nFile.getText(I18nFile.ADDSETVALUES));
      refresh();
    }
  }
});
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    InputDialog dialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.INSERTHEAD), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), "", null);
    if(dialog.open() == InputDialog.OK){
      String value = dialog.getValue();
      service.addHead(id, db, key, value);
      refresh();
    }
  }
});
origin: pentaho/pentaho-kettle

private void addToolBar() {
 try {
  XulLoader loader = new KettleXulLoader();
  loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
  ResourceBundle bundle = GlobalMessages.getBundle( "org/pentaho/di/ui/spoon/messages/messages" );
  XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
  xulDomContainer.addEventHandler( this );
  toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
  ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
  spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
  swtToolBar.layout( true, true );
 } catch ( Throwable t ) {
  log.logError( toString(), Const.getStackTracker( t ) );
  new ErrorDialog( transGridComposite.getShell(),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
   new Exception( t ) );
 }
}
origin: pentaho/pentaho-kettle

public void clearAll( boolean ask ) {
 int id = SWT.YES;
 if ( ask ) {
  MessageBox mb = new MessageBox( parent.getShell(), SWT.YES | SWT.NO | SWT.ICON_QUESTION );
  mb.setMessage( BaseMessages.getString( PKG, "TableView.MessageBox.ClearTable.message" ) );
  mb.setText( BaseMessages.getString( PKG, "TableView.MessageBox.ClearTable.title" ) );
  id = mb.open();
 }
 if ( id == SWT.YES ) {
  table.removeAll();
  new TableItem( table, SWT.NONE );
  if ( !readonly ) {
   parent.getDisplay().asyncExec( new Runnable() {
    @Override
    public void run() {
     edit( 0, 1 );
    }
   } );
  }
  this.setModified(); // timh
 }
}
origin: pentaho/pentaho-kettle

private void addToolBar() {
 try {
  XulLoader loader = new KettleXulLoader();
  loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
  ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
  XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_LOG_TOOLBAR, bundle );
  xulDomContainer.addEventHandler( this );
  toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
  ToolBar swtToolbar = (ToolBar) toolbar.getManagedObject();
  spoon.props.setLook( swtToolbar, Props.WIDGET_STYLE_TOOLBAR );
  swtToolbar.layout( true, true );
 } catch ( Throwable t ) {
  log.logError( Const.getStackTracker( t ) );
  new ErrorDialog( jobLogComposite.getShell(),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR ),
   new Exception( t ) );
 }
}
origin: pentaho/pentaho-kettle

private void addToolBar() {
 try {
  XulLoader loader = new KettleXulLoader();
  loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
  ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
  XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_LOG_TOOLBAR, bundle );
  xulDomContainer.addEventHandler( this );
  toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
  ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
  spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
  swtToolBar.layout( true, true );
 } catch ( Throwable t ) {
  log.logError( Const.getStackTracker( t ) );
  new ErrorDialog( transLogComposite.getShell(),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_LOG_TOOLBAR ),
   new Exception( t ) );
 }
}
origin: pentaho/pentaho-kettle

private void addToolBar() {
 try {
  XulLoader loader = new KettleXulLoader();
  loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
  ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
  XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
  xulDomContainer.addEventHandler( this );
  toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
  refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "refresh-history" );
  fetchNextBatchButton =
   (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-next-batch-history" );
  fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-all-history" );
  ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
  spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
  swtToolBar.layout( true, true );
 } catch ( Throwable t ) {
  log.logError( Const.getStackTracker( t ) );
  new ErrorDialog( jobHistoryComposite.getShell(),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
   new Exception( t ) );
 }
}
origin: pentaho/pentaho-kettle

private void addToolBar() {
 try {
  KettleXulLoader loader = new KettleXulLoader();
  loader.setIconsSize( 16, 16 );
  loader.setSettingsManager( XulSpoonSettingsManager.getInstance() );
  ResourceBundle bundle = new XulSpoonResourceBundle( Spoon.class );
  XulDomContainer xulDomContainer = loader.loadXul( XUL_FILE_TRANS_GRID_TOOLBAR, bundle );
  xulDomContainer.addEventHandler( this );
  toolbar = (XulToolbar) xulDomContainer.getDocumentRoot().getElementById( "nav-toolbar" );
  refreshButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "refresh-history" );
  fetchNextBatchButton =
   (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-next-batch-history" );
  fetchAllButton = (XulToolbarbutton) xulDomContainer.getDocumentRoot().getElementById( "fetch-all-history" );
  ToolBar swtToolBar = (ToolBar) toolbar.getManagedObject();
  spoon.props.setLook( swtToolBar, Props.WIDGET_STYLE_TOOLBAR );
  swtToolBar.layout( true, true );
 } catch ( Throwable t ) {
  log.logError( Const.getStackTracker( t ) );
  new ErrorDialog( transHistoryComposite.getShell(),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Title" ),
   BaseMessages.getString( PKG, "Spoon.Exception.ErrorReadingXULFile.Message", XUL_FILE_TRANS_GRID_TOOLBAR ),
   new Exception( t ) );
 }
}
origin: caoxinyu/RedisClient

  @Override
  public void widgetSelected(SelectionEvent e) {
    InputDialog dialog = new InputDialog(shell.getParent().getShell(), RedisClient.i18nFile.getText(I18nFile.APPENDTAIL), RedisClient.i18nFile.getText(I18nFile.INPUTVALUES), "", null);
    if(dialog.open() == InputDialog.OK){
      String value = dialog.getValue();
      service.addTail(id, db, key, value);
      pageListener.setCount();
      table.clear(table.getItemCount()-1);
      table.setSelection(table.getItemCount()-1);
      table.setSelection(-1);
      currentData.setItem(null);
      status = Status.Normal;
      statusChanged();
    }
  }
});
org.eclipse.swt.widgetsCompositegetShell

Popular methods of Composite

  • 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
  • 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

  • Running tasks concurrently on multiple threads
  • putExtra (Intent)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • BigInteger (java.math)
    Immutable arbitrary-precision integers. All operations behave as if BigIntegers were represented in
  • MessageFormat (java.text)
    MessageFormat provides a means to produce concatenated messages in language-neutral way. Use this to
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Properties (java.util)
    The Properties class represents a persistent set of properties. The Properties can be saved to a st
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
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