當前位置: 首頁>>代碼示例>>Java>>正文


Java TabbedTerminalWidget類代碼示例

本文整理匯總了Java中com.jediterm.terminal.ui.TabbedTerminalWidget的典型用法代碼示例。如果您正苦於以下問題:Java TabbedTerminalWidget類的具體用法?Java TabbedTerminalWidget怎麽用?Java TabbedTerminalWidget使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


TabbedTerminalWidget類屬於com.jediterm.terminal.ui包,在下文中一共展示了TabbedTerminalWidget類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: createTerminalInContentPanel

import com.jediterm.terminal.ui.TabbedTerminalWidget; //導入依賴的package包/類
private Content createTerminalInContentPanel(@NotNull AbstractTerminalRunner terminalRunner,
                                             final @NotNull ToolWindow toolWindow) {
  SimpleToolWindowPanel panel = new SimpleToolWindowPanel(false, true);

  final Content content = ContentFactory.SERVICE.getInstance().createContent(panel, "", false);
  content.setCloseable(true);

  myTerminalWidget = terminalRunner.createTerminalWidget(content);
  myTerminalWidget.addTabListener(new TabbedTerminalWidget.TabListener() {
    @Override
    public void tabClosed(JediTermWidget terminal) {
      UIUtil.invokeLaterIfNeeded(new Runnable() {
        @Override
        public void run() {
          if (myTerminalWidget != null) {
            hideIfNoActiveSessions(toolWindow, myTerminalWidget);
          }
        }
      });
    }
  });

  panel.setContent(myTerminalWidget.getComponent());
  panel.addFocusListener(createFocusListener());

  ActionToolbar toolbar = createToolbar(terminalRunner, myTerminalWidget, toolWindow);
  toolbar.getComponent().addFocusListener(createFocusListener());
  toolbar.setTargetComponent(panel);
  panel.setToolbar(toolbar.getComponent());


  content.setPreferredFocusableComponent(myTerminalWidget.getComponent());

  return content;
}
 
開發者ID:jskierbi,項目名稱:intellij-ce-playground,代碼行數:36,代碼來源:TerminalView.java

示例2: createTerminalInContentPanel

import com.jediterm.terminal.ui.TabbedTerminalWidget; //導入依賴的package包/類
private Content createTerminalInContentPanel(@Nullable LocalTerminalDirectRunner terminalRunner,
        final @NotNull ToolWindow toolWindow)
{
    SimpleToolWindowPanel panel = new SimpleToolWindowPanel(false, true)
    {
        @Override
        public Object getData(@NotNull Key<?> dataId)
        {
            return PlatformDataKeys.HELP_ID == dataId ? EventLog.HELP_ID : super.getData(dataId);
        }
    };

    final Content content = ContentFactory.getInstance().createContent(panel, "", false);
    content.setCloseable(true);

    myTerminalWidget = terminalRunner.createTerminalWidget(content);
    myTerminalWidget.addTabListener(new TabbedTerminalWidget.TabListener()
    {
        @Override
        public void tabClosed(JediTermWidget terminal)
        {
            UIUtil.invokeLaterIfNeeded(new Runnable()
            {
                @Override
                public void run()
                {
                    if(myTerminalWidget != null)
                    {
                        hideIfNoActiveSessions(toolWindow, myTerminalWidget);
                    }
                }
            });
        }
    });

    panel.setContent(myTerminalWidget.getComponent());
    panel.addFocusListener(createFocusListener());

    ActionToolbar toolbar = createToolbar(terminalRunner, myTerminalWidget, toolWindow);
    toolbar.getComponent().addFocusListener(createFocusListener());
    toolbar.setTargetComponent(panel);
    panel.setToolbar(toolbar.getComponent());


    content.setPreferredFocusableComponent(myTerminalWidget.getComponent());

    return content;
}
 
開發者ID:consulo,項目名稱:consulo-terminal,代碼行數:49,代碼來源:TerminalView.java


注:本文中的com.jediterm.terminal.ui.TabbedTerminalWidget類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。