1

我正在创建一个 XML 编辑器。我希望 JeditorPane 具有根据节点展开的折叠功能。如果有人知道该怎么做,请告诉...

4

2 回答 2

1

你可能会看,正如这个答案org.netbeans.swing.outline中所讨论的那样。因为extends ,自定义渲染相对容易。我把 a放在左边,把 a放在 a 的右边;使用 a相应地更新。OutlineJTableOutlineJEditorPaneJSplitPaneListSelectionListenerJEditorPane

于 2010-10-15T21:05:32.920 回答
1

这是折叠代码的一个例子。 http://java-sl.com/collapse_area.html 和 XMLEditorKit 的另一个例子(带有扩展/折叠节点) http://java-sl.com/xml_editor_kit.html

问候,斯塔斯

于 2010-10-31T07:25:14.053 回答