private void setInput(Object input) { if (fStructurePane != null) { fStructurePane.setInput(input); ((Splitter)fControl).layout(); } }
private void setInput(Object input) { if (fStructurePane != null) { fStructurePane.setInput(input); ((Splitter)fControl).layout(); } }
@Override public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(OutlineViewerCreator.PROP_INPUT)) { fStructurePane.setInput(event.getNewValue()); ((Splitter)fControl).layout(); } }
public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals(OutlineViewerCreator.PROP_INPUT)) { fStructurePane.setInput(event.getNewValue()); ((Splitter)fControl).layout(); } }
/** * Sets the visibility of the given child in this Splitter. If this change * affects the visibility state of the whole Splitter, and if the Splitter * is directly nested in one or more Splitters, this method recursively * propagates the new state upward. * * @param child the child control for which the visibility is changed * @param visible the new visibility state */ public void setVisible(Control child, boolean visible) { boolean wasEmpty= isEmpty(); child.setVisible(visible); child.setData(VISIBILITY, Boolean.valueOf(visible)); if (wasEmpty != isEmpty()) { // recursively walk up Composite parent= getParent(); if (parent instanceof Splitter) { Splitter sp= (Splitter) parent; sp.setVisible(this, visible); sp.layout(); } } else { layout(); } }
/** * Sets the visibility of the given child in this Splitter. If this change * affects the visibility state of the whole Splitter, and if the Splitter * is directly nested in one or more Splitters, this method recursively * propagates the new state upward. * * @param child the child control for which the visibility is changed * @param visible the new visibility state */ public void setVisible(Control child, boolean visible) { boolean wasEmpty= isEmpty(); child.setVisible(visible); child.setData(VISIBILITY, new Boolean(visible)); if (wasEmpty != isEmpty()) { // recursively walk up Composite parent= getParent(); if (parent instanceof Splitter) { Splitter sp= (Splitter) parent; sp.setVisible(this, visible); sp.layout(); } } else { layout(); } }
@Override public void setMaximizedControl(Control control) { if (control == null || control == getMaximizedControl()) super.setMaximizedControl(null); else super.setMaximizedControl(control); // recursively walk upward Composite parent= getParent(); if (parent instanceof Splitter) ((Splitter) parent).setMaximizedControl(this); layout(true); }
public void setMaximizedControl(Control control) { if (control == null || control == getMaximizedControl()) super.setMaximizedControl(null); else super.setMaximizedControl(control); // recursively walk upward Composite parent= getParent(); if (parent instanceof Splitter) ((Splitter) parent).setMaximizedControl(this); else layout(true); }
public void createControl(Composite parent) { final Splitter h= new Splitter(parent, SWT.HORIZONTAL); fStructurePane= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) { protected Viewer getViewer(Viewer oldViewer, Object input) { if (input instanceof ICompareInput) return findStructureViewer(oldViewer, (ICompareInput)input, this); return null; } }; h.setVisible(fStructurePane, true); fControl = h; IPageSite site = getSite(); site.setSelectionProvider(fStructurePane); h.layout(); reset(); }
@Override public void createControl(Composite parent) { final Splitter h= new Splitter(parent, SWT.HORIZONTAL); fStructurePane= new CompareViewerSwitchingPane(h, SWT.BORDER | SWT.FLAT, true) { @Override protected Viewer getViewer(Viewer oldViewer, Object input) { if (input instanceof ICompareInput) return findStructureViewer(oldViewer, (ICompareInput)input, this); return null; } }; h.setVisible(fStructurePane, true); fControl = h; IPageSite site = getSite(); site.setSelectionProvider(fStructurePane); h.layout(); reset(); }
fComposite.setWeights(new int[] { 30, 70 }); fComposite.layout();