@Override public void setVisibility(int visibility) { for (VControl child : children) { child.setVisibility(visibility); } super.setVisibility(visibility); }
@Override public void setVisible(boolean visible) { super.setVisible(visible); for (VControl child : children) { if (child instanceof VNative) { child.setVisible(visible); } } }
@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; } }
@Override public void setLayoutData(GridData data) { if (isTopLevel) { composite.setLayoutData(data); } else { super.setLayoutData(data); } }
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; }
/** * 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(); } } }
@Override public void setSize(Point size) { super.setSize(size); layout(); }
public void setEnabled(boolean enabled) { super.setEnabled(enabled); for (VControl child : children) { child.setEnabled(enabled); } }
@Override public void setBounds(int x, int y, int width, int height) { super.setBounds(x, y, width, height); layout(); }
public void setActivatable(boolean activatable) { super.setActivatable(activatable); for (VControl child : children) { child.setActivatable(activatable); } }