Java Simple Browser

Requirements summary

The full requirements of the Java Simple Browser are available here: Java Simple Browser Requirements v1.2
For the purpose of this specification page let’s remind two fundamental technical requirements:

  • the Java Simple Browser must display simple HTML pages
  • the Java Simple Browser must be available as a light reusable Java Swing component

Specification

End-user point of view

From the end-user point of view the Java Simple Browser appears as part of a Swing application, like any other Swing component widget. The displayed content is a simplified rendering of an HTML content. Simplified rendering means that only a subset of HTML is rendered: * Fonts, font size * Colors (background, foreground) * Text attributes (bold, italic, underline and so on) * Text indent The page loading and rendering phase shall not block the application, i.e these phases must be asynchronous.

Java developer point of view

  • Reusing the Java Simple Browser component shall require only the Browser class to be used.
  • The browser component must be usable like any ordinary JComponent Swing component, providing similar API and behavior.
  • The thread management that allows asynchronous behavior of the component shall not be exposed to the developer reusing the component who shall not have to deal with it.
  • Some callbacks might be defined to give some control of the component to the developer when needed. (TO BE DEFINED LATER)

Implementation

  • The Java Simple Browser is implemented as a reusable component by the Browser class.
  • The Browser class provides the whole public API of the Java Simple Browser reusable component.
  • The Browser class constructor conforms to Java Swing component constructor patterns (same signature and same behavior)
  • The Browser class delegates specific functions to auxiliary specialized classes (AdressListener, NavigationListener and so on) for modularity reasons
  • The Browser class and its auxiliary classes are grouped in the com.modeliosoft.browser package. Only the Browser class is public in this package
  • Error management shall be exclusively based on exceptions

Validation

The Java Simple Component delivery will provide an executable Main class that pops a unique dialog showing a Java Simple Browser instance along with a text field where a URL can be entered. Once the URL has been entered, its contents is displayed in the browser component.