Class SSHPanel

    • Field Detail

      • m_TextRemote

        protected BaseTextField m_TextRemote
        the remote server.
      • m_SpinnerPort

        protected JSpinner m_SpinnerPort
        the port.
      • m_ButtonConnection

        protected BaseButton m_ButtonConnection
        for connecting/disconnecting.
      • m_FileChooserPanelKnownHosts

        protected FileChooserPanel m_FileChooserPanelKnownHosts
        the file panel for the known hosts.
      • m_PanelAuthentication

        protected JPanel m_PanelAuthentication
        the authentication panel.
      • m_FileChooserPanelKey

        protected FileChooserPanel m_FileChooserPanelKey
        the file panel for the key.
      • m_TextUser

        protected BaseTextField m_TextUser
        the text field for the user.
      • m_ButtonClear

        protected BaseButton m_ButtonClear
        the button for clearing the output.
      • m_ButtonCopy

        protected BaseButton m_ButtonCopy
        the button for copying the selected output.
      • m_TextCommand

        protected BaseTextField m_TextCommand
        the text field for the command to issue.
      • m_ButtonCommand

        protected BaseButton m_ButtonCommand
        the button for executing the command.
      • m_Session

        protected com.jcraft.jsch.Session m_Session
        the ssh session.
      • m_Channel

        protected com.jcraft.jsch.Channel m_Channel
        the channel.
      • m_CommandHistory

        protected List<String> m_CommandHistory
        the command history.
      • m_CommandIndex

        protected int m_CommandIndex
        the current command index.
      • m_Logger

        protected Logger m_Logger
        the logger in use.
      • m_AttributeSetCmd

        protected SimpleAttributeSet m_AttributeSetCmd
        the attributeset for commands.
      • m_AttributeSetRemote

        protected SimpleAttributeSet m_AttributeSetRemote
        the attributeset for remote output.
      • m_AttributeSetError

        protected SimpleAttributeSet m_AttributeSetError
        the attributeset for errors.
    • Constructor Detail

      • SSHPanel

        public SSHPanel()
    • Method Detail

      • initialize

        protected void initialize()
        Description copied from class: BasePanel
        For initializing members.
        Overrides:
        initialize in class BasePanel
      • initGUI

        protected void initGUI()
        For initializing the GUI.
        Overrides:
        initGUI in class BasePanel
      • finishInit

        protected void finishInit()
        Finalizes the initialization.
        Overrides:
        finishInit in class BasePanel
      • previousCommand

        protected void previousCommand()
        Places the previous command in the command text field, if available.
      • nextCommand

        protected void nextCommand()
        Places the next command in the command text field, if available.
      • append

        protected void append​(String msg,
                              AttributeSet a)
        Appends the msg to the output text area.
        Parameters:
        msg - the text to append
      • canConnect

        protected boolean canConnect()
        Checks whether we can connect to a server.
        Returns:
        true if we can connect
      • handleConnectionEvent

        protected void handleConnectionEvent()
        Connects or disconnects the client.
      • execCommand

        protected void execCommand()
        Executes, if possible, the currently entered command.
      • updateButtons

        protected void updateButtons()
        Updates the status/text of the buttons.
      • setRemote

        public void setRemote​(String value)
        Sets the remote server.
        Parameters:
        value - the server
      • getRemote

        public String getRemote()
        Returns the current remote server.
        Returns:
        the server
      • setPort

        public void setPort​(int value)
        Sets the port to use.
        Parameters:
        value - the port
      • getPort

        public int getPort()
        Returns the currently set port.
        Returns:
        the port
      • isConnected

        public boolean isConnected()
        Returns whether we're currently have a session running.
        Returns:
        true if connected
      • clear

        public void clear()
        Clears the output.