Documentation Set for Swarm 2.2
Prev | Reference VIII. Gui Library | Next

# NodeItem

## Name

NodeItem -- A class for displaying a node on a Canvas.

## Description

A class for displaying a node on a Canvas. A NodeItem has a position, a font, color, border color and width.

## Protocols adopted by NodeItem

CompositeItem CREATABLE

## Methods

### Phase: Creating

- - setX: (int)x Y: (int)y
  Set the position of the node.

- - setFont: (const char *)font
  Set the font with which to draw the label.

- - setString: (const char *)label
  Set the label to put on the node.

### Phase: Using

- - (void)createPaddedText
  Create the space for the text for the node.

- - (void)createText
  Create the text for the node.

- - (void)setBorderWidth: (int)aVal
  Set the width of the border.

- - (void)setBorderColor: (const char *)aColor
  Set the border color of the node.

- - (void)setColor: (const char *)aColor
  Set the color of the node.

- - (int)getY
  Get the y position of the node on the canvas.

- - (int)getX
  Get the x position of the node on the canvas.

- - (void)resetString: (const char *)string
  Change the label on the string after the node is created.

Prev | Home | Next
MessageProbeEntry | Up | OvalNodeItem