Capstone 2004 Viewing HTML in Java Dashboard & Implicit Query Presenter: Krishnan Ram
Displaying HTML In Java Window First- Why is this important? Virtual Classroom Virtual Classroom Ability to surf to work-related hyperlinks while viewing a lecture Virtual NYC Virtual NYC Ability to link locations to websites Eg. Clicking on Pizza Hut can open the Pizza Hut website. Eg. Clicking on Pizza Hut can open the Pizza Hut website.
Java Java’s swing component is capable of displaying HTML pages. HTML pages are viewed using a JEditorPane This supports styled text.
JEditorPane Currently knows about 3 types of content text/plain-uses DefaultEditorKit text/plain-uses DefaultEditorKit Editor Kits are contain classes that write content to the JEditorPane. text/html-uses HTMLEditorKit text/html-uses HTMLEditorKit text/rtf-uses RTFEditorKit text/rtf-uses RTFEditorKit
HTMLEditorKit This kit contains classes for displaying various html objects. How it works? Load a HTML file into the JEditorPane object and the editor kit will dictate how the HTML objects are displayed in the window-very similar to a web browser. Load a HTML file into the JEditorPane object and the editor kit will dictate how the HTML objects are displayed in the window-very similar to a web browser. In fact, I found a very simple Java web browser that uses a JEditorPane for its display. In fact, I found a very simple Java web browser that uses a JEditorPane for its display.
Example of Code private JEditorPane createEditorPane() { JEditorPane editorPane = new JEditorPane(); editorPane.setEditable(false); java.net.URL helpURL = TextSamplerDemo.class.getResource( "google.html"); if (helpURL != null) { try { editorPane.setPage(helpURL); } catch (IOException e) { System.err.println("Attempted to read a bad URL: " + helpURL); } } else { System.err.println("Couldn't find file: TextSampleDemoHelp.html"); } return editorPane; }
References Using Text Components wing/components/text.html wing/components/text.html wing/components/text.html Java API Javaworld.com /jw-01-swing.html /jw-01-swing.html /jw-01-swing.html
Dashboard & Implicit Query Dashboard- Linux Implicit Query- Mircrosoft Both have same principles Both have same principles Instantaneous and continuous search of your workspace for relevant objects
Dashboard & Implicit Query Idea: Dashboard/Implicit Query continuously monitor you current workspace, all open windows such as chat windows & websites and searches for keywords or cluewords and will return any possible relevant information on those keywords to the Dashboard interface.
Example Nat Friedman-ximian.com