CSP for Java
(JCSP) 1.0-rc4

jcsp.awt
Class GraphicsProtocol

java.lang.Object
  |
  +--jcsp.lang.TaggedProtocol
        |
        +--jcsp.awt.GraphicsProtocol
Direct Known Subclasses:
GraphicsProtocol.General, GraphicsProtocol.MakeMISImage, GraphicsProtocol.SetBackground, GraphicsProtocol.SetPaintable

public abstract class GraphicsProtocol
extends TaggedProtocol

This is the tagged protocol for use over the toGraphics configuration channel of an active graphics component.

Description

GraphicsProtocol is the tagged protocol for use over the toGraphics configuration channel of an active graphics component (for example, see ActiveCanvas.setGraphicsChannels).

It is a collection of static immutable enquiry/configuration objects and static configuration classes. An enquiry sent down the toGraphics channel generates an appropriate reply on the fromGraphics channel. A configuration class may be used to construct an immutable configuration object that may be sent down the toGraphics channel to configure some property of the graphics component. A configuration message is always acknowledged with a Boolean.TRUE returned on the fromGraphics channel (once the configuration has happened).

Author:
P.H.Welch
See Also:
ActiveCanvas, TaggedProtocol

Inner Class Summary
static interface GraphicsProtocol.Configure
          This is the interface for general configuration of the graphics component.
static class GraphicsProtocol.General
          This is a general configuration class for the graphics component.
static class GraphicsProtocol.MakeMISImage
          This is a configuration class to associate a java.awt.image.MemoryImageSource with the graphics component.
static class GraphicsProtocol.SetBackground
          This is a configuration class for setting the background java.awt.Color of the active graphics component.
static class GraphicsProtocol.SetPaintable
          This is a configuration class to register a jcsp.awt.Paintable object with the graphics component.
 
Field Summary
static GraphicsProtocol GET_BACKGROUND
          This is an enquiry object to find the background colour of the active graphics component.
static GraphicsProtocol GET_COMPONENT
          This is an enquiry object to obtain the active graphics component.
static GraphicsProtocol GET_DIMENSION
          This is an enquiry object to find the size of the active graphics component.
static GraphicsProtocol REQUEST_FOCUS
          This is a configuration object to request input focus on the graphics component for keyboard and mouse evnts.
 
Fields inherited from class jcsp.lang.TaggedProtocol
tag
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

GET_DIMENSION

public static final GraphicsProtocol GET_DIMENSION
This is an enquiry object to find the size of the active graphics component. The java.awt.Dimension will be returned down the fromGraphics channel.

GET_COMPONENT

public static final GraphicsProtocol GET_COMPONENT
This is an enquiry object to obtain the active graphics component. The java.awt.Component will be returned down the fromGraphics channel.

GET_BACKGROUND

public static final GraphicsProtocol GET_BACKGROUND
This is an enquiry object to find the background colour of the active graphics component. The background java.awt.Color will be returned down the fromGraphics channel.

REQUEST_FOCUS

public static final GraphicsProtocol REQUEST_FOCUS
This is a configuration object to request input focus on the graphics component for keyboard and mouse evnts. A Boolean.TRUE will be returned down the fromGraphics channel.

CSP for Java
(JCSP) 1.0-rc4

Submit a bug or feature to jcsp-team@ukc.ac.uk
Version 1.0-rc4 of the JCSP API Specification (Copyright 1997-2000 P.D.Austin and P.H.Welch - All Rights Reserved)
Java is a trademark or registered trademark of Sun Microsystems, Inc. in the US and other countries.