Package org.eclipse.swt.graphics

Examples of org.eclipse.swt.graphics.Point


            return _proposal.getSelection(document);
        }
    }
   
    public void setSelection(int offset, int length) {
        _selection = new Point(_replacementOffset + offset, length);
    }
View Full Code Here


        drawImage (overlayImageData, xValue, yValue);       
    }

    @Override
    protected Point getSize() {       
        return new Point(_baseImage.getImageData().height, _baseImage.getImageData().width);
    }
View Full Code Here

        schemaSectionItemNew.setImage(Plugin.getDefault().getImageRegistry().get(Plugin.IMAGE_SCHEMADEFINITION_ADD));
        schemaSectionItemNew.addListener(SWT.Selection, new Listener() {
            public void handleEvent(Event event) {

                  Rectangle rect = schemaSectionItemNew.getBounds();
                  Point pt = new Point(rect.x, rect.y + rect.height);
                  pt = schemaSectionToolBar.toDisplay(pt);
                  menu.setLocation(pt.x, pt.y);
                  menu.setVisible(true);

              }
View Full Code Here

              label = null;
              break;
            }
            case SWT.MouseHover:
            {
              Point mouse_position = new Point(event.x, event.y);
             
              TableItem item = buddy_table.getItem( mouse_position );
                           
              if (item != null) {
               
                if (tip != null && !tip.isDisposed()){
                 
                  tip.dispose();
                 
                  tip = null;
                }
               
                int index = buddy_table.indexOf(item);
               
                if ( index < 0 || index >= buddies.size()){
                 
                  return;
                }

                BuddyPluginBuddy  buddy = (BuddyPluginBuddy)buddies.get(index);

                int  item_index = 0;
               
                for (int i=0;i<headers.length;i++){
                 
                  Rectangle bounds = item.getBounds(i);
                 
                  if ( bounds.contains( mouse_position )){
                   
                    item_index = i;
                   
                    break;
                  }
                }
               
                if( item_index != 0 ){
                 
                  return;
                }
               
                tip = new Shell(buddy_table.getShell(), SWT.ON_TOP | SWT.TOOL);
                tip.setLayout(new FillLayout());
                label = new Label(tip, SWT.NONE);
                label.setForeground(buddy_table.getDisplay()
                    .getSystemColor(SWT.COLOR_INFO_FOREGROUND));
                label.setBackground(buddy_table.getDisplay()
                    .getSystemColor(SWT.COLOR_INFO_BACKGROUND));
                label.setData("_TABLEITEM", item);
               
                label.setText( getToolTip( buddy ));
               
                label.addListener(SWT.MouseExit, tt_label_listener);
                label.addListener(SWT.MouseDown, tt_label_listener);
                Point size = tip.computeSize(SWT.DEFAULT, SWT.DEFAULT);
                Rectangle rect = item.getBounds(item_index);
                Point pt = buddy_table.toDisplay(rect.x, rect.y);
                tip.setBounds(pt.x, pt.y, size.x, size.y);
                tip.setVisible(true);
              }
            }
          }
View Full Code Here

            SWTThread instance = SWTThread.getInstance();
            if (instance == null || instance.isTerminated()) {
              return;
            }
            Shell anyShell = Utils.findAnyShell();
            Point location = null;
            if (anyShell != null) {
              Rectangle bounds = anyShell.getBounds();
              location = new Point(bounds.x, bounds.y);
            }
            Shell[] shells = instance.getDisplay().getShells();
            for (Shell shell : shells) {
              if (!shell.isDisposed()) {
                shell.dispose();
View Full Code Here

    Rectangle bounds = drawCanvas.getClientArea();
    if(bounds.height < 30 || bounds.width  < 100 || bounds.width > 2000 || bounds.height > 2000)
      return;
   
    boolean sizeChanged = (oldSize == null || oldSize.x != bounds.width || oldSize.y != bounds.height);
    oldSize = new Point(bounds.width,bounds.height);
   
    internalLoop++;
    if(internalLoop > graphicsUpdate)
      internalLoop = 0;
   
View Full Code Here

    protected void
    hidePanel()
    {   
      manually_hidden  = true;
      if ( DO_ANIMATION ){
        currentAnimator = new LinearAnimator(this,new Point(x0,y1),new Point(x1,y1),15,30);
        currentAnimator.start();
        hideAfter = true;
      }else{
        shell.setVisible( false );
      }
View Full Code Here

      }
     
      shell.moveAbove(null);

      if(animate && currentAnimator == null) {
            currentAnimator = new LinearAnimator(this,new Point(x0,y0),new Point(x0,y1),15,30);
            currentAnimator.start();
      }
    }
View Full Code Here

    if (!COConfigurationManager.hasParameter("transferbar.x", false)) {
      return null;
    }
    int x = COConfigurationManager.getIntParameter("transferbar.x");
    int y = COConfigurationManager.getIntParameter("transferbar.y");
    return new Point(x, y);
  }
View Full Code Here

    if(bounds.height < 30 || bounds.width  < 100 || bounds.width > 2000 || bounds.height > 2000)
      return;

    boolean sizeChanged = (oldSize == null || oldSize.x != bounds.width || oldSize.y != bounds.height);

    oldSize = new Point(bounds.width,bounds.height);

    internalLoop++;

    if(internalLoop > graphicsUpdate){
View Full Code Here

TOP

Related Classes of org.eclipse.swt.graphics.Point

Copyright © 2018 www.massapicom. 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.