Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Shell.addListener()


      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  /*
  * Generate the appropriate events to activate and deactivate
  * the embedded frame. This is needed in order to make keyboard
  * focus work properly for lightweights.
View Full Code Here


        }
      });
    }
  };
  parent.addComponentListener(listener);
  shell.addListener(SWT.Dispose, new Listener() {
    public void handleEvent(Event event) {
      parent.removeComponentListener(listener);
    }
  });
  shell.setVisible (true);
View Full Code Here

          break;
      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  /*
  * Generate the appropriate events to activate and deactivate
  * the embedded frame. This is needed in order to make keyboard
View Full Code Here

      }
    }
  };
  Shell shell = parent.getShell ();
  shell.addListener (SWT.Deiconify, shellListener);
  shell.addListener (SWT.Iconify, shellListener);
 
  /*
  * Generate the appropriate events to activate and deactivate
  * the embedded frame. This is needed in order to make keyboard
  * focus work properly for lightweights.
View Full Code Here

        }
      });
    }
  };
  parent.addComponentListener(listener);
  shell.addListener(SWT.Dispose, new Listener() {
    public void handleEvent(Event event) {
      parent.removeComponentListener(listener);
    }
  });
  shell.setVisible (true);
View Full Code Here

    dialog.setLayout(gridLayout);

    // create the controls in the dialog
    createDialogControls(dialog);

    dialog.addListener(SWT.Close, new Listener() {
      public void handleEvent(Event event) {
        for (int i = 0; i < resources.size(); i++) {
          Object obj = resources.get(i);
          if (obj != null && obj instanceof Resource)
            ((Resource) obj).dispose();
View Full Code Here

  public Shell open(final Display display) {
    Shell shell = new Shell(display);
    shell.setText(GraphicsExample.getResourceString("AdvancedGraphics")); //$NON-NLS-1$
    final GraphicsExample example = new GraphicsExample(shell);
    shell.addListener(SWT.Close, new Listener() {
      public void handleEvent(Event event) {
        example.dispose();
      }
    });
    shell.open();
View Full Code Here

    }
    FontData fd = shell.getFont().getFontData()[0];
    final Font font = new Font(display, fd.getName(), 96, SWT.BOLD | SWT.ITALIC);
    final Image image = AdvancedGraphics.loadImage(display, AdvancedGraphics.class, "irmaos.jpg");
    final Rectangle rect = image.getBounds();
    shell.addListener(SWT.Paint, new Listener() {
      public void handleEvent(Event event) {
        GC gc = event.gc;
        Transform tr = new Transform(display);
        tr.translate(rect.width / 4, rect.height / 2);
        tr.rotate(-30);
View Full Code Here

        path.dispose();
      }
    });
    shell.setSize(shell.computeSize(rect.width, rect.height));
    shell.open();
    shell.addListener(SWT.Dispose, new Listener() {
      public void handleEvent(Event event) {
        if (image != null)
          image.dispose();
        font.dispose();
      }
View Full Code Here

                }
        });
       
       
        //listener for shell disposal
        dirShell.addListener(SWT.Dispose, new Listener() {
            public void handleEvent(Event e) {
                if(!no_revert){
                    /*View.getPluginInterface().getPluginconfig().setPluginParameter("backup_directory",oldDir);
                    Tab4Utils.backup_loadDirectory();
                    Tab1Utils.loadDirectory(View.getPluginInterface().getPluginconfig().getPluginIntParameter("Azureus_TableSort",2));
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.