0
在我的应用程序中我有一个对话框,我把文本控制台查看器。在文本控制台查看器中有一些文本。我可以将一些文本作为超链接。任何指针都会被赞赏。如何将超链接文本添加到TextConsoleViewer?
代码:
console = new MessageConsole("Try", null, false);
outputStream = console.newMessageStream();
Composite viewerParent = new Composite(container, SWT.NONE);
GridLayout layout2 = new GridLayout();
layout2.marginBottom = layout2.marginHeight = layout2.marginLeft = layout2.marginRight = layout2.marginTop = layout2.marginWidth = 1;
viewerParent.setLayout(layout2);
viewerParent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
viewer = new TextConsoleViewer(viewerParent, console);
viewer.setEditable(false);
viewer.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
你在说什么文本控制台查看器? Eclipse的TextConsoleViewer? Swing的JTextArea/JEditorPane? – hotforfeature
我把它标记为swt,这意味着它是从swt不是从秋千..我是ryt .. – Rajesh