mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-21 02:11:29 +00:00
Update toolwindow UI (#290)
This commit is contained in:
parent
3797126de4
commit
1df20ccb86
38 changed files with 538 additions and 356 deletions
|
|
@ -31,16 +31,21 @@ import javax.swing.event.HyperlinkListener;
|
|||
public class UIUtil {
|
||||
|
||||
public static JTextPane createTextPane(String text) {
|
||||
return createTextPane(text, UIUtil::handleHyperlinkClicked);
|
||||
return createTextPane(text, true);
|
||||
}
|
||||
|
||||
public static JTextPane createTextPane(String text, HyperlinkListener listener) {
|
||||
public static JTextPane createTextPane(String text, boolean opaque) {
|
||||
return createTextPane(text, opaque, UIUtil::handleHyperlinkClicked);
|
||||
}
|
||||
|
||||
public static JTextPane createTextPane(String text, boolean opaque, HyperlinkListener listener) {
|
||||
var textPane = new JTextPane();
|
||||
textPane.putClientProperty(JTextPane.HONOR_DISPLAY_PROPERTIES, true);
|
||||
textPane.addHyperlinkListener(listener);
|
||||
textPane.setContentType("text/html");
|
||||
textPane.setEditable(false);
|
||||
textPane.setText(text);
|
||||
textPane.setOpaque(opaque);
|
||||
return textPane;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue