1 19 20 package org.netbeans.modules.j2ee.blueprints.ui; 21 22 import java.net.URL ; 23 24 29 public class HomeTab 30 extends BluePrintsTabPanel 31 { 32 33 public HomeTab(BluePrintsPanel bluePrintsPanel) { 34 super(bluePrintsPanel); 35 initComponents(); 36 } 37 38 43 private void initComponents() { 45 homeBrowser = new HtmlBrowserWithScrollPosition(); 46 47 setLayout(new java.awt.BorderLayout ()); 48 49 add(homeBrowser, java.awt.BorderLayout.CENTER); 50 51 } 52 54 55 private javax.swing.JPanel homeBrowser; 57 59 public void setScrollPosition(int scrollPosition) { 60 ((HtmlBrowserWithScrollPosition)homeBrowser). 61 setScrollPosition(scrollPosition); 62 } 63 64 public int getScrollPosition() { 65 return ((HtmlBrowserWithScrollPosition)homeBrowser). 66 getScrollPosition(); 67 } 68 69 public void updateTab() { 70 String articleURLString = BluePrintsPanel.CATALOG_RESOURCES_URL 71 + "/descriptions/bpcatalog-home.html"; BpcatalogLocalizedResource htmlrsc = 73 new BpcatalogLocalizedResource(articleURLString, "html"); 74 URL articleURL = htmlrsc.getResourceURL(); 75 if (articleURL!=null){ 76 ((HtmlBrowserWithScrollPosition)homeBrowser).setURL(articleURL); 77 } 78 } 79 } 80 | Popular Tags |