You can achieve some of those goals by executing JavaScript
when the Button
is pressed.
Here is an example for the print dialog:
public static void main(String[] args)
{
Display display = Display.getDefault();
final Shell shell = new Shell(display);
shell.setText("StackOverflow");
shell.setLayout(new GridLayout(1, false));
final Browser browser = new Browser(shell, SWT.NONE);
browser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
Button button = new Button(shell, SWT.PUSH);
button.setText("Search");
button.addListener(SWT.Selection, new Listener()
{
@Override
public void handleEvent(Event arg0)
{
browser.execute("window.print()");
}
});
shell.pack();
shell.setSize(600, 400);
shell.open();
while (!shell.isDisposed())
{
if (!display.readAndDispatch())
display.sleep();
}
display.dispose();
}
Just search online how to achieve the other functionalities that you want to add by using javascript.