Examples of Control


Examples of org.eclipse.swt.widgets.Control

  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

Examples of org.eclipse.swt.widgets.Control

         
          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

Examples of org.eclipse.swt.widgets.Control

      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

Examples of org.eclipse.swt.widgets.Control

              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

Examples of org.eclipse.swt.widgets.Control

              + " 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

Examples of org.eclipse.swt.widgets.Control

    }
    Point ourOfs = Utils.getLocationRelativeToShell(control);

    Control[] swtChildren = ((Composite) control).getChildren();
    for (int i = 0; i < swtChildren.length; i++) {
      Control childControl = swtChildren[i];
      TableOrTreeSWT tableOrTree = TableOrTreeUtils.getTableOrTreeSWT(childControl);
      TableView tv = tableOrTree == null ? null
          : (TableView) tableOrTree.getData("TableView");
      if (tv instanceof ObfusticateImage) {
        ObfusticateImage oi = (ObfusticateImage) tv;
        oi.obfusticatedImage(image);
        continue;
      }

      SWTSkinObject so = (SWTSkinObject) childControl.getData("SkinObject");
      if (so instanceof ObfusticateImage) {
        ObfusticateImage oi = (ObfusticateImage) so;
        oi.obfusticatedImage(image);
      } else if (so == null && (childControl instanceof Composite)) {
        obfusticatedImage((Composite) childControl, image);
View Full Code Here

Examples of org.eclipse.swt.widgets.Control

      sortedControls.add(controls[i]);
    }
   
    Collections.sort(sortedControls,new Comparator() {
      public int compare(Object o1, Object o2) {
        Control c1 = (Control) o1;
        Control c2 = (Control) o2;
        Object layoutData1 = c1.getLayoutData();
        Object layoutData2 = c2.getLayoutData();
        if(layoutData1 == null || ! (layoutData1 instanceof SimpleReorderableListLayoutData) ) return 0;
        if(layoutData2 == null || ! (layoutData2 instanceof SimpleReorderableListLayoutData) ) return 0;
        SimpleReorderableListLayoutData data1 = (SimpleReorderableListLayoutData) layoutData1;
        SimpleReorderableListLayoutData data2 = (SimpleReorderableListLayoutData) layoutData2;
        return data1.position - data2.position;
      }
    });
   
    for(int i = 0 ; i < sortedControls.size() ; i++) {
      int xn = i % itemsPerRow;
      int yn = i / itemsPerRow;
      Control control = (Control) sortedControls.get(i);
      //int x = borderW + (margin + maxWidth + extraSpacing) * xn + extraSpacing;
      int x = borderW + (margin + maxWidth + extraSpacing) * xn;
      int y = borderH + (margin + maxHeight) * yn;
      control.setLocation(x,y);
      //control.setBounds(x,y,maxWidth,maxHeight);
      control.setBounds(x,y,maxWidth + extraSpacing,maxHeight);
    }
 
  }
View Full Code Here

Examples of org.eclipse.swt.widgets.Control

    final SWTSkinObject soWaitProgress = skin.getSkinObject("progress");
    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"));
          Object data = soWaitProgress.getData("progress");
          if (data instanceof Long) {
            int waitProgress = ((Long) data).intValue();
            int breakX = size.x * waitProgress / 100;
View Full Code Here

Examples of org.eclipse.swt.widgets.Control

    this.content = content;
    super.setContent(content);
   
    if (registerAllControls) {
      for(int i = 0;i<content.getChildren().length;i++) {
        Control c = content.getChildren()[i];
        addPaintListener(c);
      }
    }
   
    content.addPaintListener(new PaintListener() {
View Full Code Here

Examples of org.eclipse.swt.widgets.Control

   
    if (System.currentTimeMillis() - last_call_time<100)
      return ;
    last_call_time = System.currentTimeMillis();
    int max_width = 0,max_height = 0;
    Control max_width_control = null,max_height_control = null;

    for(int i = 0;i<content.getChildren().length;i++) {
      Control c = content.getChildren()[i];
     
      int abs_width = c.getBounds().x+c.getBounds().width;
      int abs_height = c.getBounds().y+c.getBounds().height;
     
      if (abs_width>max_width) {
        max_width = abs_width;
        max_width_control = c;
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.