Presentation is loading. Please wait.

Presentation is loading. Please wait.

Capstone 2004 Viewing HTML in Java Dashboard & Implicit Query Presenter: Krishnan Ram.

Similar presentations


Presentation on theme: "Capstone 2004 Viewing HTML in Java Dashboard & Implicit Query Presenter: Krishnan Ram."— Presentation transcript:

1 Capstone 2004 Viewing HTML in Java Dashboard & Implicit Query Presenter: Krishnan Ram

2 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.

3 Java Java’s swing component is capable of displaying HTML pages. HTML pages are viewed using a JEditorPane This supports styled text.

4 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

5 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.

6 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; }

7 References Using Text Components http://java.sun.com/docs/books/tutorial/uis wing/components/text.html http://java.sun.com/docs/books/tutorial/uis wing/components/text.html http://java.sun.com/docs/books/tutorial/uis wing/components/text.html Java API http://java.sun.com/j2se/1.5.0/docs/api/ http://java.sun.com/j2se/1.5.0/docs/api/ Javaworld.com http://www.javaworld.com/javaworld/jw-01- 1999/jw-01-swing.html http://www.javaworld.com/javaworld/jw-01- 1999/jw-01-swing.html http://www.javaworld.com/javaworld/jw-01- 1999/jw-01-swing.html

8 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

9 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.

10

11 Example Nat Friedman-ximian.com


Download ppt "Capstone 2004 Viewing HTML in Java Dashboard & Implicit Query Presenter: Krishnan Ram."

Similar presentations


Ads by Google