|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectdrcl.DrclObj
drcl.comp.Component
drcl.comp.lib.Talk
A simple chat client component. It is a frame with two areas inside: a display area
and an input area. Whenever a line is formed in the input area, the line is sent out
from the "inout" port. And whenever a message is received from the port, it is displayed
in the display area.
Ports (in addition to those defined in drcl.comp.Component):
| Nested Class Summary |
| Nested classes inherited from class drcl.comp.Component |
Component.Locks |
| Field Summary | |
static java.lang.String |
INOUT_PORT_ID
|
| Constructor Summary | |
Talk()
Constructor. |
|
Talk(java.lang.String id_)
Constructor. |
|
| Method Summary | |
void |
duplicate(java.lang.Object source_)
Copies the content from the source_ to this component.
|
java.lang.String |
info()
Script interface which reveals the internal states of the component. |
boolean |
isAnonymous()
|
boolean |
isEchoEnabled()
|
void |
process(java.lang.Object data_,
Port inPort_)
Invoked when data_ arrives this component at the inPort_ port. |
void |
reset()
Resets this component to the initial state for use anew. |
void |
setAnonymous(boolean v_)
|
void |
setDisplaySize(int rows_,
int cols_)
Sets the number of rows and columns of the display text area. |
void |
setEchoEnabled(boolean v_)
|
void |
setInputSize(int rows_,
int cols_)
Sets the number of rows and columns of the input text area. |
| Methods inherited from class drcl.DrclObj |
clone |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String INOUT_PORT_ID
| Constructor Detail |
public Talk()
public Talk(java.lang.String id_)
| Method Detail |
public void process(java.lang.Object data_,
Port inPort_)
data_ arrives this component at the inPort_ port.
data_ - the arrival data.inPort_ - the port where the data arrives.public void reset()
super.reset() in the beginning.
reset in class Componentpublic void duplicate(java.lang.Object source_)
source_ to this component.
Must call super.duplicate() in the beginning.
duplicate in interface ObjectDuplicableduplicate in class Componentpublic java.lang.String info()
info in class Componentpublic void setAnonymous(boolean v_)
public boolean isAnonymous()
public void setEchoEnabled(boolean v_)
public boolean isEchoEnabled()
public void setDisplaySize(int rows_,
int cols_)
rows_ - number of rows; no effect if nonpositive value is given.cols_ - number of columns; no effect if nonpositive value is given.
public void setInputSize(int rows_,
int cols_)
rows_ - number of rows; no effect if nonpositive value is given.cols_ - number of columns; no effect if nonpositive value is given.
|
DRCL J-Sim API | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||