Class SshToolsApplicationPanel

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible
Direct Known Subclasses:
SshToolsApplicationClientPanel, SshToolsApplicationSessionPanel

public abstract class SshToolsApplicationPanel extends JPanel
Version:
$Revision: 1.23 $
Author:
$author$
See Also:
  • Field Details

    • log

      protected org.apache.commons.logging.Log log
    • application

      protected SshToolsApplication application
    • toolBar

      protected JToolBar toolBar
    • contextMenu

      protected JPopupMenu contextMenu
    • container

      protected SshToolsApplicationContainer container
    • actions

      protected Vector actions
    • actionsVisible

      protected HashMap actionsVisible
    • toolsVisible

      protected boolean toolsVisible
    • actionMenus

      protected Vector actionMenus
  • Constructor Details

    • SshToolsApplicationPanel

      public SshToolsApplicationPanel()
      Creates a new SshToolsApplicationPanel object.
    • SshToolsApplicationPanel

      public SshToolsApplicationPanel(LayoutManager mgr)
      Creates a new SshToolsApplicationPanel object.
      Parameters:
      mgr -
  • Method Details

    • canClose

      public abstract boolean canClose()
      Called by the application framework to test the closing state
      Returns:
    • close

      public abstract void close()
      Called by the application framework to close the panel
    • setAvailableActions

      public abstract void setAvailableActions()
      Called by the application framework when a change in connection state has occured. The available actions should be enabled/disabled in this methods implementation
    • setActionVisible

      public void setActionVisible(String name, boolean visible)
      Set an actions visible state
      Parameters:
      name -
      visible -
    • getContainer

      public SshToolsApplicationContainer getContainer()
      Gets the container for this panel.
      Returns:
    • setContainer

      public void setContainer(SshToolsApplicationContainer container)
      Sets the container for this panel
      Parameters:
      container -
    • registerActionMenu

      public void registerActionMenu(SshToolsApplicationPanel.ActionMenu actionMenu)
      Register a new menu
      Parameters:
      actionMenu -
    • getActionMenu

      public SshToolsApplicationPanel.ActionMenu getActionMenu(String actionMenuName)
      Gets a menu by name
      Parameters:
      actionMenuName -
      Returns:
    • getAction

      public StandardAction getAction(String name)
      Get an action by name
      Parameters:
      name -
      Returns:
    • deregisterAction

      public void deregisterAction(StandardAction action)
      Deregister an action
      Parameters:
      action -
    • registerAction

      public void registerAction(StandardAction action)
      Register a new action
      Parameters:
      action -
    • init

      public void init(SshToolsApplication application) throws SshToolsApplicationException
      Initialize the panel
      Parameters:
      application -
      Throws:
      SshToolsApplicationException
    • showOptions

      public void showOptions()
      Show the options dialog
    • rebuildActionComponents

      public void rebuildActionComponents()
      Rebuild all the action components such as toobar, context menu
    • isToolsVisible

      public boolean isToolsVisible()
      Determine if the toolbar, menu and statusbar are visible
      Returns:
    • addFavorite

      public void addFavorite(StandardAction action)
    • setMenuBarVisible

      public void setMenuBarVisible(boolean visible)
      Set the visible state of the menu bar
      Parameters:
      visible -
    • setToolBarVisible

      public void setToolBarVisible(boolean visible)
      Set the visible state of the toolbar
      Parameters:
      visible -
    • setStatusBarVisible

      public void setStatusBarVisible(boolean visible)
      Set the visible state of the statusbar
      Parameters:
      visible -
    • setToolsVisible

      public void setToolsVisible(boolean visible)
      Set the visible state of all tools. This will set the toolbar, menu and status bar visible states to the value provided.
      Parameters:
      visible -
    • showExceptionMessage

      public void showExceptionMessage(String title, String message)
      Show an exception message
      Parameters:
      title -
      message -
    • showErrorMessage

      public static void showErrorMessage(Component parent, String title, Throwable exception)
      Show an error message with detail
      Parameters:
      parent -
      title -
      exception -
    • showErrorMessage

      public static void showErrorMessage(Component parent, String mesg, String title, Throwable exception)
      Show an error message with toggable detail
      Parameters:
      parent -
      mesg -
      title -
      exception -
    • isConnected

      public abstract boolean isConnected()
      Returns the connected state of the panel
      Returns:
    • setContainerTitle

      public void setContainerTitle(File file)
      Set the title of the container
      Parameters:
      file -
    • getToolBar

      public JToolBar getToolBar()
      Gets the toolbar
      Returns:
    • getContextMenu

      public JPopupMenu getContextMenu()
      Get the context menu
      Returns:
    • getJMenuBar

      public JMenuBar getJMenuBar()
      Get the main menu
      Returns:
    • getStatusBar

      public StatusBar getStatusBar()
      Get the status bar
      Returns:
    • getApplication

      public SshToolsApplication getApplication()
      Get the application attached to the panel
      Returns:
    • getIcon

      public abstract ResourceIcon getIcon()
      Get the icon for the panel
      Returns: