# Class TopcatEvent

java.lang.Object
uk.ac.starlink.topcat.TopcatEvent

public class TopcatEvent extends Object
Describes an event which a `TopcatListener` may be interested in.

Since:
  27 Oct 2005
Author:
  Mark Taylor

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`ACTIVATOR`
Code indicating that the model's activator has changed.
`static final int`
`COLUMN`
Code indicating that a column has been highlighted or selected in some relevant way.
`static final int`
`COLUMN_DEF`
Code indicating that the definition of one of the existing columns may have changed.
`static final int`
`CURRENT_ORDER`
Code indicating change in current sort sequence.
`static final int`
`CURRENT_SUBSET`
Code indicating change in current RowSubset.
`static final int`
`LABEL`
Code indicating that the model's label has changed.
`static final int`
`PARAMETER_VALUE`
Code indicating that one of the model's parameter values has changed.
`static final int`
`PARAMETERS`
Code indicating that the model's parameter list has changed.
`static final int`
`ROW`
Code indicating that a row has been highlighted.
`static final int`
`SHOW_SUBSET`
Code indicating that a given RowSubset should be made visible.
`static final int`
`SUBSET_DEF`
Code indicating that the definition of one of the existing subsets may have changed.

## Constructor Summary

Constructors
Constructor
Description
`TopcatEvent(TopcatModel model, int code, Object datum)`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`int`
`getCode()`
Gets the numeric code which specifies the type of this event.
`Object`
`getDatum()`
Gets an additional object further specifying the nature of the event.
`TopcatModel`
`getModel()`
Gets the model from which this event originated.

### Methods inherited from class Object

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

## Field Details

### LABEL

public static final int LABEL
Code indicating that the model's label has changed.

See Also:
  - Constant Field Values

### ACTIVATOR

public static final int ACTIVATOR
Code indicating that the model's activator has changed.

See Also:
  - Constant Field Values

### PARAMETERS

public static final int PARAMETERS
Code indicating that the model's parameter list has changed.

See Also:
  - Constant Field Values

### PARAMETER_VALUE

public static final int PARAMETER_VALUE
Code indicating that one of the model's parameter values has changed.

See Also:
  - Constant Field Values

### CURRENT_SUBSET

public static final int CURRENT_SUBSET
Code indicating change in current RowSubset.

See Also:
  - Constant Field Values

### CURRENT_ORDER

public static final int CURRENT_ORDER
Code indicating change in current sort sequence.

See Also:
  - Constant Field Values

### ROW

public static final int ROW
Code indicating that a row has been highlighted. The datum is a `Long` giving the highlighted row, or null if activation status is being cleared.

See Also:
  - Constant Field Values

### COLUMN

public static final int COLUMN
Code indicating that a column has been highlighted or selected in some relevant way. The datum is the relevant `StarTableColumn`.

See Also:
  - Constant Field Values

### SHOW_SUBSET

public static final int SHOW_SUBSET
Code indicating that a given RowSubset should be made visible. The subset may also have changed its content, so a replot may be in order. The datum is the relevant `RowSubset`.

See Also:
  - Constant Field Values

### COLUMN_DEF

public static final int COLUMN_DEF
Code indicating that the definition of one of the existing columns may have changed. The datum is the relevant `StarTableColumn`, if known (may be null).

See Also:
  - Constant Field Values

### SUBSET_DEF

public static final int SUBSET_DEF
Code indicating that the definition of one of the existing subsets may have changed. The datum is the relevant `RowSubset`.

See Also:
  - Constant Field Values

## Constructor Details

### TopcatEvent

public TopcatEvent(TopcatModel model, int code, Object datum)
Constructor.

Parameters:
  `model` - the model which generated this event
  `code` - one of the numeric codes defined in this class which describes the nature of the event
  `datum` - optional datum giving additional information - this is code-specfic and may be null

## Method Details

### getModel

public TopcatModel getModel()
Gets the model from which this event originated.

Returns:
  topcat model

### getCode

public int getCode()
Gets the numeric code which specifies the type of this event. The value is one of the static final constants defined in this class.

Returns:
  event type code

### getDatum

public Object getDatum()
Gets an additional object further specifying the nature of the event. The value is code-specific, and may be null.

Returns:
  additional event characterisation object