Package org.astrogrid.samp.gui

# Class TransmissionListIcon

java.lang.Object
org.astrogrid.samp.gui.TransmissionListIcon

All Implemented Interfaces:
  `Icon`

public class TransmissionListIcon extends Object implements Icon
Icon which paints a graphical representation of a list of Transmissions.

Since:
  21 Nov 2008
Author:
  Mark Taylor

## Constructor Summary

Constructors
Constructor
Description
`TransmissionListIcon(ListModel rxModel, ListModel txModel, int size)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`JComponent`
`createBox(int nTrans)`
`int`
`getIconHeight()`
`int`
`getIconWidth()`
`Transmission`
`getTransmissionAt(Point point)`
Returns the transmission (if any) which is painted at a given point.
`void`
`paintIcon(Component c, Graphics g, int x, int y)`

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

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

## Constructor Details

### TransmissionListIcon

public TransmissionListIcon(ListModel rxModel, ListModel txModel, int size)
Constructor.

Parameters:
  `rxModel` - list of messages received; all elements must be `Transmission` objects
  `txModel` - list of messages sent; all elements must be `Transmission` objects
  `size` - height of icon in pixels; this also scales the width

## Method Details

### getTransmissionAt

public Transmission getTransmissionAt(Point point)
Returns the transmission (if any) which is painted at a given point.

Parameters:
  `point` - screen point relative to the origin of this icon
Returns:
  transmission painted at `point` or null if there isn't one

### getIconWidth

public int getIconWidth()

Specified by:
  `getIconWidth` in interface `Icon`

### getIconHeight

public int getIconHeight()

Specified by:
  `getIconHeight` in interface `Icon`

### paintIcon

public void paintIcon(Component c, Graphics g, int x, int y)

Specified by:
  `paintIcon` in interface `Icon`

### createBox

public JComponent createBox(int nTrans)