gnu.x11
Class Application

java.lang.Object
  extended by gnu.app.Application
      extended by gnu.x11.Application
Direct Known Subclasses:
Application, Graphics, Hello, Info, Internal, PrintHello

public class Application
extends gnu.app.Application

X application.

A basic X application is expected to extend this class and call the constructor with its command-line arguments. See gnu/x11/test/Hello.java for an example.

To run an X application, the name of the X server to be connected to must be given. By default, the value is fetched from the environment variable $DISPLAY. Users can override this by specifying --display option. Simply java gnu.x11.test.Hello will display a window in the default X server.

Users can also specify --send-mode option. For instance, java gnu.x11.test.Hello --send-mode sync will display the same window but the protocol requests are sent synchronously. See Connection#send_mode and Connection#SEND_MODE_STRINGS for more info.


Field Summary
 Display display
          X server connection.
protected  Option option
           
 
Fields inherited from class gnu.app.Application
exit_now, help_option
 
Constructor Summary
protected Application(java.lang.String[] args)
           
 
Method Summary
 
Methods inherited from class gnu.app.Application
about, about, exit
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

display

public Display display
X server connection.

Note that this variable (X connection) should not be used before calling Application.about(java.lang.String, java.lang.String, java.lang.String, java.lang.String) since it is possible that users specify "--help" option and no connection is made at all.


option

protected Option option
Constructor Detail

Application

protected Application(java.lang.String[] args)