Package uk.ac.starlink.topcat

## Class TopcatEvent

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

-     public class TopcatEvent
      extends java.lang.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 int` | `ACTIVATOR` | Code indicating that the model's activator has changed.
    `static int` | `COLUMN` | Code indicating that a column has been highlighted or selected in some relevant way.
    `static int` | `CURRENT_ORDER` | Code indicating change in current sort sequence.
    `static int` | `CURRENT_SUBSET` | Code indicating change in current RowSubset.
    `static int` | `LABEL` | Code indicating that the model's label has changed.
    `static int` | `PARAMETER_VALUE` | Code indicating that one of the model's parameter values has changed.
    `static int` | `PARAMETERS` | Code indicating that the model's parameter list has changed.
    `static int` | `ROW` | Code indicating that a row has been highlighted.
    `static int` | `SHOW_SUBSET` | Code indicating that a given RowSubset should be made visible.

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `TopcatEvent​(TopcatModel model, int code, java.lang.Object datum)` | Constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `int` | `getCode()` | Gets the numeric code which specifies the type of this event.
    `java.lang.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 java.lang.Object

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

- - ### Field Detail

    - #### 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.
      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

  - ### Constructor Detail

    - #### TopcatEvent

          public TopcatEvent​(TopcatModel model,
                             int code,
                             java.lang.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 Detail

    - #### 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 java.lang.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