本文整理汇总了Java中org.jdesktop.swingx.JXTextArea类的典型用法代码示例。如果您正苦于以下问题:Java JXTextArea类的具体用法?Java JXTextArea怎么用?Java JXTextArea使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
JXTextArea类属于org.jdesktop.swingx包,在下文中一共展示了JXTextArea类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createToolWindowContent
import org.jdesktop.swingx.JXTextArea; //导入依赖的package包/类
@Override
public void createToolWindowContent(Project project, ToolWindow toolWindow) {
final Document document = new PlainDocument();
final NetConsoleClient netConsole = new NetConsoleClient(document);
final JXTextArea textArea = new JXTextArea();
textArea.setDocument(document);
textArea.setEditable(false);
final DefaultActionGroup actionGroup = new DefaultActionGroup();
actionGroup.addAction(new AutoScrollAction(netConsole, textArea));
actionGroup.addAction(new ClearAction(netConsole));
actionGroup.addAction(new DisableAction(netConsole, textArea));
final SimpleToolWindowPanel netConsolePanel = new SimpleToolWindowPanel(false, false);
final ActionToolbar toolbar = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN,
actionGroup, false);
netConsolePanel.setToolbar(toolbar.getComponent());
netConsolePanel.setContent(new JBScrollPane(textArea));
final ContentFactory contentFactory = ContentFactory.SERVICE.getInstance();
final Content content = contentFactory.createContent(netConsolePanel, "", true);
toolWindow.getContentManager().addContent(content);
}
示例2: createTextArea
import org.jdesktop.swingx.JXTextArea; //导入依赖的package包/类
public static JXTextArea createTextArea(final String promptText) {
final JXTextArea ta = new JXTextArea(promptText);
ta.setColumns(17);
ta.setRows(6);
ta.setBorder(new CompoundBorder(WidgetUtils.BORDER_THIN, new EmptyBorder(2, 2, 2, 2)));
return ta;
}
示例3: setup
import org.jdesktop.swingx.JXTextArea; //导入依赖的package包/类
@Override
public void setup() {
textComponent = textArea = new JXTextArea();
}
示例4: AutoScrollAction
import org.jdesktop.swingx.JXTextArea; //导入依赖的package包/类
public AutoScrollAction(NetConsoleClient netConsole, JXTextArea console) {
super("AutoScroll", "Automatically scroll on input", AllIcons.RunConfigurations.Scroll_down);
this.netConsole = netConsole;
this.consoleComponent = console;
}