Domanda

I have an Eclipse plugin with a description and three text fields.

However, I would like to add a group of three radio buttons that perform specific actions on changing the selected choice. I would also like to have a hyperlink to an information page where people can click it and be directed to their browser for viewing the information.

The library org.eclipse.jface.preference does not seem to contain such classes and functions.

Would it be possible to guide me to the appropriate resources or give me any hints on how to do that using the Eclipse libraries? I would like to have labels, links, buttons, all in the preferences page.

È stato utile?

Soluzione

You can use org.eclipse.swt.widgets.Link to add a hyperlink to a preference page (or any other dialog or wizard):

final Link link = new Link(parent, SWT.NONE);
link.setText("text");
link.setLayoutData(your layour data);

link.addSelectionListener(new SelectionAdapter() {
  @Override
  public void widgetSelected(final SelectionEvent e)
  {
    // TODO deal with hyperlink selection
  }
});
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top