Exemple #1
0
  /** Management of user events */
  public void actionPerformed(ActionEvent e) {
    try {
      // get the value to be written from the buffer
      String s = irc.data.getText();

      // lock the object in write mode
      irc.sentence.jvnLockWrite();

      // invoke the method
      ((Sentence) (irc.sentence.jvnGetObjectState())).write(s);

      // unlock the object
      irc.sentence.jvnUnLock();
    } catch (JvnException je) {
      System.out.println("IRC problem  : " + je.getMessage());
    }
  }
Exemple #2
0
  /** Management of user events */
  public void actionPerformed(ActionEvent e) {
    try {
      // lock the object in read mode
      irc.sentence.jvnLockRead();

      // invoke the method
      String s = ((Sentence) (irc.sentence.jvnGetObjectState())).read();

      // unlock the object
      irc.sentence.jvnUnLock();

      // display the read value
      irc.data.setText(s);
      irc.text.append(s + "\n");
    } catch (JvnException je) {
      System.out.println("IRC problem : " + je.getMessage());
    }
  }