1 32 33 package websphinx.workbench; 34 35 import websphinx.*; 36 import java.awt.*; 37 import java.util.Hashtable ; 38 import java.util.Vector ; 39 import java.applet.Applet ; 40 import java.applet.AppletContext ; 41 import java.net.URL ; 42 import java.net.MalformedURLException ; 43 import rcm.awt.Colors; 44 import rcm.awt.ClosableFrame; 45 import java.awt.image.MemoryImageSource ; 46 import graph.Graph; 47 import rcm.awt.Constrain; 48 import rcm.awt.PopupDialog; 49 50 52 public class WebGraph extends GraphLayout implements CrawlListener, LinkListener { 53 54 Hashtable links = new Hashtable (); 55 57 60 public WebGraph () { 61 setPageIcon (defaultPageIcon); 62 setLinkIcon (defaultLinkIcon); 63 setRetrievingIcon (defaultRetrievingIcon); 64 setErrorIcon (defaultErrorIcon); 65 } 66 67 69 static final int NO_LINKS = 0; 70 72 static final int RETRIEVED_LINKS = 1; 73 75 static final int WALKED_LINKS = 2; 76 78 static final int TREE_LINKS = 3; 79 81 static final int ALL_LINKS = 4; 82 84 int defaultFilter = RETRIEVED_LINKS; 85 86 synchronized void setLinkFilter (WebNode node, int filter) { 88 if (filter == node.filter) 89 return; 90 91 Page page = node.link.getPage (); 92 if (page != null) { 93 Link[] linkarray = page.getLinks (); 94 95 if (filter < node.filter) { 96 for (int j=0; j<linkarray.length; ++j) { 98 if (!shouldDisplay (filter, linkarray[j].getStatus())) { 99 WebEdge edge = (WebEdge)links.get (linkarray[j]); 100 if (edge != null) { 101 removeNode ((WebNode)edge.to); 102 removeEdge (edge); 103 links.remove (linkarray[j]); 104 } 105 } 106 } 107 } 108 else if (filter > node.filter) { 109 for (int j=0; j<linkarray.length; ++j) { 111 update (linkarray[j]); } 113 } 114 } 115 116 node.filter = filter; 117 } 118 119 synchronized void setLinkFilter (int filter) { 121 defaultFilter = filter; 122 Graph graph = getGraph (); 123 for (int i=0; i<graph.sizeNodes; ++i) { 124 WebNode n = (WebNode)graph.nodes[i]; 125 setLinkFilter (n, filter); 126 } 127 } 128 129 131 static final int ICON = 0; 132 134 static final int TITLE = 1; 135 137 static final int ABSOLUTE_URL = 2; 138 140 static final int RELATIVE_URL = 3; 141 143 int defaultRendering = ICON; 144 145 void setNodeRendering (WebNode n, int r) { 147 n.rendering = r; 148 update(n); 149 150 repaint (); 151 } 152 153 synchronized void setNodeRendering (int r) { 155 defaultRendering = r; 156 157 Graph graph = getGraph (); 158 for (int i=0; i<graph.sizeNodes; ++i) { 159 WebNode n = (WebNode)graph.nodes[i]; 160 n.rendering = r; 161 update (n); 162 } 163 164 changedGraph (); 165 } 166 167 170 public void showControlPanel () { 171 new WorkbenchControlPanel (this, null).show (); 172 } 173 174 177 public synchronized void clear () { 178 links.clear (); 179 super.clear (); 180 } 181 182 185 public void started (CrawlEvent event) { 186 } 187 188 191 public void stopped (CrawlEvent event) { 192 } 193 194 197 public void cleared (CrawlEvent event) { 198 clear (); 199 } 200 201 204 public void timedOut (CrawlEvent event) { 205 } 206 207 210 public void paused (CrawlEvent event) { 211 } 212 213 216 public void crawled (LinkEvent event) { 217 update (event.getLink ()); 218 } 219 220 boolean shouldDisplay (int filter, int status) { 222 switch (status) { 223 case LinkEvent.QUEUED: 224 case LinkEvent.TOO_DEEP: 225 return (filter > RETRIEVED_LINKS); 226 case LinkEvent.SKIPPED: 227 return (filter > WALKED_LINKS); 228 case LinkEvent.ALREADY_VISITED: 229 return (filter > TREE_LINKS); 230 case LinkEvent.RETRIEVING: 231 case LinkEvent.DOWNLOADED: 232 case LinkEvent.VISITED: 233 case LinkEvent.ERROR: 234 return true; 235 default: 236 return false; 237 } 238 } 239 240 244 public void updateClosure (Link[] links) { 245 if (links == null) 246 return; 247 for (int i=0; i < links.length; ++i) { 248 Link link = links[i]; 249 int status = link.getStatus(); 250 251 if (status == LinkEvent.NONE) 252 continue; 253 254 update (link); 255 256 if (status == LinkEvent.DOWNLOADED || status == LinkEvent.VISITED) { 257 Page page = link.getPage(); 258 if (page != null) 259 updateClosure (page.getLinks ()); 260 } 261 } 262 } 263 264 268 public synchronized void update (Link link) { 269 Object obj = links.get (link); 270 271 if (obj == null) { 272 add (link); 273 } 274 else if (obj instanceof WebEdge) { 275 WebEdge e = (WebEdge) obj; 276 update (e); 277 update ((WebNode)e.to); 278 } 279 else { 280 update ((WebNode)obj); 282 } 283 284 repaint (); 285 } 286 287 synchronized void add (Link link) { 288 WebNode n = new WebNode (link, defaultFilter, defaultRendering); 289 WebNode parent = findParent (link); 290 291 if (parent == null) { 292 links.put (link, n); 293 update (n); 294 addNode (n); 295 296 if (getGraph().sizeNodes == 1) { 297 n.fixed = true; 299 placeNodeOnGraph (n, 0, 0); 300 } 301 else { 302 305 Dimension d = size (); 306 307 int x = (int)(Math.random() * d.width); 308 int y = (int)(Math.random() * d.height); 309 placeNodeOnScreen (n, x, y); 310 } 311 } 312 else { 313 if (!shouldDisplay (parent.filter, link.getStatus ())) 315 return; 316 317 double len = getRestLength(); 319 double angle = Math.random () * 2 * Math.PI; 320 double x = parent.x + len*Math.cos(angle); 321 double y = parent.y + len*Math.sin(angle); 322 323 update (n); 324 addNode (n); 325 placeNodeOnGraph (n, x, y); 326 327 WebEdge e = new WebEdge (link, parent, n); 328 links.put (link, e); 329 update (e); 330 addEdge (e); 331 } 332 } 333 334 void update (WebEdge e) { 335 e.color = Colors.parseColor (e.link.getLabel ("Workbench.color")); 336 e.thick = e.link.hasLabel ("Workbench.thick"); 337 } 338 339 void update (WebNode n) { 340 Page page = n.link.getPage (); 341 int status = n.link.getStatus (); 342 343 if (page == null) { 344 switch (n.rendering) { 346 case ICON: 347 n.name = null; 348 n.icon = getIcon (LinkEvent.eventName[status]); 349 break; 350 case TITLE: 351 case ABSOLUTE_URL: 352 n.name = n.link.getURL().toString(); 353 n.icon = null; 354 break; 355 case RELATIVE_URL: { 356 Link origin = n.link.getSource().getOrigin(); 357 if (origin != null) 358 n.name = Link.relativeTo (origin.getURL(), n.link.getURL()); 359 else 360 n.name = n.link.getURL().toString(); 361 n.icon = null; 362 break; 363 } 364 } 365 } 366 else { 367 switch (n.rendering) { 368 case ICON: 369 n.name = null; 370 n.icon = getIcon (page.getLabel ("Workbench.icon", 371 LinkEvent.eventName[status])); 372 break; 373 case TITLE: 374 n.name = page.getTitle (); 375 if (n.name == null) 376 n.name = "[" + n.link.getURL().toString() + "]"; 377 n.icon = null; 378 break; 379 case ABSOLUTE_URL: 380 n.name = n.link.getURL().toString(); 381 n.icon = null; 382 break; 383 case RELATIVE_URL: { 384 Link origin = n.link.getSource().getOrigin(); 385 if (origin != null) 386 n.name = Link.relativeTo (origin.getURL(), n.link.getURL()); 387 else 388 n.name = n.link.getURL().toString(); 389 n.icon = null; 390 break; 391 } 392 } 393 n.color = Colors.parseColor (page.getLabel ("Workbench.color")); 394 n.scale = page.getNumericLabel ("Workbench.size", 395 new Integer (1)).doubleValue (); 396 } 397 398 if (n.icon == null) { 399 FontMetrics fm = getFontMetrics (); 400 n.width = fm.stringWidth (n.name) + 10; 401 n.height = fm.getHeight () + 4; 402 } 403 else { 404 n.width = (int)(n.icon.getWidth(this) * n.scale); 405 n.height = (int)(n.icon.getHeight(this) * n.scale); 406 } 407 } 408 409 WebEdge findEdge (Link l) { 410 if (l == null) 411 return null; 412 Object obj = links.get (l); 413 if (obj instanceof WebEdge) 414 return (WebEdge)obj; 415 else 416 return null; 417 } 418 419 WebNode findNode (Link l) { 420 if (l == null) 421 return null; 422 Object obj = links.get (l); 423 if (obj instanceof WebEdge) 424 return (WebNode)((WebEdge)obj).to; 425 else 426 return (WebNode)obj; 427 } 428 429 WebNode findParent (Link l) { 430 if (l == null) 431 return null; 432 Page source = l.getSource (); 433 Link origin = source.getOrigin (); 434 return findNode (origin); 435 } 436 437 440 441 private Vector listeners = new Vector (); 442 443 448 public void addLinkViewListener (LinkViewListener listener) { 449 if (!listeners.contains (listener)) 450 listeners.addElement (listener); 451 } 452 453 459 public void removeLinkViewListener (CrawlListener listener) { 460 listeners.removeElement (listener); 461 } 462 463 void fireEvent (Link link) { 464 LinkViewEvent event = new LinkViewEvent (this, link); 465 466 for (int j=0, len=listeners.size(); j<len; ++j) { 467 LinkViewListener listen = (LinkViewListener)listeners.elementAt(j); 468 listen.viewLink (event); 469 } 470 } 471 472 void doubleClick (int x, int y) { 473 Object over = pick (x, y); 474 if (over != null) { 475 Link link; 476 if (over instanceof WebNode) 477 link = ((WebNode)over).link; 478 else 479 link = ((WebEdge)over).link; 480 fireEvent (link); 481 } 482 } 483 484 public boolean handleEvent (Event event) { 485 if (event.id == Event.MOUSE_DOWN && event.clickCount == 2) { 486 doubleClick (event.x, event.y); 487 } 488 else 489 return super.handleEvent (event); 490 return true; 491 } 492 493 public Link getSelectedLink () { 494 WebNode n = (WebNode)getSelectedNode(); 495 if (n != null) 496 return n.link; 497 498 WebEdge e = (WebEdge)getSelectedEdge(); 499 if (e != null) 500 return e.link; 501 502 return null; 503 } 504 505 508 public static Frame monitor (Crawler crawler) { 509 Frame win = new ClosableFrame ("Graph: " + crawler.getName ()); 510 511 WebGraph g = new WebGraph (); 512 crawler.addCrawlListener (g); 513 crawler.addLinkListener (g); 514 g.setNodeCharge (1000); 515 g.setRestLength (50); 516 517 win.add ("Center", g); 518 win.pack (); 519 win.show (); 520 521 return win; 522 } 523 524 static String [] getTip (Link link) { 525 Vector result = new Vector (); 526 527 String exception = link.getLabel ("exception"); 528 if (exception != null && exception.length() > 0) 529 result.addElement ("*** " + exception); 530 531 String anchor = link.toText (); 532 if (anchor != null && anchor.length() > 0) 533 result.addElement (anchor); 534 535 String url = link.getURL ().toString (); 536 if (url != null && url.length() > 0) 537 result.addElement (url); 538 539 String labels = link.getObjectLabels (); 540 if (labels != null && labels.length() > 0) 541 result.addElement (labels); 542 543 String [] tip = new String [result.size ()]; 544 result.copyInto (tip); 545 return tip; 546 } 547 548 static String [] getTip (Page page) { 549 Vector result = new Vector (); 550 551 String title = page.getTitle (); 552 if (title != null && title.length() > 0) 553 result.addElement (title); 554 555 String url = page.getURL ().toString(); 556 if (url != null && url.length() > 0) 557 result.addElement (url); 558 559 String labels = page.getObjectLabels (); 560 if (labels != null && labels.length() > 0) 561 result.addElement (labels); 562 563 String [] tip = new String [result.size ()]; 564 result.copyInto (tip); 565 return tip; 566 } 567 568 569 Hashtable icons = new Hashtable (); 570 572 Image pageIcon; 573 Image linkIcon; 574 Image retrievingIcon; 575 Image errorIcon; 576 577 582 public synchronized Image getIcon (String name) { 583 return (Image)icons.get (name); 584 } 585 586 591 public synchronized void setIcon (String name, Image icon) { 592 if (icon != null) 593 icons.put (name, icon); 594 else 595 icons.remove (name); 596 } 597 598 602 public synchronized void setPageIcon (Image icon) { 603 pageIcon = icon; 604 setIcon (LinkEvent.eventName[LinkEvent.VISITED], icon); 605 } 606 607 611 public synchronized void setLinkIcon (Image icon) { 612 linkIcon = icon; 613 setIcon (LinkEvent.eventName[LinkEvent.QUEUED], icon); 614 setIcon (LinkEvent.eventName[LinkEvent.TOO_DEEP], icon); 615 setIcon (LinkEvent.eventName[LinkEvent.ALREADY_VISITED], icon); 616 setIcon (LinkEvent.eventName[LinkEvent.SKIPPED], icon); 617 } 618 619 623 public synchronized void setRetrievingIcon (Image icon) { 624 retrievingIcon = icon; 625 setIcon (LinkEvent.eventName[LinkEvent.RETRIEVING], icon); 626 setIcon (LinkEvent.eventName[LinkEvent.DOWNLOADED], icon); 627 } 628 629 633 public synchronized void setErrorIcon (Image icon) { 634 errorIcon = icon; 635 setIcon (LinkEvent.eventName[LinkEvent.ERROR], icon); 636 } 637 638 639 public static Image defaultPageIcon; 640 public static Image defaultLinkIcon; 641 public static Image defaultRetrievingIcon; 642 public static Image defaultErrorIcon; 643 644 static int linkWidth = 17; 645 static int linkHeight = 17; 646 static int[] linkData = { 647 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 648 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 649 0xfffcfcfc, 0xff343464, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 650 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 651 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xff343464, 652 0xffd4d4fc, 0xffc4c4c4, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 653 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 654 0xff343464, 0xff343464, 0xff343464, 0xffd4d4fc, 0xffd4d4fc, 0xffc4c4c4, 655 0xff6464cc, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 656 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xffccccfc, 0xff848484, 657 0xff343464, 0xffd4d4fc, 0xff848484, 0xff848484, 0xff6464cc, 0xff343464, 658 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 659 0xff343464, 0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xff343464, 0xffd4d4fc, 660 0xffc4c4c4, 0xff6464cc, 0xff6464cc, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 661 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 662 0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xff343464, 0xffd4d4fc, 0xffc4c4c4, 663 0xff6464cc, 0xff6464cc, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 664 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xffccccfc, 0xffd4d4fc, 665 0xffc4c4c4, 0xff343464, 0xff343464, 0xff6464cc, 0xff6464cc, 0xff343464, 666 0xff343464, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 667 0xfffcfcfc, 0xff343464, 0xffd4d4fc, 0xffc4c4c4, 0xffc4c4c4, 0xff343464, 668 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xff343464, 0xffd4d4fc, 0xffccccfc, 669 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 670 0xffccccfc, 0xffc4c4c4, 0xff343464, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 671 0xff040404, 0xff343464, 0xffccccfc, 0xffc4c4c4, 0xffc4c4c4, 0xff343464, 672 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xff040404, 673 0xff343464, 0xff343464, 0xff343464, 0xfffcfcfc, 0xff040404, 0xff343464, 674 0xffccccfc, 0xffc4c4c4, 0xff343464, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 675 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xff343464, 0xffd4d4fc, 676 0xffc4c4c4, 0xffc4c4c4, 0xff343464, 0xff343464, 0xffccccfc, 0xffc4c4c4, 677 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 678 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xffccccfc, 0xff040404, 0xff6464cc, 679 0xff6464cc, 0xff343464, 0xffccccfc, 0xff040404, 0xff343464, 0xfffcfcfc, 680 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 681 0xfffcfcfc, 0xff343464, 0xffccccfc, 0xff040404, 0xff6464cc, 0xff6464cc, 682 0xff343464, 0xffccccfc, 0xff040404, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 683 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 684 0xffccccfc, 0xffc4c4c4, 0xff6464cc, 0xff343464, 0xff343464, 0xffccccfc, 685 0xffc4c4c4, 0xff343464, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 686 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xff040404, 687 0xff6464cc, 0xff343464, 0xff343464, 0xff343464, 0xff343464, 0xff343464, 688 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 689 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343464, 0xff343464, 0xff343464, 690 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 691 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 692 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 693 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 694 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 695 0xfffcfcfc 696 }; 697 698 static int pageWidth = 22; 699 static int pageHeight = 26; 700 static int[] pageData = { 701 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 702 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 703 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 704 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 705 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 706 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 707 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 708 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xff343434, 709 0xff343434, 0xff343434, 0xff343434, 0xff343434, 0xff343434, 0xff343434, 710 0xff343434, 0xff343434, 0xff343434, 0xff343434, 0xff343434, 0xffffff, 711 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 712 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 713 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 714 0xfffcfcfc, 0xff343434, 0xfffcfcfc, 0xff343434, 0xffffff, 0xffffff, 715 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 716 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 717 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 718 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xffffff, 0xffffff, 0xffffff, 719 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 720 0xfffcfcfc, 0xff343434, 0xff343434, 0xff343434, 0xff343434, 0xff343434, 721 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 722 0xfffcfcfc, 0xff343434, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 723 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 724 0xfffccc34, 0xfffccc34, 0xff64ccfc, 0xff64ccfc, 0xff64ccfc, 0xfffcfcfc, 725 0xfffcfcfc, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 726 0xff343434, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 727 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xfffccc34, 0xff64ccfc, 728 0xff64ccfc, 0xff64ccfc, 0xff64ccfc, 0xfffcfcfc, 0xfffcfcfc, 0xff040404, 729 0xff343434, 0xff040404, 0xff343434, 0xff040404, 0xff343434, 0xff040404, 730 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 731 0xfffcfcfc, 0xff343434, 0xff64ccfc, 0xff64ccfc, 0xff64ccfc, 0xff64ccfc, 732 0xff64ccfc, 0xfffcfcfc, 0xfffcfcfc, 0xff040404, 0xff040404, 0xff040404, 733 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xffffff, 0xffffff, 734 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 735 0xff9c6434, 0xff9c6434, 0xff9c6434, 0xff9c6434, 0xff9c6434, 0xfffcfcfc, 736 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 737 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 738 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff343434, 0xff9c6434, 0xff9c6434, 739 0xff9c6434, 0xff9c6434, 0xff9c6434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 740 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff040404, 741 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 742 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 743 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 744 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 745 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 746 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 747 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 748 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 749 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff040404, 0xff040404, 0xff040404, 750 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 751 0xff040404, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 752 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 753 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 754 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 755 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 756 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xff040404, 757 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 758 0xff040404, 0xff040404, 0xff040404, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 759 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 760 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 761 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 762 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 763 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 764 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffc3434, 0xfffcfcfc, 0xff040404, 765 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xfffcfcfc, 766 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 767 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 768 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 769 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 770 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 771 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffc3434, 772 0xfffcfcfc, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 773 0xff040404, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 774 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 775 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 776 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 777 0xfffcfcfc, 0xfffcfcfc, 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 778 0xffffff, 0xffffff, 0xff343434, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 779 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 780 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 0xfffcfcfc, 781 0xff9c9c9c, 0xff040404, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 782 0xff343434, 0xff343434, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 783 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 784 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff9c9c9c, 0xff343434, 0xff040404, 785 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 786 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 787 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xff040404, 788 0xff040404, 0xff040404, 0xff040404, 0xff040404, 0xffffff, 0xffffff, 789 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 790 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 791 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 792 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 793 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 794 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 795 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 0xffffff, 796 0xffffff, 0xffffff 797 }; 798 799 static int retrieveWidth = 8; 800 static int retrieveHeight = 8; 801 static int[] retrieveData = { 802 0xffffff, 0xffffff, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 803 0xffffff, 0xffffff, 0xffffff, 0xff008000, 0xff008000, 0xff008000, 804 0xff008000, 0xff008000, 0xff008000, 0xffffff, 0xff008000, 0xff008000, 805 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 806 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 807 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 808 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 809 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 810 0xffffff, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 0xff008000, 811 0xff008000, 0xffffff, 0xffffff, 0xffffff, 0xff008000, 0xff008000, 812 0xff008000, 0xff008000, 0xffffff, 0xffffff 813 }; 814 815 static int errorWidth = 8; 816 static int errorHeight = 8; 817 static int[] errorData = { 818 0xfffc0404, 0xfffc0404, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 819 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfcfcfc, 820 0xfcfcfc, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfcfcfc, 0xfffc0404, 821 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfcfcfc, 822 0xfcfcfc, 0xfcfcfc, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 823 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfffc0404, 0xfffc0404, 824 0xfffc0404, 0xfffc0404, 0xfcfcfc, 0xfcfcfc, 0xfcfcfc, 0xfffc0404, 825 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfcfcfc, 826 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfcfcfc, 0xfcfcfc, 0xfffc0404, 827 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfffc0404, 0xfcfcfc, 0xfcfcfc, 828 0xfcfcfc, 0xfcfcfc, 0xfffc0404, 0xfffc0404 829 }; 830 831 static { 832 Toolkit tkit = Toolkit.getDefaultToolkit (); 833 defaultPageIcon = tkit.createImage ( 834 new MemoryImageSource (pageWidth, pageHeight, 835 pageData, 0, pageWidth)); 836 defaultLinkIcon = tkit.createImage ( 837 new MemoryImageSource (linkWidth, linkHeight, 838 linkData, 0, linkWidth)); 839 defaultRetrievingIcon = tkit.createImage ( 840 new MemoryImageSource (retrieveWidth, retrieveHeight, 841 retrieveData, 0, retrieveWidth)); 842 defaultErrorIcon = tkit.createImage ( 843 new MemoryImageSource (errorWidth, errorHeight, 844 errorData, 0, errorWidth)); 845 846 } 847 } 848 849 | Popular Tags |