summaryrefslogtreecommitdiffstats
path: root/examples/org.eclipse.swt.examples.browser.demos/doc-html/swt_browser_demos_ex.html
blob: d4457d231c5ec9c12a1257ed53c07b0caededf8f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <title>SWT - Controls Overview</title>
</head>
<body>

<h2>SWT example - Browser Demos</h2>

<p>
The Browser Demos demonstrate various features of the SWT Browser widget. 
<li>The Pawns Game is a board game that can be played against the computer
or against another player. Rendering is based on HTML and CSS techniques. The
board is a table filled with hyperlinks. Cascading Style Sheets
provide various themes and control the table aesthetic appearance.
The API <code>org.eclipse.swt.browser.Browser.setText(java.lang.String)</code> draws
the board game from HTML generated in memory.
Player moves are captured by implementing the interface <code>org.eclipse.swt.browser.LocationListener</code>.
e.g the player clicks on a cell that may generate an hyperlink with a URL similar to
http://www.org.eclipse.swt.examples.browser.demos/xx1yy2. That hyperlink identifies
the position of the cell selected by the player. The move is completed by generating
new HTML content and invoking <code>Browser.setText</code> to update the board game.
</p>

<h3>Running the example</h3>
<p>
Follow the <a href="../../org.eclipse.swt.examples/doc-html/swt_manual_setup.html">SWT standalone examples setup</a> 
instructions to install and run the example from your workspace.
</p>
<p>
The "Main" class is <code>org.eclipse.swt.examples.browser.demos.BrowserDemoView</code>.
</p>
<p>
This example can also be run using the <a href="../../org.eclipse.swt.examples.launcher/doc-html/swt_launcher_ex.html">Example Launcher</a>.
Select the <strong>Browser Demo</strong> item from the <strong>Workbench Views</strong> category and click <strong>Run</strong>.
</p>

<p><a href="hglegal.htm"><img SRC="ngibmcpy.gif" ALT="Copyright IBM Corporation and others 2000, 2004.  All Rights Reserved." BORDER=0 height=14 width=324></a></p>
</body>
</html>