use of org.jdesktop.swingx.JXHyperlink in project azure-tools-for-java by Microsoft.
the class SignInWindow method doHelpAction.
@Override
public void doHelpAction() {
final JXHyperlink helpLink = new JXHyperlink();
helpLink.setURI(URI.create("https://docs.microsoft.com/en-us/azure/azure-toolkit-for-intellij-sign-in-instructions"));
helpLink.doClick();
}
use of org.jdesktop.swingx.JXHyperlink in project zaproxy by zaproxy.
the class OptionsCertificatePanel method showErrorMessageSunPkcs11ProviderNotAvailable.
private void showErrorMessageSunPkcs11ProviderNotAvailable() {
final String sunReference = Constant.messages.getString("options.cert.error.pkcs11notavailable.sun.hyperlink");
final String ibmReference = Constant.messages.getString("options.cert.error.pkcs11notavailable.ibm.hyperlink");
Object[] hyperlinks = new Object[2];
try {
JXHyperlink hyperlinkLabel = new JXHyperlink();
hyperlinkLabel.setURI(URI.create(sunReference));
hyperlinkLabel.setText(Constant.messages.getString("options.cert.error.pkcs11notavailable.sun.hyperlink.text"));
hyperlinks[0] = hyperlinkLabel;
hyperlinkLabel = new JXHyperlink();
hyperlinkLabel.setURI(URI.create(ibmReference));
hyperlinkLabel.setText(Constant.messages.getString("options.cert.error.pkcs11notavailable.ibm.hyperlink.text"));
hyperlinks[1] = hyperlinkLabel;
} catch (UnsupportedOperationException e) {
// Show plain text instead of a hyperlink if the current platform doesn't support
// Desktop.
hyperlinks[0] = sunReference;
hyperlinks[1] = ibmReference;
}
JOptionPane.showMessageDialog(null, new Object[] { Constant.messages.getString("options.cert.error"), Constant.messages.getString("options.cert.error.pkcs11notavailable"), hyperlinks }, Constant.messages.getString("options.cert.label.client.cert"), JOptionPane.ERROR_MESSAGE);
}
use of org.jdesktop.swingx.JXHyperlink in project cuba by cuba-platform.
the class WindowBreadCrumbs method update.
public void update() {
removeAll();
btn2win.clear();
for (Iterator<Window> it = windows.iterator(); it.hasNext(); ) {
Window window = it.next();
JButton button = new JXHyperlink();
button.setFocusable(false);
button.setText(StringUtils.trimToEmpty(window.getCaption()));
button.addActionListener(new ValidationAwareActionListener() {
@Override
public void actionPerformedAfterValidation(ActionEvent e) {
JButton btn = (JButton) e.getSource();
Window win = btn2win.get(btn);
if (win != null) {
fireListeners(win);
}
}
});
btn2win.put(button, window);
if (it.hasNext()) {
add(button);
JLabel separatorLab = new JLabel(">");
add(separatorLab);
} else {
add(new JLabel(window.getCaption()));
}
}
}
use of org.jdesktop.swingx.JXHyperlink in project cuba by cuba-platform.
the class DesktopTableCellEditor method assignBorder.
private void assignBorder(JTable table, boolean isSelected, boolean hasFocus, JComponent jcomponent) {
if (isTextField(jcomponent)) {
// looks like simple label when with empty border
} else if (border != null) {
jcomponent.setBorder(border);
} else if (isLookupField(jcomponent) || isDateField(jcomponent) || jcomponent instanceof JXHyperlink) {
// empty borders for fields except text fields in tables
jcomponent.setBorder(new EmptyBorder(0, 0, 0, 0));
} else {
if (hasFocus) {
Border border = null;
if (isSelected) {
border = UIManager.getDefaults().getBorder("Table.focusSelectedCellHighlightBorder");
}
if (border == null) {
border = UIManager.getDefaults().getBorder("Table.focusCellHighlightBorder");
}
jcomponent.setBorder(border);
} else {
jcomponent.setBorder(getNoFocusBorder(jcomponent, table));
}
}
}
use of org.jdesktop.swingx.JXHyperlink in project azure-tools-for-java by Microsoft.
the class RemoteDebuggingClientDialog method doHelpAction.
@Override
protected void doHelpAction() {
sendTelemetry(HELP_CODE);
JXHyperlink link = new JXHyperlink();
link.setURI(URI.create("https://github.com/Azure/azure-websites-java-remote-debugging"));
link.doClick();
//super.doHelpAction();
}
Aggregations