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

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

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

  • 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

private boolean checkPaste() {
 try {
  Clipboard clipboard = new Clipboard( xParent.getDisplay() );
  TextTransfer transfer = TextTransfer.getInstance();
  String text = (String) clipboard.getContents( transfer );
  if ( text != null && text.length() > 0 ) {
   return true;
  } else {
   return false;
  }
 } catch ( Exception e ) {
  return false;
 }
}
origin: pentaho/pentaho-kettle

public void dragOver( DropTargetEvent e ) {
 styledText.setFocus();
 Point location = xParent.getDisplay().map( null, styledText, e.x, e.y );
 location.x = Math.max( 0, location.x );
 location.y = Math.max( 0, location.y );
 try {
  int offset = styledText.getOffsetAtLocation( new Point( location.x, location.y ) );
  styledText.setCaretOffset( offset );
 } catch ( IllegalArgumentException ex ) {
  int maxOffset = styledText.getCharCount();
  Point maxLocation = styledText.getLocationAtOffset( maxOffset );
  if ( location.y >= maxLocation.y ) {
   if ( location.x >= maxLocation.x ) {
    styledText.setCaretOffset( maxOffset );
   } else {
    int offset = styledText.getOffsetAtLocation( new Point( location.x, maxLocation.y ) );
    styledText.setCaretOffset( offset );
   }
  } else {
   styledText.setCaretOffset( maxOffset );
  }
 }
}
origin: pentaho/pentaho-kettle

public void clearAll( boolean ask ) {
 int id = SWT.YES;
 if ( ask ) {
  MessageBox mb = new MessageBox( parent.getShell(), SWT.YES | SWT.NO | SWT.ICON_QUESTION );
  mb.setMessage( BaseMessages.getString( PKG, "TableView.MessageBox.ClearTable.message" ) );
  mb.setText( BaseMessages.getString( PKG, "TableView.MessageBox.ClearTable.title" ) );
  id = mb.open();
 }
 if ( id == SWT.YES ) {
  table.removeAll();
  new TableItem( table, SWT.NONE );
  if ( !readonly ) {
   parent.getDisplay().asyncExec( new Runnable() {
    @Override
    public void run() {
     edit( 0, 1 );
    }
   } );
  }
  this.setModified(); // timh
 }
}
origin: pentaho/pentaho-kettle

prev_toy = -1;
display = parent.getDisplay();
bg = GUIResource.getInstance().getColorBackground();
origin: pentaho/pentaho-kettle

prev_toy = -1;
display = parent.getDisplay();
bg = GUIResource.getInstance().getColorBackground();
origin: stackoverflow.com

Image oldImage = imageGradient;
Display display = composite.getDisplay();
Rectangle rect = composite.getClientArea();
imageGradient = new Image(display, rect.width, rect.height);
origin: org.eclipse/org.eclipse.help.ui

  public void linkActivated(HyperlinkEvent e) {
    parent.getDisplay().asyncExec(new Runnable() {
      public void run() {
        toggleSearchWordText();
      }
    });
  }
});
origin: org.codehaus.openxma/xmartclient

private void scalebyDPI(Composite comp) {
  Point p = comp.getDisplay().getDPI();
  factorX = p.x/standardDPI;
  factorY = p.y/standardDPI;
}
origin: org.eclipse/org.eclipse.help.ui

private void updateResultSections() {
  BusyIndicator.showWhile(container.getDisplay(), new Runnable() {
    public void run() {
      for (int i = 0; i < results.size(); i++) {
        EngineResultSection section = (EngineResultSection) results
            .get(i);
        section.updateResults(false);
      }
      reflow();
    }
  });
}
origin: org.eclipse.recommenders.extdoc/rcp

private void disposeOldContentAndDisableRedrawOnContentArea() {
  content.getDisplay().syncExec(new Runnable() {
    @Override
    public void run() {
      // content.setRedraw(false);
      ExtdocUtils.disposeChildren(content);
      addCurrentSelectionHeader();
    }
  });
}
origin: pentaho/pentaho-kettle

Display disp = parent.getDisplay();
TableView.dummyImage = new Image( disp, 1, 1 );
TableView.dummyGC = new GC( TableView.dummyImage );
origin: org.eclipse.equinox.p2/ui

