modules.ButtonBar.html

dw_fluffos_v1/lib/www/external/java/telnet/Documentation/Source/modules.ButtonBar.html · 10.6 KB

From the archive dw_fluffos_v1.tar.gz

Download the archive   « Back to the archive contents

<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Mon Feb 23 10:46:39 CET 1998 -->
<a name="_top_"></a>
<title>
  Class modules.ButtonBar
</title>
</head>
<body>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-modules.html">This Package</a>  <a href="modules.BSXModule.html#_top_">Previous</a>  <a href="modules.MudConnector.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class modules.ButtonBar
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.awt.Component.html#_top_">java.awt.Component</a>
           |
           +----<a href="java.awt.Container.html#_top_">java.awt.Container</a>
                   |
                   +----<a href="java.awt.Panel.html#_top_">java.awt.Panel</a>
                           |
                           +----modules.ButtonBar
</pre>
<hr>
<dl>
  <dt> public class <b>ButtonBar</b>
  <dt> extends <a href="java.awt.Panel.html#_top_">Panel</a>
  <dt> implements <a href="modules.Module.html#_top_">Module</a>
</dl>
This class implements a programmable button bar.
You can add <A HREF="#buttons">Buttons</A> and <A HREF="#fields">Input 
fields</A> to trigger actions in the <A HREF="telnet.html">telnet 
applet</A>. On how to load a module, please refer to the 
<A HREF="telnet.html">telnet</A> documentation.
<DL>
 <A NAME="buttons"></A>
 <DT><B>Buttons:</B>
 <DD><TT>&lt;PARAM NAME=<B><I>number</I></B>#Button VALUE=&quot;<B><I>buttontext</I></B>|<B><I>buttonaction</I></B>&quot;&gt;</TT>
 <DD><B><I>number</I></B> is the sequence number and determines the place
     of the button on the row.
     <P>
 <DD><B><I>buttontext</I></B> is a string displayed on the button.
     <P>
 <DD><A NAME="buttonaction"><B><I>buttonaction</I></B></A> may be one
     of the following functions or strings<BR>
     <FONT SIZE=-1>(<I>Note:</I> the backslash character
     in front of the dollar sign is mandatory!)</FONT>
     <UL>
      <LI><TT><I>simple text</I></TT>
          to be sent to the remote host. Newline and/or carriage return
          characters may be added in C syntax <B>\n</B> and <B>\r</B>.
          To support unimplemented function keys the <B>\e</B> escape
          character may be useful. The <B>\b</B> backspace character is
          also supported.
          The text may contain <A HREF="#fieldreference"><B><I>field 
          reference(s)</I></B></A>.
          <P>
      <LI><TT>\$connect(<B><I>host</I></B>[,<B><I>port</I></B>])</TT> 
          tries to initiate a connection to the <B><I>host</I></B>
          at the <B><I>port</I></B>, if given. The standard port is
          23. <B><I>host</I></B> and <B><I>port</I></B> may be hostname
          and number or <A HREF="#fieldreference"><B><I>field
          reference(s)</I></B></A>. If a connection already exists
          nothing will happen.<BR>
          <FONT SIZE=-1>(<I>Note:</I> It is not allowed to have
          spaces anywhere inside the parenthesis!)</FONT>
          <P>
      <LI><TT>\$disconnect()</TT>
          terminates the current connection, but if there was no
          connection nothing will happen.
          <P>
      <LI><TT>\$detach()</TT>
          detaches the applet from the web browser window and
          creates a new frame externally. This may be used to allow
          users to use the applet while browsing the web with the
          same browser window.<BR>
          <FONT SIZE=-1>(<I>Note:</I> You need to load the applet via the
          <A HREF="appWrapper.html">appWrapper class</A> or
          it will not work properly!)</FONT>
     </UL>
 <DD><B>Examples:</B><BR>
     <FONT SIZE=-1>(<I>Note:</I> It makes sense if you look at the
     examples for input fields below.)</FONT>
     <PRE>
       &lt;PARAM NAME=1#Button VALUE="HELP!|help\r\n"&gt;
       &lt;PARAM NAME=2#Button VALUE="HELP:|help \@help@\r\n"&gt;
       &lt;PARAM NAME=4#Button VALUE="simple|\$connect(localhost)"&gt;
       &lt;PARAM NAME=5#Button VALUE="complete|\$connect(www,4711)"&gt;
       &lt;PARAM NAME=6#Button VALUE="connect|\$connect(\@address@)"&gt;
       &lt;PARAM NAME=8#Button VALUE="connect to port|\$connect(\@address@,\@port@)"&gt;
       &lt;PARAM NAME=10#Button VALUE="window|\$detach()"&gt;
    </PRE>
    <P>
 <A NAME="fields"></A>
 <DT><B>Input fields</B>
 <DD><TT>&lt;PARAM NAME=<B><I>number</I></B>#Input VALUE=&quot;<B><I>fieldname</I></B>[#<I><B>length</B></I>]|<B><I>initial text</I></B>[|<B><I>action</I></B>]&quot;&gt;</TT>
 <DD><B><I>number</I></B> is the sequence number and determines the place
     of the field on the row.
     <P>
 <DD><A NAME="fieldreference"><B><I>fieldname</I></B></A> is a
     symbolic name to reference the input field. A reference may be used in 
     <A HREF="#buttonaction"><B><I>button actions</I></B></A> and
     is constructed as follows:
     <TT>\@<B><I>fieldname</I></B>@</TT>
     The <B>\@fieldname@</B> macro will be replaced by the string entered in
     the text field.
     <P>
 <DD><B><I>length</I></B> is the length of the input field in numbers of
     characters.
     <P>
 <DD><B><I>initial text</I></B> is the text to be placed into the input
     field on startup
 <DD><B><I>action</I></B> may be used similar to a 
     <A HREF="#buttonaction"><B><I>button action</I></B></A>. This action 
     will be used if the users presses Return in the inputfield. Leave
     empty if you only want to use a button to send the text!
 <DD><B>Examples:</B><BR>
     <FONT SIZE=-1>(<I>Note:</I> It makes sense if you look at the
     examples for buttons before.)</FONT>
     <PRE>
       &lt;PARAM NAME=3#Input VALUE="help#10|"&gt;
       &lt;PARAM NAME=7#Input VALUE="address|www.first.gmd.de"&gt;
       &lt;PARAM NAME=8#Input VALUE="send#5|who|\@send@\r\n"&gt;
       &lt;PARAM NAME=9#Input VALUE="port#5|4711"&gt;
     </PRE>
     <P>
