|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
adams.gui.core.BasePanel
adams.gui.tools.TelnetPanel
public class TelnetPanel
A simple telnet interface. Mainly used for testing.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
protected JButton |
m_ButtonClear
the button for clearing the output. |
protected JButton |
m_ButtonCommand
the button for executing the command. |
protected JButton |
m_ButtonConnection
for connecting/disconnecting. |
protected JButton |
m_ButtonCopy
the button for copying the selected output. |
protected org.apache.commons.net.telnet.TelnetClient |
m_Client
the telnet client. |
protected List<String> |
m_CommandHistory
the command history. |
protected int |
m_CommandIndex
the current command index. |
protected SpinnerNumberModel |
m_PortModel
the model of the spinner. |
protected JSpinner |
m_SpinnerPort
the port. |
protected JTextField |
m_TextCommand
the text field for the command to issue. |
protected BaseTextAreaWithButtons |
m_TextOutput
text area for the output. |
protected JTextField |
m_TextRemote
the remote server. |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TelnetPanel()
|
|
| Method Summary | |
|---|---|
protected void |
append(String msg)
Appends the msg to the output text area. |
protected boolean |
canConnect()
Checks whether we can connect to a server. |
protected void |
execCommand()
Executes, if possible, the currently entered command. |
protected void |
finishInit()
Finalizes the initialization. |
int |
getPort()
Returns the currently set port. |
String |
getRemote()
Returns the current remote server. |
protected void |
handleConnectionEvent()
Connects or disconnects the client. |
protected void |
initGUI()
For initializing the GUI. |
protected void |
initialize()
|
protected void |
nextCommand()
Places the next command in the command text field, if available. |
protected void |
previousCommand()
Places the previous command in the command text field, if available. |
void |
setPort(int value)
Sets the port to use. |
void |
setRemote(String value)
Sets the remote server. |
protected void |
updateButtons()
Updates the status/text of the buttons. |
| Methods inherited from class adams.gui.core.BasePanel |
|---|
afterHide, afterShow, beforeHide, beforeShow, closeParent, getParentChild, getParentDialog, getParentFrame, getParentInternalFrame, getParentTitle, main, setParentTitle, setVisible |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected JTextField m_TextRemote
protected SpinnerNumberModel m_PortModel
protected JSpinner m_SpinnerPort
protected JButton m_ButtonConnection
protected BaseTextAreaWithButtons m_TextOutput
protected JButton m_ButtonClear
protected JButton m_ButtonCopy
protected JTextField m_TextCommand
protected JButton m_ButtonCommand
protected org.apache.commons.net.telnet.TelnetClient m_Client
protected List<String> m_CommandHistory
protected int m_CommandIndex
| Constructor Detail |
|---|
public TelnetPanel()
| Method Detail |
|---|
protected void initialize()
initialize in class BasePanelprotected void initGUI()
initGUI in class BasePanelprotected void finishInit()
finishInit in class BasePanelprotected void previousCommand()
protected void nextCommand()
protected void append(String msg)
msg - the text to appendprotected boolean canConnect()
protected void handleConnectionEvent()
protected void execCommand()
protected void updateButtons()
public void setRemote(String value)
value - the serverpublic String getRemote()
public void setPort(int value)
value - the portpublic int getPort()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||