private void createImageSection(Composite composite) {
  Image image = composite.getDisplay().getSystemImage(dialogImageType);
  if (image != null) {
    Label label = new Label(composite, SWT.NONE);
    label.setLayoutData(new GridData(SWT.BEGINNING, SWT.BEGINNING, false, false));
    label.setImage(image);
  }
}
origin: org.eclipse/org.eclipse.help.ui

public void scheduled(IJobChangeEvent event) {
  if (!searchInProgress && event.getJob().belongsTo(FederatedSearchJob.FAMILY)) {
    searchInProgress = true;
    container.getDisplay().asyncExec(this);
  }
}
origin: org.eclipse.platform/org.eclipse.ui.forms

@Override
protected Composite createPageContainer(Composite parent) {
  parent = super.createPageContainer(parent);
  toolkit = createToolkit(parent.getDisplay());
  return parent;
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.forms

/**
 * Creates a managed form in the provided parent. Form toolkit and widget
 * will be created and owned by this object.
 *
 * @param parent
 *            the parent widget
 */
public ManagedForm(Composite parent) {
  toolkit = new FormToolkit(parent.getDisplay());
  ownsToolkit = true;
  form = toolkit.createScrolledForm(parent);
}
origin: org.eclipse.platform/org.eclipse.team.ui

@Override
public void createControl(Composite parent) {
  pgComp = new Composite(parent, SWT.NULL);
  pgComp.setLayout(new FillLayout());
  pgComp.setBackground(JFaceColors.getBannerBackground(pgComp.getDisplay()));
}
origin: BiglySoftware/BiglyBT

@Override
public TableRowCore getTableRowWithCursor() {
  // TODO: Make work outside SWT?
  Point pt = cTable.getDisplay().getCursorLocation();
  pt = cTable.toControl(pt);
  return getTableRow(pt.x, pt.y, true);
}
origin: org.eclipse/org.eclipse.ui.editors

private boolean useHeightHint(Composite parent) {
  int fontHeight= (parent.getFont().getFontData())[0].getHeight();
  int displayHeight= parent.getDisplay().getClientArea().height;
  return (displayHeight / fontHeight) > 50;
}
origin: de.dentrassi.eclipse.neoscada.hmi/org.eclipse.scada.ca.ui.editor.forms.common

@Override
public void createFormPart ( final Composite parent, final ConfigurationEditorInput input )
{
  this.toolkit = new ConfigurationFormToolkit ( parent.getDisplay () );
  this.form = this.toolkit.createScrolledForm ( parent, getTitle ( input ) );
  this.form.getBody ().setLayout ( new GridLayout ( getColumnCount (), true ) );
  // create
  populateFormContent ( this.toolkit, this.form, input );
  this.toolkit.getDataBindingContext ().updateTargets ();
}
origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
protected Control createDialogArea(Composite parent) {
  final Composite composite= (Composite) super.createDialogArea(parent);
  LayoutUtil.doDefaultLayout(composite, new DialogField[] { fNameField }, true, SWT.DEFAULT, SWT.DEFAULT);
  fNameField.postSetFocusOnDialogField(parent.getDisplay());
  LayoutUtil.setWidthHint(fNameField.getLabelControl(null), convertHorizontalDLUsToPixels(IDialogConstants.MINIMUM_MESSAGE_AREA_WIDTH));
  Text text= fNameField.getTextControl(null);
  LayoutUtil.setHorizontalGrabbing(text);
  TextFieldNavigationHandler.install(text);
  Dialog.applyDialogFont(composite);
  return composite;
}
org.eclipse.swt.widgetsCompositegetDisplay

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
  • 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
  • dispose
  • computeSize,
  • dispose,
  • setBackground,
  • getClientArea,
  • isDisposed,
  • getBackground,
  • setVisible,
  • setSize,
  • setData

Popular in Java

  • Finding current android device location
  • startActivity (Activity)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • getSystemService (Context)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • BufferedInputStream (java.io)
    Wraps an existing InputStream and buffers the input. Expensive interaction with the underlying input
  • SimpleDateFormat (java.text)
    Formats and parses dates in a locale-sensitive manner. Formatting turns a Date into a String, and pa
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Project (org.apache.tools.ant)
    Central representation of an Ant project. This class defines an Ant project with all of its targets,
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