Search in sources :

Example 6 with JXHyperlink

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();
}
Also used : JXHyperlink(org.jdesktop.swingx.JXHyperlink)

Example 7 with JXHyperlink

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);
}
Also used : JXHyperlink(org.jdesktop.swingx.JXHyperlink)

Example 8 with JXHyperlink

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()));
        }
    }
}
Also used : Window(com.haulmont.cuba.gui.components.Window) ValidationAwareActionListener(com.haulmont.cuba.desktop.sys.validation.ValidationAwareActionListener) ActionEvent(java.awt.event.ActionEvent) JXHyperlink(org.jdesktop.swingx.JXHyperlink)

Example 9 with JXHyperlink

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));
        }
    }
}
Also used : JXHyperlink(org.jdesktop.swingx.JXHyperlink) EmptyBorder(javax.swing.border.EmptyBorder) Border(javax.swing.border.Border) EmptyBorder(javax.swing.border.EmptyBorder)

Example 10 with JXHyperlink

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();
}
Also used : JXHyperlink(org.jdesktop.swingx.JXHyperlink)

Aggregations

JXHyperlink (org.jdesktop.swingx.JXHyperlink)12 ActionEvent (java.awt.event.ActionEvent)3 File (java.io.File)2 AbstractAction (javax.swing.AbstractAction)2 ImportControllerUI (org.gephi.desktop.importer.api.ImportControllerUI)2 ValidationAwareActionListener (com.haulmont.cuba.desktop.sys.validation.ValidationAwareActionListener)1 Window (com.haulmont.cuba.gui.components.Window)1 ActionListener (java.awt.event.ActionListener)1 InputStream (java.io.InputStream)1 Action (javax.swing.Action)1 Border (javax.swing.border.Border)1 CompoundBorder (javax.swing.border.CompoundBorder)1 EmptyBorder (javax.swing.border.EmptyBorder)1 MostRecentFiles (org.gephi.desktop.mrufiles.api.MostRecentFiles)1 ProjectControllerUI (org.gephi.desktop.project.api.ProjectControllerUI)1 JXCollapsiblePane (org.jdesktop.swingx.JXCollapsiblePane)1 NotifyDescriptor (org.openide.NotifyDescriptor)1 FileObject (org.openide.filesystems.FileObject)1