KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > rero > gui > windows > AboutWindow


1 /** an easter egg... I'm not going to bother hiding the code for this one event though it is one of my favorites */
2
3 package rero.gui.windows;
4
5 import rero.gui.*;
6 import rero.gui.input.*;
7
8 import text.*;
9
10 import java.awt.*;
11 import java.awt.event.*;
12
13 import javax.swing.*;
14 import javax.swing.event.*;
15
16 import java.util.*;
17
18 import rero.config.*;
19
20 public class AboutWindow extends StatusWindow implements Runnable JavaDoc
21 {
22     Random random = new Random(System.currentTimeMillis());
23     boolean showKow = false;
24     Color background = null;
25     String JavaDoc me = ClientState.getClientState().getString("user.nick", "lamer");
26 // String nnn = "14\u038715\u00F810\u0387";
27
String JavaDoc nnn = "04\u202216\u00F804\u2022";
28     String JavaDoc name = "";
29
30     boolean delay = true;
31
32     public AboutWindow()
33     {
34        showKow = random.nextBoolean();
35
36        if (showKow) { background = Color.white; name = "#Floods"; }
37        else { background = Color.black; name = "@mIRCii"; }
38     }
39
40     public String JavaDoc getName()
41     {
42        return name;
43     }
44
45     public void run()
46     {
47        if (showKow)
48        {
49           bkow();
50        }
51        else
52        {
53           mircii();
54        }
55     }
56
57     private static class UserModel extends AbstractListModel
58     {
59        String JavaDoc[] users = new String JavaDoc[] { "@Bass", "@BLaHSTeR", "@G-dAwG", "@JakieChan", "@LiquidIQ", "@misfits", "@NiN-PLoP", "@rUINER", "@Terra-", "@vicadin", "@`butane", "@|ChIcKeN|", "funbox" };
60
61        public void setUsers(String JavaDoc[] _users) { users = _users; fireContentsChanged(this, 0, users.length); }
62
63        public Object JavaDoc getElementAt(int index)
64        {
65            return users[index];
66        }
67
68        public int getSize()
69        {
70            return users.length;
71        }
72     }
73
74     public void bkow()
75     {
76       UserModel users = new UserModel();
77
78       JList lusers = new JList(users);
79       lusers.setBorder(null);
80
81       lusers.setFont(ClientState.getClientState().getFont("ui.font", ClientDefaults.ui_font));
82       JScrollPane scroller = new JScrollPane(lusers, JScrollPane.VERTICAL_SCROLLBAR_ALWAYS, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
83       scroller.setBorder(null);
84
85       add(scroller, BorderLayout.EAST);
86       revalidate();
87
88       eline("3*** Now talking in #floods");
89       delay = false;
90       eline("9Topic for #Floods [PLOP]");
91       eline("9Topic set by |ChIcKeN| on [Tue Jul 15 02:57:00 1997]");
92       eline("9@Bass @BLaHSTeR @G-dAwG @JakieChan @LiquidIQ @misfits @NiN-PLoP");
93       delay = true;
94       eline("9@rUINER @Terra- @vicadin @`butane @|ChIcKeN| funbox");
95
96       try { Thread.sleep(1250); } catch (Exception JavaDoc ex) { }
97
98       eline("<`butane> hey guys im going to make a script that will revolutionize mIRC.. anyone want to help?");
99       eline("<vicadin> umm i would but i umm have to umm go walk the dog..");
100       eline("<misfits> fuck `butane i would love to help but blind is 5 months overdue");
101       eline("<funbox> butane isnt this the 6th time you started a script that was going to revolutionize mIRC");
102       eline("<`butane> box if you dont shut up im going to kick you you lame newbie");
103       eline("<funbox> butane i have owners on the eggs your using dumbass");
104       eline("<funbox> hey chanman Voltron knows your home address and hes going to come to your house and kick your ass");
105       eline("<JakieChan> no he doesnt you fucking liar");
106       eline("<funbox> do i have to read it to you??");
107       eline("<JakieChan> yah i dare you");
108       eline("<funbox> u sure?");
109       eline("<`butane> dont worry chan if he does anything ill get some of my aol friends and we'll make sure your safe");
110
111       users.setUsers(new String JavaDoc[] { "@Bass", "@BLaHSTeR", "@G-dAwG", "@JakieChan", "@LiquidIQ", "@misfits", "@NiN-PLoP", "@rUINER", "@Terra-", "@vicadin", "@`butane", "@|ChIcKeN|", "funbox", "Voltron" });
112       eline("3*** Voltron (~Nachoes@p09.hwts12.loop.net) has joined #floods");
113
114       eline("<Voltron> why am I here? Im missing Voltron for this you know...");
115       eline("<funbox> JakieChan has had a memory collapse and wants to know his home address");
116       eline("<Voltron> oh does he still not believe im going to come over to his house and kick the living shit out of him?");
117       eline("<JakieChan> Yeah I dare you to come to my house.");
118       eline("<JakieChan> Besides we all know you are just a stupid faggot that eats nachoes all day.");
119       eline("<Voltron> Hey JakieChan wouldn't it suck if I happened to be going to the store and I passed by Granada Hl, San Fernando,CA 91344");
120       eline("<JakieChan> ttas nto my addressss...asdf");
121       eline("<Voltron> are you sure? because i called (818)360-2843 and asked for Peter Arsoff and they said hold on.. I hung up real fast");
122       eline("<JakieChan> `butane what the fuck you said that there was no way he could get my address you fucking liar!!!");
123       eline("<`butane> thats not your real address though ;)");
124       eline("<JakieChan> I know that but umm err.. how is your script coming along?");
125       eline("<`butane> all this fighting is bad for my scripting!! Im revolutionizing mIRC you know..");
126       eline("<funbox> whatever happened to all the scripts before that where going to revolutionize mIRC?");
127       eline("<`butane> they are on hold so that i can work on this");
128       eline("<vicadin> what happened to that killer script that was going to own htew0?");
129       eline("<`butane> wraithX is a dumbass he didnt fully appreciate my work");
130       eline("<funbox> really? he told me that you cant script for shit and that you didnt make any pop ups..");
131       eline("<`butane> thats cuz hes a newbie that cant understand that the /cumjizm alias was for the away and that /orgasim was for back...");
132       eline("<vicadin> oh jeeze how could he not know that? i thought it was common knowledge....");
133       eline("<LiquidIQ> hey FRoZeN is making fun of me on EFnet again");
134       eline("<`butane> why what did you do to him?");
135       eline("<LiquidIQ> I flooded him! heeeeheee this MaD KoW stuff is l33t ");
136       eline("<`butane> i know im making a new script with this new technology called an echo flood");
137       eline("<LiquidIQ> oh shit!!! i cant fucking wait man");
138       eline("<funbox> snoop dawgie do you want me to get on the eggs and rearrange #floods again??");
139       eline("<JakieChan> FUCK QUICK KB THE BOTS!!!");
140       eline("3*** JakieChan sets mode: +b *!*@undertow.net");
141
142       delay = false;
143       users.setUsers(new String JavaDoc[] { "@Bass", "@G-dAwG", "@JakieChan", "@LiquidIQ", "@misfits", "@NiN-PLoP", "@Terra-", "@vicadin", "@`butane", "@|ChIcKeN|", "funbox", "Voltron" });
144       eline("3*** BLaHSTeR was kicked by JakieChan (AAAA)");
145       delay = true;
146       eline("3*** rUINER was kicked by JakieChan (ALFJDFJ)");
147
148       eline("<funbox> oh well i tried to be nice but you asked for it");
149
150       delay = false;
151       eline("3*** Terra- sets mode +oo funbox Voltron");
152       eline("3*** funbox sets mode -oooooo Bass G-dAwG JakieChan LiquidIQ misfits NiN-PLoP");
153       users.setUsers(new String JavaDoc[] { "@funbox", "@Terra-", "@Voltron", "Bass", "G-dAwG", "JakieChan", "LiquidIQ", "misfits", "NiN-PLoP", "vicadin", "`butane", "|ChIcKeN|" });
154       delay = true;
155       eline("3*** funbox sets mode -ooo vicadin `butane |CHiCKeN|");
156
157       setTitle("#Floods [+tn]: kkow, we're stupid, we know it, but fuck man what can we do??");
158       eline("2*** funbox changes topic to \"kkow, we're stupid, we know it, but fuck man what can we do??\"");
159
160       eline("<funbox> how many times does this have to happen before you guys stop being rude to me");
161       eline("<Voltron> hahahahahahha you people are stupid.. im going to go watch the rest of Voltron");
162
163       users.setUsers(new String JavaDoc[] { "@funbox", "@Terra-", "Bass", "G-dAwG", "JakieChan", "LiquidIQ", "misfits", "NiN-PLoP", "vicadin", "`butane", "|ChIcKeN|" });
164       eline("3*** Voltron (~Nachoes@p09.hwts12.loop.net) has left #floods");
165
166       eline("<Terra-> fun your crazy :P");
167
168       users.setUsers(new String JavaDoc[] { "@funbox", "Bass", "G-dAwG", "JakieChan", "LiquidIQ", "misfits", "NiN-PLoP", "vicadin", "`butane", "|ChIcKeN|" });
169       eline("3*** Terra- (peace@port28.pitton.com) has left #floods");
170
171       eline("<`butane> give it back box.. be mature");
172       eline("<|CHiCKeN|>`butane should i start icmp'ing him from my t3???");
173       eline("<`butane> give him a chance to leave and be mature");
174       eline("<funbox> `butane told me to do it ");
175
176       users.setUsers(new String JavaDoc[] { "Bass", "G-dAwG", "JakieChan", "LiquidIQ", "misfits", "NiN-PLoP", "vicadin", "`butane", "|ChIcKeN|" });
177       eline("3*** funbox (people@ppp4.respool1.phila.microserve.com) has left #floods");
178
179       eline("<misfits> W00t i just smoked weed!!!!!!!!!!!!!!!!!!! it was cool i smoked it through a needle");
180       eline("<LiquidIQ> Im going to flood funbox");
181       eline("<misfits> yah ill help you that guy is a fag");
182       eline("<`butane> man im going to go work on my revolutionary script.. i havent even come up with a name yet");
183       eline("<`butane> I wuv BobsKC");
184     }
185     
186     public void mircii()
187     {
188
189        eline("12<15`butane12>15 god damned it, another lamer loaded mircii");
190        eline("12<15`butane12>15 why the hell do I even make it public...");
191
192        if (background != Color.black)
193        {
194           eline("12<15`butane12>15 jesus, the pussy doesn't even have a black background");
195        }
196
197        type("hello?");
198        eline("6<15"+me+"6>15 hello?");
199        eline("12<15`butane12>15 hi..");
200        type("this your addon?");
201        eline("6<15"+me+"6>15 this your addon?");
202        type("/sv");
203        eline("6<15"+me+"6>15 mIRC 5.31^16m15ircii%fINAL+CLONE by butane");
204        eline("12<15`butane12>15 heh...");
205        eline("12<15`butane12>15 yeah of course its my addon");
206        eline("12<15`butane12>15 why?");
207        type("well like... I just wanted to like tell you that ");
208        eline("6<15"+me+"6>15 well like... I just wanted to like tell you that ");
209
210        if (random.nextBoolean())
211        {
212           type("like it well... it just sucks.");
213           eline("6<15"+me+"6>15 like it well... it just sucks.");
214        }
215        else
216        {
217           type("c-scripts mserver is 1000x better. plus its christain!");
218           eline("6<15"+me+"6>15 c-scripts mserver is 1000x better. plus its christain!");
219        }
220
221        eline("12<15`butane12>15 you came all the way from dalnet to tell me that?");
222        eline(nnn+" 11madgoat 14[10khaled@mardam.demon.co.uk14]15 has joined #addons");
223        eline("12<15madgoat12>15 hi.. ");
224
225        if (random.nextBoolean())
226        {
227            eline("12<15madgoat12>15 I got some pics of me and my stuffed animal getting it on!");
228        }
229        else
230        {
231            eline("12<15madgoat12>15 I got some pics of me and tjerk getting it on!");
232        }
233
234        if (random.nextBoolean())
235        {
236            eline("12<15madgoat12>15 I'll trade them for a copy of pIRCh!@");
237        }
238        else
239        {
240            eline("12<15madgoat12>15 I'll trade them for a copy of xircon!@");
241        }
242
243        type("hrm... thats not to bad of a deal...");
244        eline("6<15"+me+"6>15 hrm... thats not to bad of a deal...");
245        type("but all I got is this half assed mirc addon.");
246        eline("6<15"+me+"6>15 but all I got is this half assed mirc addon.");
247        type("/sv");
248        eline("6<15"+me+"6>15 mIRC 5.31^16m15ircii%fINAL+CLONE by butane");
249        eline("12<15madgoat12>15 hmmm... thats lame.");
250        eline("12<15madgoat12>15 16m15ircII 2.8.b WIN* :this is a bug free clone. honest");
251        eline("12<15madgoat12>15 now thats the REAL shit.");
252        eline(nnn+" 11myn 14[10mn@barbi.whore.infinet.net14]15 has joined #addons");
253        eline("12<15myn12>15 oh shit! khaled's here");
254        eline("12<15myn12>15 I've always wanted to try this...");
255        eline("12<15myn12>15 99999999999999999999999999999999999999 * 999999999999999999999999999999");
256        delay = false;
257        eline(nnn+" 16hellish 15SignOff: #addons 14(15conection reset by peer14)");
258        delay = true;
259        eline(nnn+" 16madgoat 15SignOff: #addons 14(15conection reset by peer14)");
260        eline(nnn+" 11madgoat 14[10khaled@mardam.demon.co.uk14]15 has joined #addons");
261        eline("12<15madgoat12>15 bloody hell! it gpf'd");
262        eline("12<15madgoat12>15 looks like I am taking haltable remotes out of this new ver");
263        eline("12<15madgoat12>15 well bye guys, just came on to test haltable remotes");
264        eline("12<15madgoat12>15 and since I got a gpf I gotta remove them..");
265        eline("12<15madgoat12>15 jakiechan16:15 I'll mail you those pics later");
266        eline(nnn+" 15madgoat 14[15khaled@mardam.demon.co.uk14]15 has left #addons 14[]");
267        eline("12<15`butane12>15 *yawn*");
268        eline("12<15JakieChan12>15 lol khaled was here");
269        eline("12<15`butane12>15 yeah hehe...");
270
271        if (random.nextBoolean())
272        {
273           eline("12<15JakieChan12>15 shutup jewTANE, I wasn't talking to you.");
274        }
275        else
276        {
277           eline("12<15JakieChan12>15 shutup penisTANE, I wasn't talking to you.");
278        }
279
280        if (random.nextBoolean())
281        {
282           eline(nnn+" 11snert 14[10ircn@snert.accesspro.net14]15 has joined #addons");
283           eline("12<15snert12>15 guys! I think I broke the irc habit.");
284           eline("12<15snert12>15 I managed to stay off for 3 weeks! now I spend my time like");
285           eline("12<15snert12>15 netsexing bitches on aol 24/7! its fucking great.");
286        }
287        else
288        {
289           eline(nnn+" 11blue-elf 14[10belf@elfy.owns.my14]15 has joined #addons");
290           eline("12<15blue-elf12>15 butane! I made a new mircii addon");
291           eline("12<15blue-elf12>15 its basically a little mass unban alias");
292           eline("12<15blue-elf12>15 but now it also gives mircii a vrml viewer... ");
293        }
294
295        type("man you guys are fucked up.");
296        eline("6<15"+me+"6>15 man you guys are fucked up.");
297        eline("12<8JakieChan12>15 "+me+", yeah well I'll have khaled porn soon");
298        eline("12<15JakieChan12>15 and you won't...");
299        type("whatever dude, I think I'm getting off irc now.");
300        eline("6<15"+me+"6>15 whatever dude, I think I'm getting off irc now.");
301        type("and staying off perm.");
302        eline("6<15"+me+"6>15 and staying off perm.");
303        type("this is just to damned weird.");
304        eline("6<15"+me+"6>15 this is just to damned weird.");
305        eline(nnn+" 16"+me+" 15SignOff: #addons 14(15EOF from client14)");
306     }
307
308     public void type(String JavaDoc text)
309     {
310        if (text == null)
311        {
312           return;
313        }
314
315        for (int x = 0; x < text.length(); x++)
316        {
317           input.setText(text.substring(0, x));
318           input.setCaretPosition(x);
319           input.repaint();
320           try
321           {
322             Thread.sleep(170 + (random.nextInt() % 100));
323           } catch (Exception JavaDoc ex) { }
324        }
325
326        input.setText(text);
327        input.setCaretPosition(text.length());
328        input.repaint();
329
330        try
331        {
332          Thread.sleep(1000 + (random.nextInt() % 1000));
333        } catch (Exception JavaDoc ex) { }
334
335        input.setText("");
336        input.repaint();
337     }
338
339     public void eline(String JavaDoc text)
340     {
341        getDisplay().addText("1" + text);
342
343        if (delay)
344        {
345        try
346        {
347           Thread.sleep(3800 + (random.nextInt() % 2700));
348        }
349        catch (Exception JavaDoc ex)
350        {
351        }
352        }
353     }
354
355     public void init(ClientWindow _frame)
356     {
357        frame = _frame;
358        frame.addWindowListener(new ClientWindowStuff());
359
360        setLayout(new BorderLayout());
361
362        display = new WrappedDisplay();
363        input = new ModInputField();
364        statusbar = new ModStatusBar(this);
365
366        add(display, BorderLayout.CENTER);
367
368        JPanel space = new JPanel();
369        space.setLayout(new BorderLayout());
370
371        space.add(statusbar, BorderLayout.NORTH);
372        space.add(input, BorderLayout.SOUTH);
373
374        space.setOpaque(false);
375
376        add(space, BorderLayout.SOUTH);
377
378        frame.setContentPane(this);
379  
380        if (showKow) { setTitle("#Floods [+tn]: [PloP]"); }
381        else { setTitle(getName()); }
382
383        frame.setIcon(getImageIcon());
384
385        ((ModInputField)input).rehashColorsFoSho();
386     }
387  
388     private class ModInputField extends InputField
389     {
390        public void rehashColors() { }
391
392        public void rehashColorsFoSho()
393        {
394           Color temp = Color.black;
395
396           if (showKow)
397           {
398              temp = Color.black;
399           }
400           else
401           {
402              temp = Color.gray.brighter();
403           }
404
405           setForeground(temp);
406           setCaretColor(temp.brighter());
407
408           setFont(ClientState.getClientState().getFont("ui.font", ClientDefaults.ui_font));
409   
410           revalidate();
411        }
412     }
413
414     private class ModStatusBar extends WindowStatusBar
415     {
416        public ModStatusBar(StatusWindow parent)
417        {
418           super(parent);
419
420           if (background == Color.black)
421           {
422              contents.setNumberOfLines(2);
423           }
424           else
425           {
426              contents.setNumberOfLines(0);
427           }
428           rehash();
429        }
430
431        public void rehashValues() { } // do nothing...
432

433        public void rehash()
434        {
435           if (background == Color.black)
436           {
437              contents.setLine("10[1603:14am10][15"+me+" 10(15+i10)] [15#addons 10(15+tn10)]", "", 0);
438              contents.setLine("10 [15Lag16 210] [15Ops10/16. 15Non10/16. 15Voice10/16.10]", "", 1);
439           }
440        }
441
442        public void paint (Graphics g)
443        {
444           g.setColor(background == Color.black ? Color.blue.darker() : Color.black);
445           g.fillRect(0, 0, getWidth(), getHeight());
446
447           paintChildren(g);
448        }
449     }
450
451     public void paint(Graphics g)
452     {
453        g.setColor(background);
454        g.fillRect(0, 0, getWidth(), getHeight());
455        paintChildren(g);
456     }
457
458    public ImageIcon getImageIcon()
459    {
460       if (icon == null)
461       {
462          icon = new ImageIcon(ClientState.getClientState().getResource("jsmall.gif"));
463       }
464
465       return icon;
466    }
467
468    public boolean isLegalWindow()
469    {
470       return false;
471    }
472 }
473
Popular Tags