com.sshtools.terminal
Interface StatusBar

All Superinterfaces:
TerminalComponent
All Known Implementing Classes:
AWTStatusBar, SwingStatusBar

public interface StatusBar
extends TerminalComponent

Extended interface for a TerminalComponent that is suitable for use with components that provide some kind off status bar made up of many different StatusElement implementations. For example, the Swing terminal toolkit provides a component that will show each element as a label that appears slighly indented.

Each element must provide a 'weight' that determines the proportion of the entire StatusBar it will take up. For ease of use, the weight value should follow the same rules as for the standard AWT java.awt.GridBagConstratins.weightx.

Version:
$Revision: 1.1 $
Author:
$Author: richard $

Method Summary
 void addElement(StatusElement element)
          Add an element to the status bar.
 void removeAllElements()
          Remove all of the status elements from the status bar.
 
Methods inherited from interface com.sshtools.terminal.TerminalComponent
getComponent, getTerminalDisplay, init
 

Method Detail

addElement

public void addElement(StatusElement element)
                throws java.lang.IllegalArgumentException
Add an element to the status bar. The status bar may impose restrictions on the type of this element, such as it being an instance of a java.awt.Component in the case of SwingStatusBar and AWTStatusBar.

Parameters:
element - element to add
Throws:
java.lang.IllegalArgumentException - if element is of wrong type

removeAllElements

public void removeAllElements()
Remove all of the status elements from the status bar.



Copyright © 2003-2004 3SP LTD. All Rights Reserved.