use of org.jboss.tools.openshift.internal.ui.server.ResourceDetailViews in project jbosstools-openshift by jbosstools.
the class ResourceSummaryDialog method createResourceDetails.
private void createResourceDetails(StructuredViewer viewer, Composite parent) {
ScrolledComposite scrolledComposite = new ScrolledComposite(parent, SWT.V_SCROLL | SWT.H_SCROLL);
scrolledComposite.setExpandHorizontal(true);
scrolledComposite.setExpandVertical(true);
ExpandableComposite expandable = new ExpandableComposite(scrolledComposite, SWT.None);
scrolledComposite.setContent(expandable);
expandable.setText("Resource Details");
expandable.setExpanded(true);
expandable.setLayout(new FillLayout());
Composite detailsContainer = new Composite(expandable, SWT.NONE);
expandable.setClient(detailsContainer);
expandable.addExpansionListener(new ExpansionAdapter() {
@Override
public void expansionStateChanged(ExpansionEvent e) {
parent.update();
parent.layout(true);
}
});
DataBindingContext dbc = new DataBindingContext();
IViewerObservableValue<Object> selectedResource = ViewerProperties.singlePostSelection().observe(viewer);
new ResourceDetailViews(selectedResource, detailsContainer, dbc).createControls();
}
Aggregations