简体   繁体   English

Java / swing:控制台组件?

[英]Java/swing: console component?

I am looking for a component I can use in Swing that acts as a GUI console which 我正在寻找一个可以在Swing中使用的组件,它充当GUI控制台

  • has a text area with scrollbars that can be set to a particular font 有一个带滚动条的文本区域,可以设置为特定的字体
  • has an InputStream and an OutputStream that a host application can obtain 具有主机应用程序可以获取的InputStream和OutputStream
  • accepts keyboard input, prints it onto the end of the console text, and sends that input to the InputStream 接受键盘输入,将其打印到控制台文本的末尾,并将该输入发送到InputStream
  • prints the OutputStream text to the end of the console 将OutputStream文本打印到控制台的末尾
  • has some kind of FIFO-ish property whereby the amount of text displayed in the console can be limited by automatically discarding the oldest text, when appropriate 具有某种FIFO-ish属性,通过在适当时自动丢弃最旧的文本,可以限制控制台中显示的文本量
  • allows copy (but not cut or paste or any other editing) of the console text to the system clipboard 允许将控制台文本复制(但不能剪切或粘贴或任何其他编辑)到系统剪贴板

This is kind of like the Console tab in Eclipse. 这有点像Eclipse中的Console选项卡。

Are there any good libraries that provide this? 有没有好的图书馆提供这个?

Here is an in-development open source library that does most of what is needed for a console: 这是一个开发中的开源库,可以完成控制台所需的大部分工作:

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM