Package org.jcsp.awt

# Class GraphicsCommand

java.lang.Object
org.jcsp.lang.TaggedProtocol
org.jcsp.awt.GraphicsCommand

Direct Known Subclasses:
  `GraphicsCommand.ClearRect`, `GraphicsCommand.ClipRect`, `GraphicsCommand.CopyArea`, `GraphicsCommand.Draw3DRect`, `GraphicsCommand.DrawArc`, `GraphicsCommand.DrawBytes`, `GraphicsCommand.DrawChars`, `GraphicsCommand.DrawImage`, `GraphicsCommand.DrawLine`, `GraphicsCommand.DrawOval`, `GraphicsCommand.DrawPolygon`, `GraphicsCommand.DrawPolyline`, `GraphicsCommand.DrawRect`, `GraphicsCommand.DrawRoundRect`, `GraphicsCommand.DrawString`, `GraphicsCommand.Fill3DRect`, `GraphicsCommand.FillArc`, `GraphicsCommand.FillOval`, `GraphicsCommand.FillPolygon`, `GraphicsCommand.FillRect`, `GraphicsCommand.FillRoundRect`, `GraphicsCommand.General`, `GraphicsCommand.SetClip`, `GraphicsCommand.SetColor`, `GraphicsCommand.SetFont`, `GraphicsCommand.SetXORMode`, `GraphicsCommand.Translate`

public abstract class GraphicsCommand extends TaggedProtocol
This is the tagged protocol interpreted by objects (such as `DisplayList`) that implement the `Display` interface.

## Description

`GraphicsCommand` is the `TaggedProtocol` interpreted by objects (such as `DisplayList`) that implement the `Display` interface. It is a collection of static graphics command classes and a couple of immutable graphics command objects. The constructors for each command class set the parameters for the command. The immutable objects are commands that take no parameters.

A `Display` object provides a secure interface between an active user process and an active graphics component (such as `ActiveCanvas`). It enables all methods of `java.awt.graphics` to be executed on the active graphics component. User processes send an array of `GraphicsCommand`s by invoking ``set``, ``extend`` or ``change`` on the `Display`.

The meaning of each command is defined by the corresponding method in `java.awt.graphics`. For example, the `GraphicsCommand.DrawImage` constructors correspond to the `java.awt.graphics.drawImage` methods.

Author:
  P.H. Welch
See Also:
  - `Display`
  - `DisplayList`
  - `ActiveCanvas`
  - `TaggedProtocol`

## Nested Class Summary

Nested Classes
Modifier and Type
Class
Description
`static final class`
`GraphicsCommand.ClearRect`
This is the (immutable) command object for ``java.awt.Graphics.clearRect``.
`static final class`
`GraphicsCommand.ClipRect`
This is the (immutable) command object for ``java.awt.Graphics.clipRect``.
`static final class`
`GraphicsCommand.CopyArea`
This is the (immutable) command object for ``java.awt.Graphics.copyArea``.
`static final class`
`GraphicsCommand.Draw3DRect`
This is the (immutable) command object for ``java.awt.Graphics.draw3DRect``.
`static final class`
`GraphicsCommand.DrawArc`
This is the (immutable) command object for ``java.awt.Graphics.drawArc``.
`static final class`
`GraphicsCommand.DrawBytes`
This is the (immutable) command object for ``java.awt.Graphics.drawBytes``.
`static final class`
`GraphicsCommand.DrawChars`
This is the (immutable) command object for ``java.awt.Graphics.drawChars``.
`static final class`
`GraphicsCommand.DrawImage`
This is the (immutable) command object for ``java.awt.Graphics.drawImage``.
`static final class`
`GraphicsCommand.DrawLine`
This is the (immutable) command object for ``java.awt.Graphics.drawLine``.
`static final class`
`GraphicsCommand.DrawOval`
This is the (immutable) command object for ``java.awt.Graphics.drawOval``.
`static final class`
`GraphicsCommand.DrawPolygon`
This is the (immutable) command object for ``java.awt.Graphics.drawPolygon``.
`static final class`
`GraphicsCommand.DrawPolyline`
This is the (immutable) command object for ``java.awt.Graphics.drawPolyline``.
`static final class`
`GraphicsCommand.DrawRect`
This is the (immutable) command object for ``java.awt.Graphics.drawRect``.
`static final class`
`GraphicsCommand.DrawRoundRect`
This is the (immutable) command object for ``java.awt.Graphics.drawRoundRect``.
`static final class`
`GraphicsCommand.DrawString`
This is the (immutable) command object for ``java.awt.Graphics.drawString``.
`static final class`
`GraphicsCommand.Fill3DRect`
This is the (immutable) command object for ``java.awt.Graphics.translate``.
`static final class`
`GraphicsCommand.FillArc`
This is the (immutable) command object for ``java.awt.Graphics.fillArc``.
`static final class`
`GraphicsCommand.FillOval`
This is the (immutable) command object for ``java.awt.Graphics.fillOval``.
`static final class`
`GraphicsCommand.FillPolygon`
This is the (immutable) command object for ``java.awt.Graphics.fillPolygon``.
`static final class`
`GraphicsCommand.FillRect`
This is the (immutable) command object for ``java.awt.Graphics.fillRect``.
`static final class`
`GraphicsCommand.FillRoundRect`
This is the (immutable) command object for ``java.awt.Graphics.fillRoundRect``.
`static final class`
`GraphicsCommand.General`
This is the command object holding a `GraphicsCommand.Graphic` object implementing an arbitrary set of graphics operations.
`static interface`
`GraphicsCommand.Graphic`
This is the interface allowing any set of `Graphics` operations to be wrapped up in an object and sent down a `Display` channel to an Active graphics component.
`static final class`
`GraphicsCommand.SetClip`
This is the (immutable) command object for ``java.awt.Graphics.setClip``.
`static final class`
`GraphicsCommand.SetColor`
This is the (immutable) command object for ``java.awt.Graphics.setColor``.
`static final class`
`GraphicsCommand.SetFont`
This is the (immutable) command object for ``java.awt.Graphics.setFont``.
`static final class`
`GraphicsCommand.SetXORMode`
This is the (immutable) command object for ``java.awt.Graphics.setXORMode``.
`static final class`
`GraphicsCommand.Translate`
This is the (immutable) command object for ``java.awt.Graphics.translate``.

## Field Summary

Fields
Modifier and Type
Field
Description
`static final GraphicsCommand`
`NULL`
This is the null command whose interpretation is a no-op.
`static final GraphicsCommand`
`SET_PAINT_MODE`
This is the (immutable) command object for ``java.awt.Graphics.setPaintMode``.

### Fields inherited from class org.jcsp.lang.TaggedProtocol

`tag`

## Method Summary

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### NULL

public static final GraphicsCommand NULL
This is the null command whose interpretation is a no-op.

### SET_PAINT_MODE

public static final GraphicsCommand SET_PAINT_MODE
This is the (immutable) command object for ``java.awt.Graphics.setPaintMode``.