Ejemplo n.º 1
0
  public Dimension requestResize(
      final Dimension newSize,
      final RequestOrigin origin,
      int cursorY,
      JediTerminal.ResizeHandler resizeHandler) {
    if (!newSize.equals(myTermSize)) {
      myTerminalTextBuffer.lock();
      try {
        myTerminalTextBuffer.resize(newSize, origin, cursorY, resizeHandler, mySelection);
        myTermSize = (Dimension) newSize.clone();

        final Dimension pixelDimension = new Dimension(getPixelWidth(), getPixelHeight());

        setPreferredSize(pixelDimension);
        if (myTerminalPanelListener != null) {
          myTerminalPanelListener.onPanelResize(pixelDimension, origin);
        }
        SwingUtilities.invokeLater(
            new Runnable() {
              @Override
              public void run() {
                updateScrolling();
              }
            });
      } finally {
        myTerminalTextBuffer.unlock();
      }
    }

    return new Dimension(getPixelWidth(), getPixelHeight());
  }
Ejemplo n.º 2
0
 @Override
 public void setWindowTitle(String name) {
   myWindowTitle = name;
   if (myTerminalPanelListener != null) {
     myTerminalPanelListener.onTitleChanged(myWindowTitle);
   }
 }