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

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

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

  • 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

widget.addMouseListener( new MouseAdapter() {
 @Override
 public void mouseDown( MouseEvent e ) {
origin: BiglySoftware/BiglyBT

/**
 * Add a mouse listener to the control and also the <code>titleLabel</code>
 */
@Override
public void addMouseListener(MouseListener listener) {
  if (null != titleLabel) {
    titleLabel.addMouseListener(listener);
  }
  super.addMouseListener(listener);
}
origin: org.eclipse.neoscada.chart/org.eclipse.scada.chart.swt

@Override
public void addMouseListener ( final ChartMouseListener listener )
{
  removeMouseListener ( listener );
  final MouseListener proxyListener = new MouseListener () {
    @Override
    public void mouseUp ( final MouseEvent e )
    {
      listener.onMouseUp ( convertState ( e ) );
    }
    @Override
    public void mouseDown ( final MouseEvent e )
    {
      listener.onMouseDown ( convertState ( e ) );
    }
    @Override
    public void mouseDoubleClick ( final MouseEvent e )
    {
      listener.onMouseDoubleClick ( convertState ( e ) );
    }
  };
  this.mouseListenerMap.put ( listener, proxyListener );
  this.control.addMouseListener ( proxyListener );
}
origin: org.eclipse.equinox.p2.ui.sdk/scheduler

protected Control createDialogArea(Composite parent) {
  dialogArea = new Composite(parent, SWT.NONE);
  dialogArea.setLayoutData(new GridData(GridData.FILL_BOTH));
  GridLayout layout = new GridLayout();
  layout.numColumns = 1;
  dialogArea.setLayout(layout);
  dialogArea.addMouseListener(clickListener);
  // The "click to update" label
  Label infoLabel = new Label(dialogArea, SWT.NONE);
  if (downloaded)
    infoLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_ClickToReviewDownloaded);
  else
    infoLabel.setText(AutomaticUpdateMessages.AutomaticUpdatesPopup_ClickToReviewNotDownloaded);
  infoLabel.setLayoutData(new GridData(GridData.FILL_BOTH));
  infoLabel.addMouseListener(clickListener);
  createRemindSection(dialogArea);
  return dialogArea;
}
origin: de.dentrassi.eclipse.neoscada.chart/org.eclipse.scada.chart.swt

@Override
public void addMouseListener ( final ChartMouseListener listener )
{
  removeMouseListener ( listener );
  final MouseListener proxyListener = new MouseListener () {
    @Override
    public void mouseUp ( final MouseEvent e )
    {
      listener.onMouseUp ( convertState ( e ) );
    }
    @Override
    public void mouseDown ( final MouseEvent e )
    {
      listener.onMouseDown ( convertState ( e ) );
    }
    @Override
    public void mouseDoubleClick ( final MouseEvent e )
    {
      listener.onMouseDoubleClick ( convertState ( e ) );
    }
  };
  this.mouseListenerMap.put ( listener, proxyListener );
  this.control.addMouseListener ( proxyListener );
}
origin: org.eclipse.e4.ui.workbench.addons/swt

composite.addMouseListener(new MouseListener() {
origin: stackoverflow.com

public void adapt(Composite composite) {
   composite.setBackground(colors.getBackground());
   composite.addMouseListener(new MouseAdapter() {
     public void mouseDown(MouseEvent e) {
       ((Control) e.widget).setFocus();
     }
   });
   if (composite.getParent() != null)
     composite.setMenu(composite.getParent().getMenu());
 }
origin: stackoverflow.com

target.setBounds(new Rectangle(0, 0, 100, 100));
target.setBackground(new Color(display, 255, 255, 0));
target.addMouseListener(new MouseAdapter() {
  @Override
  public void mouseUp(final MouseEvent event) {
origin: org.eclipse.e4.ui.workbench.renderers/swt

host.addMouseListener(new MouseListener() {
  public void mouseUp(MouseEvent e) {
    host.setCapture(false);
origin: BiglySoftware/BiglyBT

super.addMouseListener(interceptor);
titleLabel.addMouseListener(interceptor);
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

/**
 * Adapts a composite to be used in a form associated with this toolkit.
 *
 * @param composite
 *            the composite to adapt
 */
public void adapt(Composite composite) {
  composite.setBackground(colors.getBackground());
  composite.addMouseListener(new MouseAdapter() {
    @Override
    public void mouseDown(MouseEvent e) {
      ((Control) e.widget).setFocus();
    }
  });
  if (composite.getParent() != null)
    composite.setMenu(composite.getParent().getMenu());
}
origin: org.codehaus.openxma/xmartclient

spacer.setLayoutData(gridData);
spacer.setLayout(new GridLayout());
spacer.addMouseListener(this);
origin: org.eclipse.platform/org.eclipse.ui.forms

/**
 * Adapts a composite to be used in a form associated with this toolkit.
 *
 * @param composite
 *            the composite to adapt
 */
public void adapt(Composite composite) {
  checkDisposed();
  if (colors.getBackground() != null) {
    composite.setBackground(colors.getBackground());
  }
  composite.addMouseListener(new MouseAdapter() {
    @Override
    public void mouseDown(MouseEvent e) {
      ((Control) e.widget).setFocus();
    }
  });
  if (composite.getParent() != null)
    composite.setMenu(composite.getParent().getMenu());
}
origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.addons.swt

composite.addMouseListener(new MouseAdapter() {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

parent.addMouseMoveListener(parentListener);
parent.addMouseTrackListener(parentListener);
parent.addMouseListener(parentListener);
origin: org.eclipse.pde/org.eclipse.pde.ui

parent.addMouseMoveListener(parentListener);
parent.addMouseTrackListener(parentListener);
parent.addMouseListener(parentListener);
origin: BiglySoftware/BiglyBT

public void setControl(final Composite composite, Rectangle cellArea, boolean addListeners) {
  if (composite == null) {
    dispose();
    this.composite = null;
    return;
  }
  this.composite = composite;
  this.cellArea = cellArea;
  if (addListeners) {
   composite.addPaintListener(this);
   composite.addMouseListener(this);
   composite.addMouseMoveListener(this);
   composite.addMouseTrackListener(this);
  }
  setForeground(-1, -1, -1);
  setText(null);
  setToolTip(null);
  composite.addDisposeListener(new DisposeListener() {
    @Override
    public void widgetDisposed(DisposeEvent e) {
      dispose();
    }
  });
  if (coreDataSource != null && !isDisposed()) {
    invokeVisibilityListeners(TableCellVisibilityListener.VISIBILITY_SHOWN,
        true);
  }
}
origin: org.eclipse.platform/org.eclipse.e4.ui.workbench.renderers.swt

host.addMouseListener(new MouseAdapter() {
  @Override
  public void mouseUp(MouseEvent e) {
origin: org.eclipse.equinox.p2.ui.sdk/scheduler

protected Control createTitleMenuArea(Composite parent) {
  Composite titleComposite = (Composite) super.createTitleMenuArea(parent);
  titleComposite.addMouseListener(clickListener);
  ToolBar toolBar = new ToolBar(titleComposite, SWT.FLAT);
  ToolItem closeButton = new ToolItem(toolBar, SWT.PUSH, 0);
  GridDataFactory.fillDefaults().align(SWT.END, SWT.CENTER).applyTo(toolBar);
  closeButton.setImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE)));
  closeButton.setHotImage(AutomaticUpdatePlugin.getDefault().getImageRegistry().get((AutomaticUpdatePlugin.IMG_TOOL_CLOSE_HOT)));
  closeButton.addSelectionListener(new SelectionAdapter() {
    public void widgetSelected(SelectionEvent e) {
      close();
    }
  });
  // See https://bugs.eclipse.org/bugs/show_bug.cgi?id=177183
  toolBar.addMouseListener(new MouseAdapter() {
    public void mouseDown(MouseEvent e) {
      close();
    }
  });
  return titleComposite;
}
origin: org.eclipse.jdt/org.eclipse.jdt.ui

  highlight.setHover(false);
}));
parent.addMouseListener(MouseListener.mouseDownAdapter(e -> {
  if (highlight.isAroundLabel(e))
    mainControl.setFocus();
org.eclipse.swt.widgetsCompositeaddMouseListener

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
  • getShell
  • getFont
  • getLayout
    Returns layout which is associated with the receiver, or null if one has not been set.
  • setFont
  • getParent
  • computeSize
  • getParent,
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Updating database using SQL prepared statement
  • getResourceAsStream (ClassLoader)
  • findViewById (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • BufferedReader (java.io)
    Reads text from a character-input stream, buffering characters so as to provide for the efficient re
  • PrintWriter (java.io)
    Prints formatted representations of objects to a text-output stream. This class implements all of th
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • HashMap (java.util)
    HashMap is an implementation of Map. All optional operations are supported.All elements are permitte
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
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