Tabnine Logo
Composite.getShell
Code IndexAdd Tabnine 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)

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

  • Creating JSON documents from java classes using gson
  • getResourceAsStream (ClassLoader)
  • requestLocationUpdates (LocationManager)
  • getSupportFragmentManager (FragmentActivity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • JButton (javax.swing)
  • Top PhpStorm plugins
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