Package org.eclipse.swt.widgets

Examples of org.eclipse.swt.widgets.Control


        while (it.hasNext()) {
          ValidationError error = it.next();
          String[] propHints = error.getPropertyHints();
          for (int i = 0; i < propHints.length; i++) {
            String propHint = propHints[i];         
            Control control = _fields.get(propHint);
            if (control != null) {
              addError(form.getMessageManager(), propHint, error, control);
              unhandled.remove(error);
            }
          }
View Full Code Here


   */
  public void run() {
    Display display= Display.getCurrent();
    if (display == null)
      return;
    Control focus= display.getFocusControl();
    if (focus == null || focus.isDisposed())
      return;
   
    MenuManager menu= new MenuManager();
    fillMenu(menu);
    final Menu widget= menu.createContextMenu(focus.getShell());
    Point location= computeMenuLocation(focus, widget);
    if (location == null)
      return;
    widget.setLocation(location);
    widget.setVisible(true);
View Full Code Here

    new BooleanParameter(cSection, "GUI_SWT_bOldSpeedMenu", LBLKEY_PREFIX
        + "use_old_speed_menus");

    BooleanParameter bpCustomTab = new BooleanParameter(cSection,
        "useCustomTab", "ConfigView.section.style.useCustomTabs");
    Control cFancyTab = new BooleanParameter(cSection, "GUI_SWT_bFancyTab",
        "ConfigView.section.style.useFancyTabs").getControl();

    Control[] controls = {
      cFancyTab
    };
View Full Code Here

      public void handleEvent (Event event) {
       
        Control [] children = gRadio.getChildren ();
       
        for (int j=0; j<children.length; j++) {
           Control child = children [j];
           if (child instanceof Button) {
             Button button = (Button) child;
             if ((button.getStyle () & SWT.RADIO) != 0) button.setSelection (false);
           }
        }
View Full Code Here

    final boolean bOverrideToStopped = event.detail == DND.DROP_COPY;

    boolean  share_op = false;
   
    try{
      Control c = ((DropTarget)event.widget).getControl();
     
      Control hit = Utils.findChild((Composite )c, event.x, event.y );
     
      while( hit != null ){
       
        String data = (String)hit.getData( "TableView.TableID" );
       
        if ( data != null && data.equals( "MyShares" )){
         
          share_op = true;
         
          break;
        }
       
        hit = hit.getParent();
      }
    }catch( Throwable e ){
     
      e.printStackTrace();
    }
View Full Code Here

  private void swt_hide() {
    SWTSkinObject skinObjectMaster = getSkinObjectMaster();
    if (skinObjectMaster instanceof SWTSkinObjectContainer) {
      SWTSkinObjectContainer container = (SWTSkinObjectContainer) skinObjectMaster;
      if (container != null) {
        Control oldComposite = container.getControl();

        container.setVisible(false);
        if (!oldComposite.isDisposed()) {
          oldComposite.getShell().update();
        }
      }
    }
    if (iview != null) {
      Composite oldComposite = iview.getComposite();
      if (oldComposite != null && !oldComposite.isDisposed()) {

        oldComposite.setVisible(false);
        oldComposite.getShell().update();
      }
    }

    try {
      if (iview instanceof IViewExtension) {
View Full Code Here

         
          if ( stuff != null ){
           
            for(int k = 1 ; k < stuff.length ; k++) {
             
              Control  con = (Control)stuff[k];
             
              con.setVisible(false);
             
              con.setSize( 0, 0 );
             
              GridData gridData = new GridData();
           
            gridData.heightHint         = 0;
            gridData.verticalSpan        = 0;
            gridData.grabExcessVerticalSpace  = false;
           
            con.setLayoutData( gridData );
            }
          }
      }
     
      if ( param instanceof EnablerParameter ){
View Full Code Here

      soWaitProgress = getSkinObject("library-wait-progress");
      soWaitTask = (SWTSkinObjectText) getSkinObject("library-wait-task");
      if (soWaitProgress != null) {
        soWaitProgress.getControl().addPaintListener(new PaintListener() {
          public void paintControl(PaintEvent e) {
            Control c = (Control) e.widget;
            Point size = c.getSize();
            e.gc.setBackground(ColorCache.getColor(e.display, "#23a7df"));
            int breakX = size.x * waitProgress / 100;
            e.gc.fillRectangle(0, 0, breakX, size.y);
            e.gc.setBackground(ColorCache.getColor(e.display, "#cccccc"));
            e.gc.fillRectangle(breakX, 0, size.x - breakX, size.y);
View Full Code Here

              return new SWTSkinObject[0];
            }
            Control[] swtChildren = ((Composite) control).getChildren();
            ArrayList<SWTSkinObject> list = new ArrayList<SWTSkinObject>(swtChildren.length);
            for (int i = 0; i < swtChildren.length; i++) {
              Control childControl = swtChildren[i];
              SWTSkinObject so = (SWTSkinObject) childControl.getData("SkinObject");
              if (so != null) {
                list.add(so);
              }
            }
View Full Code Here

              + " children of " + SWTSkinObjectContainer.this);
        }
        for (int i = 0; i < children.length; i++) {
          if (children[i] instanceof SWTSkinObjectBasic) {
            SWTSkinObjectBasic child = ((SWTSkinObjectBasic) children[i]);
            Control childControl = child.getControl();
            if (childControl != null && !childControl.isDisposed()) {
              //child.setIsVisible(visible, false);
              //System.out.println("child control " + child + " is " + (childControl.isVisible() ? "visible" : "invisible"));
              child.setIsVisible(childControl.isVisible(), false);
            }
          }
        }
        getComposite().layout();
        if (SWTSkin.DEBUG_VISIBILITIES) {
View Full Code Here

TOP

Related Classes of org.eclipse.swt.widgets.Control

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.