mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-21 11:05:59 +00:00
Clean up BaseChatToolWindowTabPanel code
This commit is contained in:
parent
bfd50b18ad
commit
c3da76f2bd
16 changed files with 450 additions and 400 deletions
|
|
@ -22,12 +22,17 @@ import javax.swing.event.HyperlinkListener;
|
|||
|
||||
public class SwingUtils {
|
||||
|
||||
public static JTextPane createTextPane(HyperlinkListener listener) {
|
||||
public static JTextPane createTextPane(String text) {
|
||||
return createTextPane(text, SwingUtils::handleHyperlinkClicked);
|
||||
}
|
||||
|
||||
public static JTextPane createTextPane(String text, 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);
|
||||
return textPane;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue