Source Code Cross Referenced for WebOutline.java in  » Web-Crawler » WebSPHINX » websphinx » workbench » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Web Crawler » WebSPHINX » websphinx.workbench 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * WebSphinx web-crawling toolkit
003:         *
004:         * Copyright (c) 1998-2002 Carnegie Mellon University.  All rights
005:         * reserved.
006:         *
007:         * Redistribution and use in source and binary forms, with or without
008:         * modification, are permitted provided that the following conditions
009:         * are met:
010:         *
011:         * 1. Redistributions of source code must retain the above copyright
012:         *    notice, this list of conditions and the following disclaimer.
013:         *
014:         * 2. Redistributions in binary form must reproduce the above copyright
015:         *    notice, this list of conditions and the following disclaimer in
016:         *    the documentation and/or other materials provided with the
017:         *    distribution.
018:         *
019:         * THIS SOFTWARE IS PROVIDED BY CARNEGIE MELLON UNIVERSITY ``AS IS'' AND
020:         * ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
021:         * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
022:         * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY
023:         * NOR ITS EMPLOYEES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
024:         * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
025:         * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
026:         * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
027:         * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
028:         * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
029:         * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
030:         *
031:         */
032:
033:        package websphinx.workbench;
034:
035:        import websphinx.*;
036:        import java.awt.*;
037:        import java.util.Hashtable;
038:        import java.util.Vector;
039:        import java.net.URL;
040:        import java.net.MalformedURLException;
041:        import rcm.awt.ClosableFrame;
042:        import java.awt.image.MemoryImageSource;
043:        import rcm.awt.Constrain;
044:        import rcm.awt.PopupDialog;
045:        import rcm.awt.Colors;
046:
047:        // Symantec tree widget
048:        import symantec.itools.awt.TreeView;
049:        import symantec.itools.awt.TreeNode;
050:
051:        public class WebOutline extends TreeView implements  CrawlListener,
052:                LinkListener {
053:
054:            Hashtable links = new Hashtable();
055:
056:            // maps Link -> TreeNode
057:
058:            /**
059:             * Make a WebOutline.
060:             */
061:            public WebOutline() {
062:                setPageIcon(defaultPageIcon);
063:                setLinkIcon(defaultRetrievingIcon);
064:                setRetrievingIcon(defaultRetrievingIcon);
065:                setErrorIcon(defaultErrorIcon);
066:            }
067:
068:            /**
069:             * Show control panel for changing layout parameters.
070:             */
071:            public void showControlPanel() {
072:                new WorkbenchControlPanel(null, this ).show();
073:            }
074:
075:            /**
076:             * Clear the outline.
077:             */
078:            public synchronized void clear() {
079:                super .clear();
080:                links.clear();
081:            }
082:
083:            /**
084:             * Notify that the crawler started.
085:             */
086:            public void started(CrawlEvent event) {
087:            }
088:
089:            /**
090:             * Notify that the crawler has stopped.
091:             */
092:            public void stopped(CrawlEvent event) {
093:            }
094:
095:            /**
096:             * Notify that the crawler's state was cleared.
097:             */
098:            public void cleared(CrawlEvent event) {
099:                clear();
100:            }
101:
102:            /**
103:             * Notify that the crawler has timed out
104:             */
105:            public void timedOut(CrawlEvent event) {
106:            }
107:
108:            /**
109:             * Notify that the crawler is paused
110:             */
111:            public void paused(CrawlEvent event) {
112:            }
113:
114:            /**
115:             * Notify that a crawling event has occured.
116:             */
117:            public void crawled(LinkEvent event) {
118:                update(event.getLink());
119:            }
120:
121:            // Page filter
122:
123:            static final int NO_LINKS = 0;
124:            // Show no outgoing links
125:
126:            static final int RETRIEVED_LINKS = 1;
127:            // Show only links that crawler started to retrieve
128:
129:            static final int WALKED_LINKS = 2;
130:            // Show RETRIEVED_LINKS, plus links queued for retrieval
131:
132:            static final int TREE_LINKS = 3;
133:            // Show WALKED_LINKS, plus links skipped by walk()
134:
135:            static final int ALL_LINKS = 4;
136:            // Show TREE_LINKS, plus links to already-visited pages
137:
138:            int defaultFilter = RETRIEVED_LINKS;
139:
140:            // Change the filter of ALL nodes
141:            synchronized void setLinkFilter(int filter) {
142:                if (filter == defaultFilter)
143:                    return;
144:
145:                int old = defaultFilter;
146:                defaultFilter = filter;
147:                reFilter(getRootNode(), old > filter);
148:                triggerRedraw();
149:            }
150:
151:            void reFilter(TreeNode n, boolean restrict) {
152:                for (; n != null; n = n.getSibling()) {
153:                    Link link = (Link) n.getDataObject();
154:                    Page page = link.getPage();
155:                    if (page != null) {
156:                        Link[] linkarray = page.getLinks();
157:
158:                        if (restrict) {
159:                            // new mode is more restrictive; delete undesired children
160:                            for (int j = 0; j < linkarray.length; ++j) {
161:                                if (!shouldDisplay(linkarray[j].getStatus())) {
162:                                    TreeNode child = findNode(linkarray[j]);
163:                                    if (child != null)
164:                                        remove(child);
165:                                }
166:                            }
167:                        } else {
168:                            // new mode is less restrictive; add children
169:                            for (int j = 0; j < linkarray.length; ++j) {
170:                                update(linkarray[j]); // update() will check shouldDisplay()
171:                            }
172:                        }
173:                    }
174:
175:                    TreeNode c = n.getChild();
176:                    if (c != null)
177:                        reFilter(c, restrict);
178:                }
179:            }
180:
181:            // check whether we want to display a link with this status
182:            boolean shouldDisplay(int status) {
183:                switch (status) {
184:                case LinkEvent.QUEUED:
185:                case LinkEvent.TOO_DEEP:
186:                    return (defaultFilter > RETRIEVED_LINKS);
187:                case LinkEvent.SKIPPED:
188:                    return (defaultFilter > WALKED_LINKS);
189:                case LinkEvent.ALREADY_VISITED:
190:                    return false;
191:                case LinkEvent.RETRIEVING:
192:                case LinkEvent.DOWNLOADED:
193:                case LinkEvent.VISITED:
194:                case LinkEvent.ERROR:
195:                    return true;
196:                default:
197:                    return false;
198:                }
199:            }
200:
201:            // Node rendering
202:
203:            static final int TITLE = 0;
204:            // Show page title (or URL if not downloaded)
205:
206:            static final int ABSOLUTE_URL = 1;
207:            // Show absolute URL
208:
209:            static final int RELATIVE_URL = 2;
210:            // Show URL relative to parent
211:
212:            int defaultRendering = TITLE;
213:
214:            // Change the rendering of ALL nodes
215:            synchronized void setNodeRendering(int r) {
216:                defaultRendering = r;
217:                reRender(getRootNode());
218:                triggerRedraw();
219:            }
220:
221:            void reRender(TreeNode n) {
222:                for (; n != null; n = n.getSibling()) {
223:                    update(n);
224:
225:                    TreeNode c = n.getChild();
226:                    if (c != null)
227:                        reRender(c);
228:                }
229:            }
230:
231:            /**
232:             * Update all the links that the crawler reached from this link.
233:             * Any reachable links not present in the graph are added.
234:             */
235:            public void updateClosure(Link[] links) {
236:                if (links == null)
237:                    return;
238:                for (int i = 0; i < links.length; ++i) {
239:                    Link link = links[i];
240:                    int status = link.getStatus();
241:
242:                    if (status == LinkEvent.NONE)
243:                        continue;
244:
245:                    update(link);
246:
247:                    if (status == LinkEvent.DOWNLOADED
248:                            || status == LinkEvent.VISITED) {
249:                        Page page = link.getPage();
250:                        if (page != null)
251:                            updateClosure(page.getLinks());
252:                    }
253:                }
254:            }
255:
256:            /**
257:             * Update the edge and node associated with a link.
258:             * If the link is not present in the graph, it is added.
259:             */
260:            public synchronized void update(Link link) {
261:                if (!shouldDisplay(link.getStatus()))
262:                    return;
263:
264:                TreeNode n = findNode(link);
265:                if (n == null)
266:                    add(link);
267:                else
268:                    update(n);
269:
270:                redraw();
271:            }
272:
273:            synchronized void add(Link link) {
274:                TreeNode n = new TreeNode("");
275:                n.setDataObject(link);
276:
277:                Page source = link.getSource();
278:                Link origin = source.getOrigin();
279:                TreeNode parent = findNode(origin);
280:
281:                if (parent == null) {
282:                    update(n);
283:                    append(n);
284:                } else {
285:                    update(n);
286:                    insert(n, parent, CHILD);
287:                    parent.expand();
288:                }
289:                links.put(link, n);
290:            }
291:
292:            void update(TreeNode n) {
293:                Link link = (Link) n.getDataObject();
294:                Page page = link.getPage();
295:                int status = link.getStatus();
296:
297:                Image icon = getIcon(LinkEvent.eventName[status]);
298:                n.setExpandedImage(icon);
299:                n.setCollapsedImage(icon);
300:
301:                if (page == null) {
302:                    // not downloaded yet
303:                    String name = "";
304:                    switch (defaultRendering) {
305:                    case TITLE:
306:                    case ABSOLUTE_URL:
307:                        name = link.getURL().toString();
308:                        break;
309:                    case RELATIVE_URL: {
310:                        Link origin = link.getSource().getOrigin();
311:                        if (origin != null)
312:                            name = Link.relativeTo(origin.getURL(), link
313:                                    .getURL());
314:                        else
315:                            name = link.getURL().toString();
316:                        break;
317:                    }
318:                    }
319:                    n.setText(name);
320:
321:                    n.setColor(Colors.parseColor(link
322:                            .getLabel("Workbench.color")));
323:                } else {
324:                    String name = "";
325:                    switch (defaultRendering) {
326:                    case TITLE: {
327:                        name = page.getTitle();
328:                        if (name == null)
329:                            name = link.getURL().toString();
330:                        break;
331:                    }
332:                    case ABSOLUTE_URL:
333:                        name = link.getURL().toString();
334:                        break;
335:                    case RELATIVE_URL: {
336:                        Link origin = link.getSource().getOrigin();
337:                        if (origin != null)
338:                            name = Link.relativeTo(origin.getURL(), link
339:                                    .getURL());
340:                        else
341:                            name = link.getURL().toString();
342:                        break;
343:                    }
344:                    }
345:                    n.setText(name);
346:
347:                    n.setColor(Colors.parseColor(page
348:                            .getLabel("Workbench.color")));
349:                }
350:
351:            }
352:
353:            TreeNode findNode(Link l) {
354:                if (l == null)
355:                    return null;
356:                else
357:                    return (TreeNode) links.get(l);
358:            }
359:
360:            /*
361:             * LinkView listeners
362:             */
363:
364:            private Vector listeners = new Vector();
365:
366:            /**
367:             * Add a listener for LinkViewEvents.  A LinkViewEvent is sent every time a
368:             * node or edge in the graph is double-clicked.
369:             * @param listener Object that wants to receive LinkViewEvents 
370:             */
371:            public void addLinkViewListener(LinkViewListener listener) {
372:                if (!listeners.contains(listener))
373:                    listeners.addElement(listener);
374:            }
375:
376:            /**
377:             * Removes a listener from the set of LinkViewEvent listeners.  If it is not found in the set,
378:             * does nothing.
379:             *
380:             * @param listen a listener
381:             */
382:            public void removeLinkViewListener(CrawlListener listener) {
383:                listeners.removeElement(listener);
384:            }
385:
386:            void fireEvent(Link link) {
387:                LinkViewEvent event = new LinkViewEvent(this , link);
388:
389:                for (int j = 0, len = listeners.size(); j < len; ++j) {
390:                    LinkViewListener listen = (LinkViewListener) listeners
391:                            .elementAt(j);
392:                    listen.viewLink(event);
393:                }
394:            }
395:
396:            public boolean handleEvent(Event event) {
397:                if (event.id == Event.ACTION_EVENT) {
398:                    TreeNode n = (TreeNode) getSelectedNode();
399:                    if (n != null)
400:                        fireEvent((Link) n.getDataObject());
401:                } else if (event.id == Event.MOUSE_DOWN && event.metaDown())
402:                    showControlPanel();
403:                else
404:                    return super .handleEvent(event);
405:                return true;
406:            }
407:
408:            public Link getSelectedLink() {
409:                TreeNode n = getSelectedNode();
410:                if (n != null)
411:                    return (Link) n.getDataObject();
412:
413:                return null;
414:            }
415:
416:            /**
417:             * Create a new Frame containing a WebOutline connected to a crawler.
418:             */
419:            public static Frame monitor(Crawler crawler) {
420:                Frame win = new ClosableFrame("Outline: " + crawler.getName());
421:
422:                WebOutline g = new WebOutline();
423:                crawler.addCrawlListener(g);
424:                crawler.addLinkListener(g);
425:
426:                win.add("Center", g);
427:                win.pack();
428:                win.show();
429:
430:                return win;
431:            }
432:
433:            Hashtable icons = new Hashtable();
434:            // maps String (CrawlEvent name or user-defined icon name) to Image
435:
436:            Image pageIcon;
437:            Image linkIcon;
438:            Image retrievingIcon;
439:            Image errorIcon;
440:
441:            /**
442:             * Get a named icon.
443:             * @param name Name of icon.
444:             * @return icon associated with the name, or null if name unknown.
445:             */
446:            public Image getIcon(String name) {
447:                return (Image) icons.get(name);
448:            }
449:
450:            /**
451:             * Map a name to an icon.
452:             * @param name Name of icon.
453:             * @param icon Icon image.  If null, mapping is deleted.
454:             */
455:            public void setIcon(String name, Image icon) {
456:                if (icon != null)
457:                    icons.put(name, icon);
458:                else
459:                    icons.remove(name);
460:            }
461:
462:            /**
463:             * Set the default icon used for pages.
464:             * @param icon Icon image.  If null, mapping is deleted.
465:             */
466:            public void setPageIcon(Image icon) {
467:                pageIcon = icon;
468:                setIcon(LinkEvent.eventName[LinkEvent.VISITED], icon);
469:            }
470:
471:            /**
472:             * Set the default icon used for links.
473:             * @param icon Icon image.  If null, mapping is deleted.
474:             */
475:            public void setLinkIcon(Image icon) {
476:                linkIcon = icon;
477:                setIcon(LinkEvent.eventName[LinkEvent.QUEUED], icon);
478:                setIcon(LinkEvent.eventName[LinkEvent.ALREADY_VISITED], icon);
479:                setIcon(LinkEvent.eventName[LinkEvent.SKIPPED], icon);
480:            }
481:
482:            /**
483:             * Set the default icon used for requests in progress.
484:             * @param icon Icon image.  If null, mapping is deleted.
485:             */
486:            public void setRetrievingIcon(Image icon) {
487:                retrievingIcon = icon;
488:                setIcon(LinkEvent.eventName[LinkEvent.RETRIEVING], icon);
489:                setIcon(LinkEvent.eventName[LinkEvent.DOWNLOADED], icon);
490:            }
491:
492:            /**
493:             * Set the default icon used for failed requests.
494:             * @param icon Icon image.  If null, mapping is deleted.
495:             */
496:            public void setErrorIcon(Image icon) {
497:                errorIcon = icon;
498:                setIcon(LinkEvent.eventName[LinkEvent.ERROR], icon);
499:            }
500:
501:            public static Image defaultPageIcon;
502:            public static Image defaultLinkIcon;
503:            public static Image defaultRetrievingIcon;
504:            public static Image defaultErrorIcon;
505:
506:            static int errorWidth = 16;
507:            static int errorHeight = 16;
508:            static int[] errorData = { 0xffffff, 0xffffff, 0xffffff, 0xffffff,
509:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
510:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
511:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
512:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
513:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
514:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
515:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
516:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
517:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
518:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
519:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xfffc0404,
520:                    0xfffc0404, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
521:                    0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff, 0xffffff,
522:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
523:                    0xfffc0404, 0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff,
524:                    0xfffc0404, 0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff,
525:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
526:                    0xffffff, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404,
527:                    0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff, 0xffffff,
528:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
529:                    0xffffff, 0xffffff, 0xfffc0404, 0xfffc0404, 0xfffc0404,
530:                    0xfffc0404, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
531:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
532:                    0xffffff, 0xffffff, 0xfffc0404, 0xfffc0404, 0xfffc0404,
533:                    0xfffc0404, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
534:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
535:                    0xffffff, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404,
536:                    0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff, 0xffffff,
537:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
538:                    0xfffc0404, 0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff,
539:                    0xfffc0404, 0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff,
540:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
541:                    0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff, 0xffffff,
542:                    0xffffff, 0xfffc0404, 0xfffc0404, 0xffffff, 0xffffff,
543:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
544:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
545:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
546:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
547:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
548:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
549:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
550:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
551:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
552:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
553:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff };
554:
555:            static int linkWidth = 16;
556:            static int linkHeight = 16;
557:            static int[] linkData = { 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
558:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
559:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xff343464, 0xff343464,
560:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
561:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
562:                    0xff343464, 0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xff343464,
563:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
564:                    0xfcfcfc, 0xff343464, 0xff343464, 0xff343464, 0xff343464,
565:                    0xffd4d4fc, 0xffd4d4fc, 0xffc4c4c4, 0xff6464cc, 0xff343464,
566:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
567:                    0xff343464, 0xffccccfc, 0xff848484, 0xff343464, 0xffd4d4fc,
568:                    0xff848484, 0xff848484, 0xff6464cc, 0xff343464, 0xfcfcfc,
569:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xff343464,
570:                    0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xff343464, 0xffd4d4fc,
571:                    0xffc4c4c4, 0xff6464cc, 0xff6464cc, 0xff343464, 0xfcfcfc,
572:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
573:                    0xff343464, 0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xff343464,
574:                    0xffd4d4fc, 0xffc4c4c4, 0xff6464cc, 0xff6464cc, 0xff343464,
575:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
576:                    0xff343464, 0xffccccfc, 0xffd4d4fc, 0xffc4c4c4, 0xff343464,
577:                    0xff343464, 0xff6464cc, 0xff6464cc, 0xff343464, 0xff343464,
578:                    0xff343464, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
579:                    0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xffc4c4c4, 0xff343464,
580:                    0xfcfcfc, 0xfcfcfc, 0xff343464, 0xff343464, 0xffd4d4fc,
581:                    0xffccccfc, 0xff343464, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
582:                    0xff343464, 0xffccccfc, 0xffc4c4c4, 0xff343464, 0xff343464,
583:                    0xfcfcfc, 0xfcfcfc, 0xff040404, 0xff343464, 0xffccccfc,
584:                    0xffc4c4c4, 0xffc4c4c4, 0xff343464, 0xfcfcfc, 0xfcfcfc,
585:                    0xfcfcfc, 0xff343464, 0xff040404, 0xff343464, 0xff343464,
586:                    0xff343464, 0xfcfcfc, 0xff040404, 0xff343464, 0xffccccfc,
587:                    0xffc4c4c4, 0xff343464, 0xff343464, 0xfcfcfc, 0xfcfcfc,
588:                    0xfcfcfc, 0xfcfcfc, 0xff343464, 0xff343464, 0xffd4d4fc,
589:                    0xffc4c4c4, 0xffc4c4c4, 0xff343464, 0xff343464, 0xffccccfc,
590:                    0xffc4c4c4, 0xff343464, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
591:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xff343464, 0xffccccfc,
592:                    0xff040404, 0xff6464cc, 0xff6464cc, 0xff343464, 0xffccccfc,
593:                    0xff040404, 0xff343464, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
594:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xff343464,
595:                    0xffccccfc, 0xff040404, 0xff6464cc, 0xff6464cc, 0xff343464,
596:                    0xffccccfc, 0xff040404, 0xff343464, 0xfcfcfc, 0xfcfcfc,
597:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xff343464,
598:                    0xffccccfc, 0xffc4c4c4, 0xff6464cc, 0xff343464, 0xff343464,
599:                    0xffccccfc, 0xffc4c4c4, 0xff343464, 0xfcfcfc, 0xfcfcfc,
600:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
601:                    0xff343464, 0xff040404, 0xff6464cc, 0xff343464, 0xff343464,
602:                    0xff343464, 0xff343464, 0xff343464, 0xfcfcfc, 0xfcfcfc,
603:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
604:                    0xff343464, 0xff343464, 0xff343464, 0xfcfcfc, 0xfcfcfc,
605:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc,
606:                    0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc };
607:
608:            static int retrieveWidth = 16;
609:            static int retrieveHeight = 16;
610:            static int[] retrieveData = { 0xffffff, 0xffffff, 0xffffff,
611:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
612:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
613:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
614:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
615:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
616:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
617:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
618:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
619:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
620:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
621:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
622:                    0xffffff, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
623:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
624:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
625:                    0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
626:                    0xff008000, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
627:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
628:                    0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
629:                    0xff008000, 0xff008000, 0xff008000, 0xffffff, 0xffffff,
630:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
631:                    0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
632:                    0xff008000, 0xff008000, 0xff008000, 0xffffff, 0xffffff,
633:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
634:                    0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
635:                    0xff008000, 0xff008000, 0xff008000, 0xffffff, 0xffffff,
636:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
637:                    0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
638:                    0xff008000, 0xff008000, 0xff008000, 0xffffff, 0xffffff,
639:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
640:                    0xffffff, 0xff008000, 0xff008000, 0xff008000, 0xff008000,
641:                    0xff008000, 0xff008000, 0xffffff, 0xffffff, 0xffffff,
642:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
643:                    0xffffff, 0xffffff, 0xff008000, 0xff008000, 0xff008000,
644:                    0xff008000, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
645:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
646:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
647:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
648:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
649:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
650:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
651:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
652:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
653:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
654:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff,
655:                    0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff };
656:
657:            static int pageWidth = 16;
658:            static int pageHeight = 16;
659:            static int[] pageData = { 0xffff, 0xff000000, 0xff000000,
660:                    0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000,
661:                    0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xffff,
662:                    0xffff, 0xffff, 0xffff, 0xffff, 0xff343434, 0xfffcfcfc,
663:                    0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc,
664:                    0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xffffffff, 0xff000000,
665:                    0xffff, 0xffff, 0xffff, 0xffff, 0xff343434, 0xfffcfcfc,
666:                    0xff343434, 0xff343434, 0xff343434, 0xff343434, 0xff343434,
667:                    0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xffffffff, 0xffffffff,
668:                    0xff343434, 0xffff, 0xffff, 0xffff, 0xff343434, 0xfffcfcfc,
669:                    0xff343434, 0xfffccc34, 0xfffccc34, 0xff64ccfc, 0xff64ccfc,
670:                    0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xffffffff, 0xffffffff,
671:                    0xffffffff, 0xff343434, 0xffff, 0xffff, 0xff343434,
672:                    0xfffcfcfc, 0xff343434, 0xff64ccfc, 0xff64ccfc, 0xff64ccfc,
673:                    0xff64ccfc, 0xfffcfcfc, 0xfffcfcfc, 0xff040404, 0xff040404,
674:                    0xff040404, 0xff040404, 0xff040404, 0xffff, 0xffff,
675:                    0xff343434, 0xfffcfcfc, 0xff343434, 0xff9c6434, 0xff9c6434,
676:                    0xff9c6434, 0xff9c6434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc,
677:                    0xfffcfcfc, 0xffffffff, 0xff000000, 0xff9c9c9c, 0xffff,
678:                    0xffff, 0xff343434, 0xfffcfcfc, 0xff343434, 0xff9c6434,
679:                    0xff9c6434, 0xff9c6434, 0xff9c6434, 0xfffcfcfc, 0xfffcfcfc,
680:                    0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff000000, 0xff9c9c9c,
681:                    0xffff, 0xffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc,
682:                    0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc,
683:                    0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff000000,
684:                    0xff9c9c9c, 0xffff, 0xffff, 0xff343434, 0xfffcfcfc,
685:                    0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404,
686:                    0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xfffcfcfc,
687:                    0xff000000, 0xff9c9c9c, 0xffff, 0xffff, 0xff343434,
688:                    0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
689:                    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
690:                    0xfffcfcfc, 0xff000000, 0xff9c9c9c, 0xffff, 0xffff,
691:                    0xff343434, 0xffffffff, 0xffffffff, 0xfffcfcfc, 0xfffc3434,
692:                    0xfffcfcfc, 0xff040404, 0xff040404, 0xff040404, 0xff040404,
693:                    0xff040404, 0xfffcfcfc, 0xff000000, 0xff9c9c9c, 0xffff,
694:                    0xffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc,
695:                    0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc,
696:                    0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff000000, 0xff9c9c9c,
697:                    0xffff, 0xffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc,
698:                    0xfffcfcfc, 0xfffc3434, 0xfffcfcfc, 0xff000000, 0xff000000,
699:                    0xff040404, 0xff040404, 0xff040404, 0xfffcfcfc, 0xff000000,
700:                    0xff9c9c9c, 0xffff, 0xffff, 0xff343434, 0xfffcfcfc,
701:                    0xfffcfcfc, 0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff,
702:                    0xffffffff, 0xffffffff, 0xffffffff, 0xffffffff, 0xfffcfcfc,
703:                    0xff000000, 0xff9c9c9c, 0xffff, 0xffff, 0xff000000,
704:                    0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000,
705:                    0xff000000, 0xff000000, 0xff000000, 0xff000000, 0xff000000,
706:                    0xff000000, 0xff000000, 0xff9c9c9c, 0xffff, 0xffff, 0xffff,
707:                    0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c,
708:                    0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c,
709:                    0xff9c9c9c, 0xff9c9c9c, 0xffff, 0xffff };
710:
711:            static {
712:                Toolkit tkit = Toolkit.getDefaultToolkit();
713:                defaultPageIcon = tkit.createImage(new MemoryImageSource(
714:                        pageWidth, pageHeight, pageData, 0, pageWidth));
715:                defaultLinkIcon = tkit.createImage(new MemoryImageSource(
716:                        linkWidth, linkHeight, linkData, 0, linkWidth));
717:                defaultRetrievingIcon = tkit.createImage(new MemoryImageSource(
718:                        retrieveWidth, retrieveHeight, retrieveData, 0,
719:                        retrieveWidth));
720:                defaultErrorIcon = tkit.createImage(new MemoryImageSource(
721:                        errorWidth, errorHeight, errorData, 0, errorWidth));
722:            }
723:
724:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.