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 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<title>CHARVA: A Java Windowing Toolkit for Text Terminals</title>
<meta name="keywords" content="java, text, terminal, user, interface, VT100, curses, ncurses">
<style type="text/css">
<!--
body {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
table {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 12px;
}
#contentpanel {
border-style: solid;
border-color: silver;
border-width: 1px;
padding: 0;
}
.question {
background-color: #A4FFFF;
border-style: solid;
border-color: silver;
border-top-width: 1px;
border-bottom-width: 1px;
border-left-width: 0px;
border-right-width: 0px;
}
.answer {
padding-left: 20px;
}
.menuButtonSelected {
PADDING-LEFT: 15px;
FONT-SIZE: 8pt;
CURSOR: pointer;
COLOR: white;
FONT-FAMILY: Arial;
BACKGROUND-COLOR: #6484d7;
TEXT-ALIGN: left
}
.menuButton {
PADDING-LEFT: 15px;
FONT-SIZE: 8pt;
CURSOR: pointer;
COLOR: white;
FONT-FAMILY: Arial;
BACKGROUND-COLOR: #284a7d;
TEXT-ALIGN: left;
TEXT-DECORATION: none
}
-->
</style>
</head>
<body>
<h1 align=center>A Java Windowing Toolkit for Text Terminals</h1>
<table border=0 width="100%" cellspacing="5">
<tr>
<!-- Start of left (navigation) panel -->
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0"><tr><td>
<table width="160" border="0" cellspacing="1">
<tr bgcolor="#008000">
<td style="padding: 5px"><font color="#FFFFFF" size="4">Menu</font></td>
</tr>
<tr><td
class=menuButton id=0
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='index.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Introduction </td></tr>
<tr><td
class=menuButton id=1
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Features.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Features </td></tr>
<tr><td
class=menuButton id=2
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Status.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Status </td></tr>
<tr><td
class=menuButton id=3
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='FAQ.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> FAQ </td></tr>
<tr><td
class=menuButton id=4
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Licence.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Licence </td></tr>
<tr><td
class=menuButton id=5
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Screenshots.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Screenshots </td></tr>
<tr><td
class=menuButton id=6
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Documentation.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Documentation </td></tr>
<tr><td
class=menuButton id=7
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Download.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Download </td></tr>
<tr><td
class=menuButton id=8
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Applications.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Applications </td></tr>
<tr><td
class=menuButton id=9
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Support.html';"
onmouseout="this.className='menuButton';"
height=18
nowrap> Support </td></tr>
<tr><td
class=menuButton id=10
onmouseover="this.className='menuButtonSelected';"
onclick="top.location='Contribute.html';"
onmouseout="this.className='menuButton';"
height="18"
nowrap> Contribute </td></tr>
<!-- End of navigation panel -->
<tr><td height="10"></td></tr> <!-- Separator -->
<tr>
<td bgcolor="#008000" style="padding: 5px"><font color="#FFFFFF" size="4">Quick Info</font></td>
</tr>
<tr><td>
<table summary="quick info" cellspacing="0" cellpadding="0" border="0">
<tr style="font-size: 8pt">
<td nowrap="nowrap">Operating System: <a href="http://www.linux.org">Linux</a></td>
</tr>
<tr style="font-size: 8pt">
<td nowrap="nowrap">Language: <a href="http://java.sun.com">Java</a>, C</td>
</tr>
<tr style="font-size: 8pt">
<td nowrap="nowrap">Licence: <a href="http://www.gnu.org">GNU</a></td>
</tr>
<tr style="font-size: 8pt">
<td nowrap="nowrap">Author: <a href="http://www.pitman.co.za">Rob Pitman</a></td>
</tr>
</table>
<!-- End of Quick Info -->
</td></tr>
</table>
</td></tr>
<tr><td height="10"></td></tr> <!-- Separator -->
<tr><td>
<table cellpadding="0" cellspacing="0">
<tr><td>
<script type="text/javascript"><!--
google_ad_client = "pub-1886875109433545";
google_ad_width = 160;
google_ad_height = 600;
google_ad_format = "160x600_as";
google_ad_type = "text";
google_ad_channel = "";
google_color_border = "336699";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_url = "008000";
google_color_text = "000000";
//--></script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr>
</table>
</td></tr>
</table>
</td> <!-- End of left (navigation) panel -->
<!-- Start of Right (content) panel -->
<td valign="top" width="100%">
<table border="0" cellpadding="10" cellspacing="0" id="contentpanel">
<tr>
<td bgcolor="#B6C0FF"><font size="+1">Introduction</font></td>
</tr>
<tr>
<td>
In some applications a full-fledged bit-mapped graphical user interface is
not feasible or appropriate. For example, you may be using
<a href="http://www.symbol.com/products/mobile_computers/mobile_stationaryvmt_vrc_6900.html">
ruggedized mobile computers</a> that only have an ASCII display; or you may need
to develop an administrative interface for a remote server or firewall, and
you don't have enough bandwidth for X Windows or
<a href="http://www.uk.research.att.com/archive/vnc/index.html">the
VNC protocol</a>. In such cases, CHARVA may be your solution.
<p>
CHARVA is a Java framework for presenting a "graphical" user interface,
composed of elements such as windows, dialogs, menus, textfields and buttons,
on a traditional character-cell ASCII terminal. It has an API based on
that of "Swing" (a.k.a. the Java Foundation Classes). Programmers familiar
with AWT and Swing will find programming CHARVA straightforward.
User interfaces can be designed on WYSIWYG IDEs such as Borland JBuilder
and then easily converted to CHARVA merely by changing the "import" statements
to import the "charva.awt and "charvax.swing" packages instead of the
standard "java.awt" and "javax.swing" packages.</p>
<p>
CHARVA was designed to bring the power and flexibility of Java to applications
on Linux/Unix systems (and has also been ported to Windows). ASCII
terminal-based applications can now benefit from Java features such as
object orientation, multithreading, automatic garbage-collection, and a
vast range of libraries such as:</p>
<ul>
<li>socket and HTTP networking using Java 2 Standard Edition
<a href="http://java.sun.com/products/j2se/">(J2SE)</a></li>
<li>SSL and HTTPS encryption using Java Secure Socket Extension
<a href="http://java.sun.com/products/jsse/index.html">(JSSE)</a></li>
<li>asynchronous messaging using Java Message Service
<a href="http://java.sun.com/products/jms/index.html">(JMS)</a></li>
<li>database access using Java Database Connectivity
<a href="http://java.sun.com/products/jdbc/index.html">(JDBC)</a></li>
<li>mail access using
<a href="http://java.sun.com/products/javamail/index.html">JavaMail</a></li>
<li>XML parsing and generation using <a href="http://xml.apache.org">Xerces</a>
from Apache.org</li>
<li>and many more....<a href="http://www.cbel.com/class_libraries_java_programming_language/">
(click here for a list)</a></li>
</ul>
<p>
CHARVA now also has mouse support on terminal-emulators that report mouse
events, such as <a href="http://invisible-island.net/xterm/">"xterm"</a> and
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">"PuTTY"</a></p>
<p>
Here are some <b>benefits</b> of CHARVA:
<ul>
<li>The Total Cost of Ownership (TCO) of an ASCII terminal is considerably
lower than that of a PC. TCO refers to the total cost of acquiring,
deploying and maintaining equipment; in the case of a PC running MS-Windows and
configured as a GUI workstation, the ongoing maintenance cost (including
protecting the PC against viruses!) is considerable. For many applications
such as Point-of-Sale and Point-of-Service (POS), a graphical workstation
is complete overkill. ASCII terminals are still widely used for POS
applications, at least in the developing world.</li><br>
<li>CHARVA addresses the headache of software distribution in a large network.
You can use a single Linux computer to serve many dozens of ASCII terminals / terminal-emulators,
each running its own instance of the same application. The Linux computer
can handle the user interface logic and communicate (using standard protocols
such as HTTP, HTTPS or RMI) via a network (LAN or WAN) with an Application
Server, which handles the business logic.<br>
<img src="images/architecture.gif" alt="Architecture">
<br>
So instead of having to download a new version of the application to each
workstation, you download only <i>one</i> copy of the new version (to the
Linux front-end server).</li><br>
<li>The memory footprint and CPU usage of the CHARVA framework are
<em>considerably</em> less than those of Swing. Provided you are using a terminal
with a high bit-rate (or a PC-based terminal-emulator such as
<a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">PuTTY</a> on a LAN), the response
of CHARVA is <i>much</i> crisper than that of Swing. A single Linux
computer can support dozens of ASCII terminals running CHARVA-based
applications.</li><br>
<li>CHARVA uses a standard, flexible and powerful API which is already familiar
to most Java programmers, thus enabling you to be productive without any
delay.</li><br>
<li>CHARVA is licensed with the
<a href="http://www.gnu.org/copyleft/lesser.html">GNU Lesser General Public License</a>,
which essentially means that it is free for commercial and non-commercial use.</li>
</ul>
<p>CHARVA is composed of two components:</p>
<ul>
<li>A library of Java classes that implement the various "graphical widgets" </li>
<li>A dynamically-loaded shared library, written in C. </li>
</ul>
<p>CHARVA is not a "Pure Java" package; the Java classes use the
<a href="http://java.sun.com/j2se/1.3/docs/guide/jni/">Java Native
Interface</a> (JNI) to call screen-handling functions provided by the shared
"libTerminal.so" library, which is linked with the
<a href="http://invisible-island.net/ncurses/">GNU ncurses</a>
library. Porting CHARVA to a different platform involves recompiling the C
source code for the libTerminal.so shared library. GNU ncurses is supported
on dozens of Unix flavors besides Linux; CHARVA should be able to run on
any platform that supports both Java and ncurses.</p>
<p>
CHARVA has been ported to the following operating systems and environments:</p>
<ul>
<li>HP-UX</li>
<li>MS-Windows, using the
<a href="http://sourceforge.net/projects/pdcurses/">PDCurses</a>
(Public Domain Curses) library and the
<a href="http://sourceforge.net/projects/mingw/">MinGW</a> compiler.</li>
<li>AIX, using GNU ncurses 5.2 and the gcc compiler.</li>
<li>Solaris</li>
<li>Mac OS 10.2.</li>
<li><a href="http://www.freebsd.org/">FreeBSD</a></li>
<li><a href="http://gcc.gnu.org/java/">GCJ (the GNU Java Compiler)</a></li>
<li><a href="http://www.vizaginfo.com/comp/beos/beintro.htm">BeOS</a></li>
</ul>
(OS-specific Makefiles are provided in the download tarball).
<p>Charva has support for UTF-8 characters, so it can handle East European
character sets (e.g. Hungarian and Czech.).</p>
<p>
Many developers <a href="Applications.html">have used CHARVA in their
applications</a>, and have reported that it is reliable and stable.
</p>
</td>
</tr>
</table>
</td> <!-- End of content panel -->
</tr>
</table>
<hr>
<i>Last updated: 10 September, 2006</i>
</body>
</html>
|