Package org.jcsp.awt

# Interface Display

All Known Implementing Classes:
  `DisplayList`

public interface Display
Objects implementing this interface provide graphics services to a `CSProcess`.

## Description

`Display` is an interface to a passive object providing graphics services on behalf of a `CSProcess`. Such an object provides an occam3-like `CALL` channel between the application `CSProcess` and the active graphics component (such as ``ActiveCanvas``) on which it wishes to draw.

Author:
  P.H. Welch
See Also:
  - `DisplayList`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`change(GraphicsCommand[] c, int i)`
Changes the array of `GraphicsCommand`s to be interpreted by replacing elements `i` onwards with the new ones.
`boolean`
`change(GraphicsCommand c, int i)`
Changes the array of `GraphicsCommand`s to be executed by replacing element `i` with the new one.
`int`
`extend(GraphicsCommand c)`
Extends the array of `GraphicsCommand`s to be executed by one command.
`int`
`extend(GraphicsCommand[] c)`
Extends the array of `GraphicsCommand`s to be interpreted.
`GraphicsCommand[]`
`get()`
Returns a copy of the array of `GraphicsCommand`s currently held.
`void`
`set(GraphicsCommand c)`
Sets the `GraphicsCommand` to be interpreted.
`void`
`set(GraphicsCommand[] c)`
Sets the array of `GraphicsCommand`s to be interpreted.

## Method Details

### set

void set(GraphicsCommand[] c)
Sets the array of `GraphicsCommand`s to be interpreted. The commands will be interpreted in ascending order of index.

Parameters:
  `c` - the array of GraphicsCommands to be interpreted.

### set

void set(GraphicsCommand c)
Sets the `GraphicsCommand` to be interpreted.

Parameters:
  `c` - the array of GraphicsCommands to be interpreted.

### extend

int extend(GraphicsCommand[] c)
Extends the array of `GraphicsCommand`s to be interpreted.

Parameters:
  `c` - the extra GraphicsCommands to be interpreted.
Returns:
  the start index of the extension.

### extend

int extend(GraphicsCommand c)
Extends the array of `GraphicsCommand`s to be executed by one command.

Parameters:
  `c` - the extra GraphicsCommand to be interpreted.
Returns:
  the start index of the extension.

### change

boolean change(GraphicsCommand[] c, int i)
Changes the array of `GraphicsCommand`s to be interpreted by replacing elements `i` onwards with the new ones. There must be at least `(i + c.length)` elements in the original array -- else this method will not change anything and will return false.

Parameters:
  `c` - the new GraphicsCommands to be interpreted.
  `i` - the start index for the replacement.
Returns:
  true if and only if the changes are successfully made.

### change

boolean change(GraphicsCommand c, int i)
Changes the array of `GraphicsCommand`s to be executed by replacing element `i` with the new one. There must be at least `(i + 1)` elements in the original array -- else this method will not change anything and will return false.

Parameters:
  `c` - the new GraphicsCommand to be interpreted.
  `i` - the index for the replacement.
Returns:
  true if and only if the changes are successfully made.

### get

GraphicsCommand[] get()
Returns a copy of the array of `GraphicsCommand`s currently held.

Returns:
  a copy of the array of `GraphicsCommand`s currently held.