/* */ package NET.worlds.console; /* */ /* */ import NET.worlds.scape.FrameEvent; /* */ import NET.worlds.scape.Pilot; /* */ import java.awt.Container; /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ public class ChatPart /* */ extends DuplexPart /* */ { /* */ private Window renderWindow; /* */ private DefaultConsole console; /* */ private static final String activateVCselfWhisper = "&|+debug= 0) && (ii < s.length() - 1) && (s.charAt(ii + 1) == 'u')) { /* 45 */ Pilot.sendText(Console.parseUnicode(s)); /* */ } else { /* 47 */ Pilot.sendText(s); /* */ } /* */ } /* */ /* */ /* */ /* */ public void activate(Console c, Container f, Console prev) /* */ { /* 55 */ super.activate(c, f, prev); /* */ /* */ /* 58 */ this.console = ((DefaultConsole)c); /* */ } /* */ /* */ public void deactivate() /* */ { /* 63 */ super.deactivate(); /* */ /* */ /* 66 */ this.renderWindow = null; /* 67 */ this.console = null; /* */ } /* */ /* */ public synchronized boolean handle(FrameEvent f) /* */ { /* 72 */ boolean ret = super.handle(f); /* */ /* */ /* 75 */ if ((this.renderWindow == null) && (this.console != null)) { /* 76 */ RenderCanvas rc = this.console.getRender(); /* 77 */ if (rc != null) { /* 78 */ Window w = rc.getWindow(); /* 79 */ if (w != null) { /* */ try { /* 81 */ w.hookChatLine(this.line); /* 82 */ this.renderWindow = w; /* */ } /* */ catch (WindowNotFoundException localWindowNotFoundException) {} /* */ } /* */ } /* */ } /* 88 */ return ret; /* */ } /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ /* */ private void triggerLocalDebug(String s) /* */ { /* 100 */ if (s.startsWith("&|+debug