public interface TabbedContent
// create a tab with a checkbox. The checkbox text is whatever concept is selected in the UI
TabbedContent tc = new TabbedContent() {
private Composite c;
private Button b;
public void conceptSelected(ResolvedConceptReference rcr) {
b.setText(rcr.getConceptCode() + ": " + rcr.getEntityDescription().getContent());
}
public Control getControl() {
if (b == null) {
b = new Button(c, SWT.CHECK);
}
return b;
}
public String getTabName() {
return "Checkbox Tab";
}
public void setParentComposite(Composite c) {
this.c = c;
}
};
Modifier and Type | Method and Description |
---|---|
void |
conceptSelected(ResolvedConceptReference rcr)
Notifies the implentor that the concept identified by rcr has been
selected in the left-side pane of the UI.
|
org.eclipse.swt.widgets.Control |
getControl()
Returns the Control that is placed in the tab
|
java.lang.String |
getTabName()
Returns the name of the tab.
|
void |
setParentComposite(org.eclipse.swt.widgets.Composite c)
This method will be called before getControl so that the implementing
class can create a control that has the correct parent.
|
void conceptSelected(ResolvedConceptReference rcr)
rcr
- the ResolvedConceptReference that has been selected in the
left side pane of the UI.java.lang.String getTabName()
org.eclipse.swt.widgets.Control getControl()
void setParentComposite(org.eclipse.swt.widgets.Composite c)
c
- the Composite that is expected to be the parent of the control
retrieved from getControl.