Changeset 26180 for other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/BrowseDisplay.java
- Timestamp:
- 2012-09-12T19:37:39+12:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
other-projects/gs3-webservices-java-client/trunk/src/GS3DemoClient/org/greenstone/gs3client/BrowseDisplay.java
r22299 r26180 452 452 if(docNode.hasNoText()) { //NoText field is 1, meaning it's an img 453 453 // now display the image 454 this.htmlPane.setText( 455 Displays.getImgUrlEnclosedInHtml(docNode.getImgURL())); 454 this.htmlPane.setText(Displays.getImgUrlEnclosedInHtml(client.getBaseURL(), docNode.getImgURL())); 456 455 } else { // it has text 457 456 // Java's htmlpane does not recognise justified alignment. … … 464 463 String docContent = docNode.getContent().replaceAll( 465 464 "ALIGN=\"JUSTIFY\"", "ALIGN=\"LEFT\""); 466 String baseURL = client.getBaseURL(); 465 String baseURL = client.getBaseURL(); 466 467 467 // TODO: make the docNode itself work out its URL by passing 468 468 // baseURL to the docNode? … … 477 477 = (HTMLDocument)this.htmlPane.getDocument(); 478 478 try{ 479 480 switch(client.getActiveDL()) { 481 482 case GS3JavaClient.GREENSTONE: 483 doc.setBase(new URL(baseURL)); 484 break; 485 case GS3JavaClient.FEDORA: 479 486 URL url = new URL(baseURL+docNode.getRoot().nodeID+"/"); 480 487 //System.err.println("url: " + url.toString()); … … 482 489 //docContent = docContent.replaceAll("_httpdocimg_/", ""); 483 490 LOG.debug(docContent); 491 break; 492 default: 493 break; 494 } 495 484 496 }catch(MalformedURLException mex) { 485 497 ; //nothing to be done, leave the base as it is 486 498 } 487 499 } 488 500 this.htmlPane.setText(docContent); 489 501 } … … 498 510 c.setCursor(Cursor.getDefaultCursor()); // set the cursor back to normal 499 511 } 500 512 501 513 /** Inner class (not static, as it needs access to outerclass' this object. 502 514 * This class represents a button that encapsulates a ClassifierData
Note:
See TracChangeset
for help on using the changeset viewer.