You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ReceiveAdapterController.java 535B

12345678910111213141516171819202122232425262728
  1. package chatprogramm.controller;
  2. import chatprogramm.view.ChatView;
  3. import java.util.Observable;
  4. import java.util.Observer;
  5. /**
  6. *
  7. * @author Marian
  8. */
  9. public class ReceiveAdapterController implements Observer
  10. {
  11. private ChatView view;
  12. public ReceiveAdapterController(ChatView view)
  13. {
  14. this.view = view;
  15. }
  16. @Override
  17. public void update(Observable observable, Object object)
  18. {
  19. String msg = (String)object;
  20. view.getTaCommunication().append(msg + "\n");
  21. }
  22. }