public void getRole(AccessibleControlEvent e) {
e.detail = ACC.ROLE_STATUSBAR;
}
});
addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
handleDispose();
}
});
// StatusLineManager skips over the standard status line widgets
// in its update method. There is thus a dependency
// between this code defining the creation and layout of the standard
// widgets and the update method.
setLayout(new StatusLineLayout());
fMessageLabel = new CLabel(this, SWT.NONE);// SWT.SHADOW_IN);
// this would need extra work to make this accessible
// from the workbench command framework.
Menu menu = new Menu(fMessageLabel);
fMessageLabel.setMenu(menu);
copyMenuItem = new MenuItem(menu, SWT.PUSH);
copyMenuItem.setText(JFaceResources.getString("copy")); //$NON-NLS-1$
copyMenuItem.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
String text = fMessageLabel.getText();
if (text != null && text.length() > 0) {
text = LegacyActionTools.removeMnemonics(text);
Clipboard cp = new Clipboard(e.display);
cp.setContents(new Object[] { text },
new Transfer[] { TextTransfer.getInstance() });
cp.dispose();
}
}
});
fProgressIsVisible = false;
fCancelEnabled = false;
fToolBar = new ToolBar(this, SWT.FLAT);
fCancelButton = new ToolItem(fToolBar, SWT.PUSH);
fCancelButton.setImage(fgStopImage.createImage());
fCancelButton.setToolTipText(JFaceResources
.getString("Cancel_Current_Operation")); //$NON-NLS-1$
fCancelButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
setCanceled(true);
}
});
fCancelButton.addDisposeListener(new DisposeListener() {
public void widgetDisposed(DisposeEvent e) {
Image i = fCancelButton.getImage();
if ((i != null) && (!i.isDisposed())) {
i.dispose();
}