UltraLightClient Code Community
[ start | index | login ]
Overview > JDIC Integration

JDIC Integration

Belongs to following categories: Integration, ULC6.0, ULC6.1, ULC6.2, UltraLightClient '08,

Project Home
Downloads

Purpose

The ulc-jdic project aims to integrate the JDesktop Integration Components (JDIC) into the UltraLightCLient (ULC) framework, allowing the usage of these components in the context of a ULC application.

JDIC provides Java applications with access to functionalities and facilities provided by the native desktop. It consists of a collection of Java packages and tools. JDIC supports a variety of features such as embedding the native browser, launching the desktop applications, creating tray icons on the desktop, registering file type associations, creating JNLP installer packages, etc. Read more about JDIC

Resources

  • Try out the extension template sample as a JNLP application, as an Applet
    • There is a bug in the JRE 1.5_06 (bug# 6363986) If you use JRE 1.5_06 the applet deployment doesn't work.
    • If you run the application as an applet first the JNLP application doesn't work anymore until you delete %program files%\Java\jreXY\lib\ext\jdic.jar. On Mac delete /Library/Java/Extensions/jdic.jar. This is due to a dependency in the current JDIC implementation. This patch removes this dependency.
  • Downloads
  • JDIC Homepage and the JDIC JNLP Deployment How To

Supported Components

So far, the following components have been integrated into ULC:

ULC Component Name JDIC Component
ULCBrowser WebBrowser Example

More components are subject to be supported in the future. Please come back and check for other JDIC components integrated into ULC.

Examples

ULCBrowser

The following example shows how to use the ULCBrowser.

ULCBrowser browser = new ULCBrowser("http://www.canoo.com");

refreshButton = new ULCButton("Refresh"); forwardButton = new ULCButton("Forward"); backButton = new ULCButton("Backward"); executeScriptButton = new ULCButton("Execute Script");

//add the listeners to the buttons refreshButton.addActionListener(new IActionListener() { public void actionPerformed(ActionEvent inEvent) { browser.refresh(); } });

forwardButton.addActionListener(new IActionListener() { public void actionPerformed(ActionEvent inEvent) { browser.forward(); } });

backButton.addActionListener(new IActionListener() { public void actionPerformed(ActionEvent inEvent) { browser.back(); } });

//use a script handler to react on script results executeScriptButton.addActionListener(new IActionListener() { public void actionPerformed(ActionEvent inEvent) {

IJavaScriptHandler myHandler = new IJavaScriptHandler() {

public void scriptCompleted(int ScriptID, String result) { System.out.println("Script ID: " + ScriptID + " result: " + result);

} };

browser.executeScript("alert('Using Script')", myHandler); } });

//add a listener for the Browser events browser.addWebBrowserListener(new WebBrowserAdapter() {

public void downloadCompleted(WebBrowserEvent event) {

fAddressTextField.setText(fWebBrowser.getUrl()); fBackButton.setEnabled(fWebBrowser.isBackEnabled()); fForwardButton.setEnabled(fWebBrowser.isForwaredEnabled()); updateStatusInfo("Document loading completed.");

}

public void downloadError(WebBrowserEvent event) { updateStatusInfo("Loading error."); }

public void titleChange(WebBrowserEvent event) { if (fMainPane instanceof ULCFrame){ ((ULCFrame)fMainPane).setTitle(event.getEventData()); updateStatusInfo("Title of the browser window changed."); } } });

Compatibility

  • ULC 6.1: JDK 1.4.2, JDK 1.5, JDK 1.6, Windows XP, Mac OSX
  • ULC 6.2: JDK 1.4.2, JDK 1.5, JDK 1.6, Windows XP, Mac OSX
  • ULC 6.2: JDK 1.4.2, JDK 1.5, JDK 1.6, Windows XP, Mac OSX
  • UltraLightClient 2008: JDK 1.4.2, JDK 1.5, Windows XP, Mac OSX
This version of the JDIC Browser integration don't work with Windows Vista and Linux

Project setup with Eclipse

The project contains all necessary Eclipse project files and can be directly imported from the repository. The classpath in this project contains a entry named ULC Library, which locates the needed UltraLightClient libraries. For to uses the ULC Library entry you have to install the Eclipse Java IDE Integration Plug-in that can be found at : >>http://update.canoo.com/eclipse.
A installation guide how to install plug-ins in Eclipse can be found at the Eclipse help pages: Workbench User Guide > Tasks > Updating and installing software.

Project Links

Project Home
Downloads

no comments | post comment
labels
Category:ULC6.2
Category:ULC6.0
Category:ULC6.1
Category:UltraLightClient '08
Category:Integration
attachments
Created by etienne. Last edited by daniel, 84 days ago. Viewed 8,263 times. #10
[diff] [history] [edit] [rdf]
Name
Email:
snipsnap.org | Copyright 2000-2002 Matthias L. Jugel and Stephan J. Schmidt