Package org.eclipse.swt.events

Examples of org.eclipse.swt.events.ShellAdapter


      thisLayout.marginWidth = 0;
      thisLayout.marginHeight = 0;
      thisLayout.verticalSpacing = 0;
      this.setLayout(thisLayout);
      this.setCursor(SWTResourceManager.getCursor(SWT.CURSOR_ARROW));
      getShell().addShellListener(new ShellAdapter() {
        public void shellClosed(ShellEvent evt) {
          dispose();
        }
      });
View Full Code Here


      tuned = false;
     
      Shell parent = getParent();
      dialogShell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
     
      dialogShell.addShellListener( new ShellAdapter()
          {
            public void shellClosed(ShellEvent evt)
            {
              close();
            }
          });

      {
        //Register as a resource user - SWTResourceManager will
        //handle the obtaining and disposing of resources
        SWTResourceManager.registerResourceUser(dialogShell);
      }
     
      GridLayout dialogShellLayout = new GridLayout();
      dialogShell.setLayout(dialogShellLayout);
      dialogShellLayout.numColumns = 3;
      dialogShellLayout.marginHeight = 0;
      dialogShellLayout.marginWidth = 0;
      dialogShellLayout.verticalSpacing = 0;
      dialogShellLayout.horizontalSpacing = 0;
      dialogShell.layout();
      dialogShell.pack();
      dialogShell.setSize(952, 656);
      dialogShell.addShellListener( new ShellAdapter()
          {
            public void shellClosed(ShellEvent evt)
            {
              grabbing = false;
              ((ImageBasedGPS) Simulation.getCurrent().getGps()).disposeImage();
View Full Code Here

      tuned = false;
     
      Shell parent = getParent();
      dialogShell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
     
      dialogShell.addShellListener( new ShellAdapter()
          {
            public void shellClosed(ShellEvent evt)
            {
              close();
            }
          });

      {
        //Register as a resource user - SWTResourceManager will
        //handle the obtaining and disposing of resources
        SWTResourceManager.registerResourceUser(dialogShell);
      }
     
      GridLayout dialogShellLayout = new GridLayout();
      dialogShell.setLayout(dialogShellLayout);
      dialogShellLayout.numColumns = 3;
      dialogShellLayout.marginHeight = 0;
      dialogShellLayout.marginWidth = 0;
      dialogShellLayout.verticalSpacing = 0;
      dialogShellLayout.horizontalSpacing = 0;
      dialogShell.layout();
      dialogShell.pack();
      dialogShell.setSize(952, 656);
      dialogShell.addShellListener( new ShellAdapter()
          {
            public void shellClosed(ShellEvent evt)
            {
              grabbing = false;
              ((ImageBasedGPS) Simulation.getCurrent().getGps()).disposeImage();
View Full Code Here

  public BrowserShellLinux() {
    m_shell = new Shell();
    m_shell.setLayout(new FillLayout());
    m_shell.setLocation(-10000, -10000);
    // prevent close, hide instead
    m_shell.addShellListener(new ShellAdapter() {
      @Override
      public void shellClosed(ShellEvent e) {
        e.doit = false;
        Shell shell = (Shell) e.widget;
        shell.setVisible(false);
View Full Code Here

  /**
   * Hooks a listener to track the activation and deactivation of the window's
   * shell. Notifies the active part and editor of the change
   */
  private void trackShellActivation(Shell shell) {
    shell.addShellListener(new ShellAdapter() {
      public void shellActivated(ShellEvent event) {
        shellActivated = true;
        serviceLocator.activate();
        getWorkbenchImpl().setActivatedWindow(WorkbenchWindow.this);
        WorkbenchPage currentPage = getActiveWorkbenchPage();
View Full Code Here

  public BrowserShellIE6() {
    m_shell = new Shell(SWT.SHELL_TRIM | SWT.APPLICATION_MODAL);
    m_shell.setLayout(new FillLayout());
    m_shell.setLocation(-10000, -10000);
    // prevent close, hide instead
    m_shell.addShellListener(new ShellAdapter() {
      @Override
      public void shellClosed(ShellEvent e) {
        e.doit = false;
        Shell shell = (Shell) e.widget;
        shell.setMinimized(false);
View Full Code Here

  }
 
  private void Create(Display display){
    m_shell = new Shell(display);
    m_shell.setImage(new Image(display,org.tcm1998.utils.ResourceUtils.openBinaryResource("nook.png")));
    m_shell.addShellListener(new ShellAdapter(){
      public void shellClosed(ShellEvent e) {
        onClose(e);       
     
    });
    m_shell.addListener(FilterDlg.EVENT_UPDATE, new Listener(){
View Full Code Here

  }

  // Add a listener to the shell
  // If the window is minimized hide the window
  private void createMinimize() {
    window.getShell().addShellListener(new ShellAdapter() {
      public void shellIconified(ShellEvent e) {
        window.getShell().setVisible(false);
      }
    });
    // If user double-clicks on the tray icons the application will be
View Full Code Here

      shell.setSize(shellBounds.width, shellBounds.height);
    }
    shell.setMaximized(true);
    shell.open();

    shell.addShellListener(new ShellAdapter() {
      public void shellClosed(ShellEvent e) {
        System.exit(0);
      }
    });
View Full Code Here

    protected void initComponents(final Shell shell) {
        shell.setLayout(new GridLayout());
        shell.setText(Messages.getString("ColumnStyleEditorDialog.shellTitle")); //$NON-NLS-1$

        // Closing the window is the same as canceling the form
        shell.addShellListener(new ShellAdapter() {
            @Override
            public void shellClosed(ShellEvent e) {
                doFormCancel(shell);
            }
View Full Code Here

TOP

Related Classes of org.eclipse.swt.events.ShellAdapter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.