congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Composite.addPaintListener
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: pentaho/pentaho-kettle

gray = GUIResource.getInstance().getColorDarkGray();
widget.addPaintListener( new PaintListener() {
 @Override
 public void paintControl( PaintEvent pe ) {
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

parent.addPaintListener(borderPainter);
origin: org.eclipse.platform/org.eclipse.ui.forms

parent.addPaintListener(borderPainter);
origin: BiglySoftware/BiglyBT

public static void main(String[] args) {
  Display display = Display.getDefault();
  Shell shell = new Shell(display, SWT.DIALOG_TRIM);
  shell.setLayout(new FillLayout());
  Composite c = new Composite(shell, SWT.BORDER);
  c.setLayout(new FillLayout());
  c.addPaintListener(new PaintListener() {
    @Override
    public void paintControl(PaintEvent e) {
      e.gc.drawLine(0, 0, 100, 50);
    }
  });
  Label lbl = new Label(c, SWT.NONE);
  lbl.setText("text");
  shell.open();
  while (!shell.isDisposed()) {
    if (display.readAndDispatch()) {
      display.sleep();
    }
  }
}
origin: BiglySoftware/BiglyBT

public static void main(String[] args) {
  Display display = Display.getDefault();
  Shell shell = new Shell(display, SWT.DIALOG_TRIM);
  shell.setLayout(new FillLayout());
  Composite c = new Composite(shell, SWT.BORDER);
  c.setLayout(new FillLayout());
  c.addPaintListener(new PaintListener() {
    @Override
    public void paintControl(PaintEvent e) {
      e.gc.drawLine(0, 0, 100, 50);
    }
  });
  Label lbl = new Label(c, SWT.NONE);
  lbl.setText("text");
  shell.open();
  while (!shell.isDisposed()) {
    if (display.readAndDispatch()) {
      display.sleep();
    }
  }
}
origin: BiglySoftware/BiglyBT

Utils.addListenerAndChildren(cRow, SWT.MouseExit, listenerRow);
cRow.addPaintListener(listenerRowPaint);
origin: org.eclipse/org.eclipse.wst.common.ui.properties

mainComposite.addPaintListener(new PaintListener() {
origin: openaudible/openaudible

public static void debugLayout(final Composite c, final int color) {
  c.addPaintListener(e -> {
    Color save = e.gc.getForeground();
    e.gc.setForeground(Display.getCurrent().getSystemColor(color));
    e.gc.drawRectangle(1, 1, c.getBounds().width - 1, c.getBounds().width - 1);
    // e.gc.drawLine(1, 1, c.getBounds().width - 1, c.getBounds().height - 1);
    e.gc.setForeground(save);
  });
}

origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

protected void highlight(final Composite parent, final Label labelControl, final Combo comboBox, final int color) {
  Object data= labelControl.getData();
  if (data == null) {
    if (color != HIGHLIGHT_NONE) {
      PaintListener painter= new HighlightPainter(parent, labelControl, comboBox, color);
      parent.addPaintListener(painter);
      labelControl.setData(painter);
    } else {
      return;
    }
  } else {
    if (color == HIGHLIGHT_NONE) {
      parent.removePaintListener((PaintListener) data);
      labelControl.setData(null);
    } else if (color != ((HighlightPainter) data).fColor){
      ((HighlightPainter) data).fColor= color;
    } else {
      return;
    }
  }
  
  parent.redraw();
}

origin: org.eclipse.pde/org.eclipse.pde.ui

if (color != HIGHLIGHT_NONE) {
  PaintListener painter= new HighlightPainter();
  parent.addPaintListener(painter);
  labelControl.setData(painter);
} else {
origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

private void installCompositeListeners(Composite c) {
  if (!c.isDisposed()) {
    printAddListener(c, "PAINT"); //$NON-NLS-1$
    c.addPaintListener(paintListener);
    printAddListener(c, "MOUSETRACK"); //$NON-NLS-1$
    c.addMouseTrackListener(mouseTrackListener);
    printAddListener(c, "SWT.MenuDetect"); //$NON-NLS-1$
    c.addListener(SWT.MenuDetect, compositeListener);
    printAddListener(c, "SWT.MouseDown"); //$NON-NLS-1$
    c.addListener(SWT.MouseDown, compositeListener);
    printAddListener(c, "SWT.MouseDoubleClick"); //$NON-NLS-1$
    c.addListener(SWT.MouseDoubleClick, compositeListener);
  }
}
origin: org.eclipse.platform/org.eclipse.jface

private void installCompositeListeners(Composite c) {
  if (!c.isDisposed()) {
    printAddListener(c, "PAINT"); //$NON-NLS-1$
    c.addPaintListener(paintListener);
    printAddListener(c, "MOUSETRACK"); //$NON-NLS-1$
    c.addMouseTrackListener(mouseTrackListener);
    printAddListener(c, "SWT.MenuDetect"); //$NON-NLS-1$
    c.addListener(SWT.MenuDetect, compositeListener);
    printAddListener(c, "SWT.MouseDown"); //$NON-NLS-1$
    c.addListener(SWT.MouseDown, compositeListener);
    printAddListener(c, "SWT.MouseDoubleClick"); //$NON-NLS-1$
    c.addListener(SWT.MouseDoubleClick, compositeListener);
  }
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.m2e.core.ui

private void installCompositeListeners(Composite c) {
 if(!c.isDisposed()) {
  printAddListener(c, "PAINT"); //$NON-NLS-1$
  c.addPaintListener(paintListener);
  printAddListener(c, "MOUSETRACK"); //$NON-NLS-1$
  c.addMouseTrackListener(mouseTrackListener);
  printAddListener(c, "SWT.MenuDetect"); //$NON-NLS-1$
  c.addListener(SWT.MenuDetect, compositeListener);
  printAddListener(c, "SWT.MouseDown"); //$NON-NLS-1$
  c.addListener(SWT.MouseDown, compositeListener);
  printAddListener(c, "SWT.MouseDoubleClick"); //$NON-NLS-1$
  c.addListener(SWT.MouseDoubleClick, compositeListener);
 }
}
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.e4.ui.css/swt

border = new CSSBorderPropertiesImpl();
control.setData(CSSSWTConstants.CONTROL_CSS2BORDER_KEY, border);
parent.addPaintListener(CSSSWTHelpers
    .createBorderPaintListener(engine, control));
origin: org.eclipse.platform/org.eclipse.e4.ui.css.swt

border = new CSSBorderPropertiesImpl();
control.setData(CSSSWTConstants.CONTROL_CSS2BORDER_KEY, border);
parent.addPaintListener(CSSSWTHelpers
    .createBorderPaintListener(engine, control));
origin: BiglySoftware/BiglyBT

parent.addPaintListener(
  new PaintListener(){
origin: org.eclipse.platform/org.eclipse.ui.intro

container.addPaintListener(e -> onPaint(e));
MenuManager manager = new MenuManager();
IMenuListener listener = manager1 -> contextMenuAboutToShow(manager1);
origin: org.eclipse.platform/org.eclipse.tips.ui

button.setSize(fIconSize + 4, fIconSize + 4);
button.setLocation((index * (fIconSize + spacing) + spacing - fSpacing), 2);
button.addPaintListener(e -> {
  if (fSelectedProvider == provider) {
    fSelectedProviderButton = button;
origin: org.eclipse.jdt/org.eclipse.jdt.ui

final Composite parent= labelControl.getParent();
PreferenceHighlight highlight= new PreferenceHighlight(parent, labelControl, mainControl);
parent.addPaintListener(highlight);
org.eclipse.swt.widgetsCompositeaddPaintListener

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

  • Making http requests using okhttp
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • runOnUiThread (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • JPanel (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top plugins for Android Studio
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