</DL>
<dl>
  <dt> <b>Version:</b>
  <dd> $Id: ButtonBar.java,v 1.21 1997/12/16 10:55:27 leo Exp $
  <dt> <b>Author:</b>
  <dd> Matthias L. Jugel, Marcus Meißner
    <dt> <b>See Also:</b>
    <dd> <a href="modules.Module.html#_top_">Module</a>
</dl>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#ButtonBar()"><b>ButtonBar</b></a>()
  <dd> 
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#addNotify()"><b>addNotify</b></a>()
  <dd> create the buttonbar from the parameter list.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#connect(java.lang.String, int)"><b>connect</b></a>(String, int)
  <dd> If the applet connects this method is called.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#disconnect()"><b>disconnect</b></a>()
  <dd> Get notified of disconnection.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#handleEvent(java.awt.Event)"><b>handleEvent</b></a>(Event)
  <dd> 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#receive(java.lang.String)"><b>receive</b></a>(String)
  <dd> This module does not take any input.
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setLoader(java.lang.Object)"><b>setLoader</b></a>(Object)
  <dd> This method is called by our loader to notify us of it.
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="ButtonBar"></a>
<a name="ButtonBar()"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>ButtonBar</b>
<pre>
  public ButtonBar()
</pre>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="setLoader(java.lang.Object)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setLoader"><b>setLoader</b></a>
<pre>
  public void setLoader(<a href="java.lang.Object.html#_top_">Object</a> o)
</pre>
<dl>
  <dd> This method is called by our loader to notify us of it.
  <dl>
    <dt> <b>Parameters:</b>
    <dd> o - The object that has loaded this object.
    <dt> <b>See Also:</b>
    <dd> <a href="display.Module.html#_top_">Module</a>
  </dl>
</dl>
<a name="connect(java.lang.String, int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="connect"><b>connect</b></a>
<pre>
  public void connect(<a href="java.lang.String.html#_top_">String</a> host,
                      int port)
</pre>
<dl>
  <dd> If the applet connects this method is called.
  <dl>
    <dt> <b>Parameters:</b>
    <dd> host - remote hostaddress - not used
    <dd> port - remote port - not used
  </dl>
</dl>
<a name="disconnect()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="disconnect"><b>disconnect</b></a>
<pre>
  public void disconnect()
</pre>
<dl>
  <dd> Get notified of disconnection. Do nothing.
</dl>
<a name="receive(java.lang.String)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="receive"><b>receive</b></a>
<pre>
  public <a href="java.lang.String.html#_top_">String</a> receive(<a href="java.lang.String.html#_top_">String</a> s)
</pre>
<dl>
  <dd> This module does not take any input. It works passive.
  <dl>
    <dt> <b>Returns:</b>
    <dd> null to remove from the list of receiver modules.
    <dt> <b>See Also:</b>
    <dd> <a href="display.Module.html#_top_">Module</a>
  </dl>
</dl>
<a name="addNotify()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="addNotify"><b>addNotify</b></a>
<pre>
  public void addNotify()
</pre>
<dl>
  <dd> create the buttonbar from the parameter list. We will know our parent,
when we have been added.
  <dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.Panel.html#addNotify()">addNotify</a> in class <a href="java.awt.Panel.html#_top_">Panel</a>
  </dl>
</dl>
<a name="handleEvent(java.awt.Event)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="handleEvent"><b>handleEvent</b></a>
<pre>
  public boolean handleEvent(<a href="java.awt.Event.html#_top_">Event</a> evt)
</pre>
<dl>
  <dl>
    <dt> <b>Overrides:</b>
    <dd> <a href="java.awt.Component.html#handleEvent(java.awt.Event)">handleEvent</a> in class <a href="java.awt.Component.html#_top_">Component</a>
  </dl>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-modules.html">This Package</a>  <a href="modules.BSXModule.html#_top_">Previous</a>  <a href="modules.MudConnector.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>

Site Stats

Snippets: 1791
Codebases: 571