|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sshtools.terminal.swing.SwingComponentTerminalComponentAdapter
Implementation of a TerminalComponent that wraps a Swing component
so it can be added to a Terminal.
This could be used for example to add a JLabel to a terminal
displaying some text
AWTComponentTerminalComponentAdapter adapter =
new AWTComponentTerminalComponentAdapter(
new JLabel("Your are currently connected to foo.3sp.com"));
terminal.addTerminalComponent(adapter, BorderLayout.NORTH, 0);
| Constructor Summary | |
SwingComponentTerminalComponentAdapter(javax.swing.JComponent component)
Construct a new SwingComponentTerminalComponentAdapter given a Component to wrap |
|
| Method Summary | |
java.awt.Component |
getComponent()
Return the AWT / Swing component this terminal component provides. |
Terminal |
getTerminalDisplay()
Return the TerminalDisplay this componet has been added to. |
void |
init(Terminal display)
Invoked when the terminal adds the component to its UI. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public SwingComponentTerminalComponentAdapter(javax.swing.JComponent component)
component - | Method Detail |
public void init(Terminal display)
TerminalComponent
init in interface TerminalComponentdisplay - display implementationpublic Terminal getTerminalDisplay()
TerminalComponentTerminalDisplay this componet has been added to.
Before init(TerminalDisplay) is called this method should
return null.
getTerminalDisplay in interface TerminalComponentpublic java.awt.Component getComponent()
TerminalComponentnull
getComponent in interface TerminalComponent
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||