示例#1
0
 @Override
 public void setVisibility(int visibility) {
   for (VControl child : children) {
     child.setVisibility(visibility);
   }
   super.setVisibility(visibility);
 }
示例#2
0
 @Override
 public void setVisible(boolean visible) {
   super.setVisible(visible);
   for (VControl child : children) {
     if (child instanceof VNative) {
       child.setVisible(visible);
     }
   }
 }
示例#3
0
 @Override
 protected boolean setFocus(boolean focus) {
   if (focus) {
     for (VControl child : children) {
       if (VTracker.instance().setFocusControl(child)) {
         return true;
       }
     }
     return false;
   } else {
     for (VControl child : children) {
       child.setFocus(false);
     }
     return true;
   }
 }
示例#4
0
 @Override
 public void setLayoutData(GridData data) {
   if (isTopLevel) {
     composite.setLayoutData(data);
   } else {
     super.setLayoutData(data);
   }
 }
示例#5
0
 public VControl getControl(int x, int y, boolean includePanels) {
   if (bounds.contains(x, y)) {
     for (ListIterator<VControl> iter = children.listIterator(children.size());
         iter.hasPrevious(); ) {
       VControl child = iter.previous();
       if (child.getVisible() && child.getBounds().contains(x, y)) {
         if (includePanels && child instanceof VPanel) {
           return ((VPanel) child).getControl(x, y, true);
         } else {
           return child;
         }
       }
     }
     return this;
   }
   return null;
 }
示例#6
0
 /**
  * If the dispose request comes from the Composite via the topLevelListener, then do not dispose
  * the Composite again - controls recieving the Composite's dispose event after this VPanel will
  * be in danger of dealing with a disposed control before they are ready.
  *
  * @param disposeComposite
  */
 private void dispose(boolean disposeComposite) {
   if (isTopLevel) {
     if (composite != null && !composite.isDisposed()) {
       composite.removeListener(SWT.Dispose, topLevelListener);
       composite.removeListener(SWT.FocusIn, topLevelListener);
       composite.removeListener(SWT.Paint, topLevelListener);
     }
   }
   for (VControl child : children.toArray(new VControl[children.size()])) {
     child.dispose();
   }
   super.dispose();
   if (isTopLevel && disposeComposite) {
     if (composite != null && !composite.isDisposed()) {
       composite.dispose();
     }
   }
 }
示例#7
0
 @Override
 public void setSize(Point size) {
   super.setSize(size);
   layout();
 }
示例#8
0
 public void setEnabled(boolean enabled) {
   super.setEnabled(enabled);
   for (VControl child : children) {
     child.setEnabled(enabled);
   }
 }
示例#9
0
 @Override
 public void setBounds(int x, int y, int width, int height) {
   super.setBounds(x, y, width, height);
   layout();
 }
示例#10
0
 public void setActivatable(boolean activatable) {
   super.setActivatable(activatable);
   for (VControl child : children) {
     child.setActivatable(activatable);
   }
 }