// Left and right tool bar
- private final ToolBar bar1, bar2, bar3;
+ private final ToolBar bar1, bar2, termLookupBar;
// Control to change brush size
private final BrushControl brushControl;
painters = new PainterRegistry();
bar1 = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
bar2 = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
- bar3 = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
+ termLookupBar = new ToolBar(this, SWT.RIGHT | SWT.FLAT);
view = new AnnotatedImageControl(this, SWT.BORDER);
brushControl = new BrushControl(getShell(), SWT.BORDER);
eventHandler = new EventHandler();
initTools();
createToolbar1();
createToolbar2();
- createToolbar3();
+ createToolTermLookupBar();
+ //createToolTermDetailPanel();
layoutControls();
updatePainters();
addListeners();
});
bar2.pack();
}
+
/**
* Third tool bar for holding the Annotate Combo box.
*/
- private void createToolbar3() {
- SwtUtils.addLabel(bar3, getAction(Tool.SetLabel).getText());
- comboLabel = SwtUtils.addCombo(bar3, 150, SWT.SIMPLE);
+ private void createToolTermLookupBar() {
+ SwtUtils.addLabel(termLookupBar, getAction(Tool.SetLabel).getText());
+ comboLabel = SwtUtils.addCombo(termLookupBar, 150, SWT.SIMPLE);
comboLabel.setToolTipText( getAction(Tool.SetLabel).getToolTipText());
comboLabel.addKeyListener(new KeyAdapter() {
public void keyReleased(KeyEvent e) {
dropdownLabels(e);
}
});
- assign = SwtUtils.addButton(bar3, 50, "Assign");
+ assign = SwtUtils.addButton(termLookupBar, 52, "Assign");
assign.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent arg0) {
if(view.getContext().isEnabled())
if(comboLabel.getText().indexOf('{') != -1)
{
view.getContext().getEnabledMask().segmentName = comboLabel.getText().substring(0,comboLabel.getText().indexOf('{')-1);
+ view.getContext().getEnabledMask().accessionId = comboLabel.getText().substring(comboLabel.getText().indexOf('{')+1,comboLabel.getText().length()-1);
}
else
{
execute(Tool.AssignButton, null);
}
});
- bar3.pack();
+ termLookupBar.pack();
}
/**
gd.verticalAlignment = SWT.FILL;
view.setLayoutData(gd);
- // Layout toolbar 3
+ // Layout right panel
gd = new GridData();
gd.horizontalAlignment = SWT.FILL;
gd.verticalAlignment = GridData.BEGINNING;
gd.verticalIndent = 1;
gd.verticalSpan = 2;
- bar3.setLayoutData(gd);
+ termLookupBar.setLayoutData(gd);
}