Examples of addListener()


Examples of org.eclipse.nebula.widgets.gallery.Gallery.addListener()

    this.tooltip = new ImagesViewTooltip(gallery, gallery);

    final ArrayList<Object> images = new ArrayList<Object>(store.getContents());
    this.prepareImages(images);
    gallery.addListener(SWT.SetData, new Listener() {

      public void handleEvent(Event event) {
        final GalleryItem item = (GalleryItem) event.item;
        final GalleryItem parentItem = item.getParentItem();
        if (parentItem == null) {
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.columnCategories.gui.ColumnCategoriesDialog.addListener()

        ColumnCategoriesDialog dialog = new ColumnCategoriesDialog(new Shell(),
                new ColumnCategoriesModelFixture(),
                ColumnEntriesFixture.getEntriesWithEvenIndexes(),
                ColumnEntriesFixture.getEntriesWithOddIndexes());

        dialog.addListener(new Listener());
        dialog.open();
    }
}

class Listener implements IColumnCategoriesDialogListener {
View Full Code Here

Examples of org.eclipse.persistence.platform.database.oracle.publisher.visit.PublisherListenerChainAdapter.addListener()

         */
        PLSQLHelperObjectsBuilder helperObjectsBuilder = new PLSQLHelperObjectsBuilder(this, procOpModel);
        PLSQLORDescriptorBuilder orDescriptorBuilder = new PLSQLORDescriptorBuilder();
        PLSQLOXDescriptorBuilder oxDescriptorBuilder = new PLSQLOXDescriptorBuilder(getTargetNamespace());
        PublisherListenerChainAdapter chain = new PublisherListenerChainAdapter();
        chain.addListener(helperObjectsBuilder);
        chain.addListener(orDescriptorBuilder);
        chain.addListener(oxDescriptorBuilder);
        PublisherWalker walker = new PublisherWalker(chain);
        procOpModel.getJPubType().accept(walker);
        if (orDescriptorBuilder.getDescriptors() != null) {
View Full Code Here

Examples of org.eclipse.swt.custom.CCombo.addListener()

    cc.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    // without these next lines, the height of the ccombo is too small
    // especially on a Mac
    FontData [] fontData = cc.getFont().getFontData();
    ((GridData) cc.getLayoutData()).heightHint = 2 * fontData[0].getHeight();
    cc.addListener(SWT.Selection, this);
    cc.setToolTipText(tip);
    cc.addKeyListener(new KeyListener() {
      private final StringBuffer b = new StringBuffer();

      public void keyPressed(KeyEvent e) {
View Full Code Here

Examples of org.eclipse.swt.custom.ScrolledComposite.addListener()

    ScrolledComposite sc = new ScrolledComposite(cConfigSection, SWT.H_SCROLL | SWT.V_SCROLL);
    sc.setExpandHorizontal(true);
    sc.setExpandVertical(true);
    sc.setLayoutData(new GridData(GridData.FILL_BOTH));
    sc.getVerticalBar().setIncrement(16);
    sc.addListener(SWT.Resize, scResizeListener);

    Composite cConfigSection = new Composite(sc, SWT.NULL);
   
    String section_key = ((bPrefix) ? sSectionPrefix : "") + sNameID;
   
View Full Code Here

Examples of org.eclipse.swt.custom.StyledText.addListener()

    final StyledText widget = editor.getViewer().getTextWidget();
    if (!registeredWidgets.contains(widget)) {
      PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable() {
        @Override
        public void run() {
          widget.addListener(SWT.KeyDown, listener);
          widget.addListener(SWT.MouseDown, listener);
        }
      });
      registeredWidgets.add(widget);
    }
View Full Code Here

Examples of org.eclipse.swt.custom.TableTree.addListener()

   */
  protected TableTree newTableTree(Composite parent, int style) {
    TableTree tt = new TableTree(parent, style);
    tt.setLayoutData(new GridData(GridData.FILL_BOTH));
    toolkit.adapt(tt, true, true);
    tt.addListener(SWT.Selection, this);
    tt.getTable().addListener(SWT.KeyUp, this); // for delete key
    tt.getTable().addListener(SWT.MouseDoubleClick, this); // for edit
    tt.addListener(SWT.Expand, this);
    tt.addListener(SWT.Collapse, this);
View Full Code Here

Examples of org.eclipse.swt.opengl.GLCanvas.addListener()

        glcanvas.setCurrent();
        GLProfile glprofile = GLProfile.getDefault();
        final GLContext glcontext = GLDrawableFactory.getFactory( glprofile ).createExternalGLContext();

        // fix the viewport when the user resizes the window
        glcanvas.addListener( SWT.Resize, new Listener() {
            public void handleEvent(Event event) {
                Rectangle rectangle = glcanvas.getClientArea();
                glcanvas.setCurrent();
                glcontext.makeCurrent();
                OneTriangle.setup( glcontext.getGL().getGL2(), rectangle.width, rectangle.height );
View Full Code Here

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

       
    Button cancel_button = new Button( parent, SWT.NULL );

    cancel_button.setText( "Cancel" );
   
    cancel_button.addListener(
        SWT.Selection,
        new Listener()
        {
          public void
          handleEvent(
View Full Code Here

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

    final ToolItem itemGo = new ToolItem(toolbar, SWT.PUSH);
    itemGo.setText(getResourceString("Go"));
    location = new Text(parent, SWT.BORDER);
    final Canvas canvas = new Canvas(parent, SWT.NO_BACKGROUND);
    final Rectangle rect = images[0].getBounds();
    canvas.addListener(SWT.Paint, new Listener() {
      public void handleEvent(Event e) {
        Point pt = canvas.getSize();
        e.gc.drawImage(images[index], 0, 0, rect.width, rect.height, 0, 0,
            pt.x, pt.y);
      }
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.