Package uk.ac.starlink.topcat.join

## Class MatchPlotter

- java.lang.Object
- - uk.ac.starlink.topcat.join.MatchPlotter

-     public abstract class MatchPlotter
      extends java.lang.Object

  Prepares a plot based on the inputs and outputs of a crossmatch operation.
  Since:
    20 Dec 2013
  Author:
    Mark Taylor

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `MatchPlotter()` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static javax.swing.Action` | `createPlotAction​(java.awt.Component parent, uk.ac.starlink.table.join.MatchEngine engine, TupleSelector[] tselectors, uk.ac.starlink.table.JoinFixAction[] fixActs, TopcatModel result)` | Creates an action which can be used to post a plot for a given completed match operation.
    `static MatchPlotter` | `getMatchPlotter​(uk.ac.starlink.table.join.MatchEngine engine)` | Acquires an instance of this class suitable for a given match engine.
    `abstract void` | `showPlot​(java.awt.Component parent, TupleSelector[] tselectors, uk.ac.starlink.table.JoinFixAction[] fixActs, TopcatModel result)` | Posts a plot window representing data from tables input to a match and the output table.

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

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

- - ### Constructor Detail

    - #### MatchPlotter

          public MatchPlotter()

  - ### Method Detail

    - #### showPlot

          public abstract void showPlot​(java.awt.Component parent,
                                        TupleSelector[] tselectors,
                                        uk.ac.starlink.table.JoinFixAction[] fixActs,
                                        TopcatModel result)
                                 throws LayerException

      Posts a plot window representing data from tables input to a match and the output table. The input tables are represented as points, and the output table is represented as links between the corresponding input positions.
      Parameters:
        `parent` - parent component
        `tselectors` - selectors used to specify match input tables and values, one for each input table
        `fixActs` - options for column name disambiguation, one for each input table
        `result` - output (matched) table
      Throws:
        `LayerException` - if the plot cannot be constructed

    - #### getMatchPlotter

          public static MatchPlotter getMatchPlotter​(uk.ac.starlink.table.join.MatchEngine engine)

      Acquires an instance of this class suitable for a given match engine.
      Parameters:
        `engine` - match criterion
      Returns:
        match plotter instance, or null if we don't know how to do it

    - #### createPlotAction

          public static javax.swing.Action createPlotAction​(java.awt.Component parent,
                                                            uk.ac.starlink.table.join.MatchEngine engine,
                                                            TupleSelector[] tselectors,
                                                            uk.ac.starlink.table.JoinFixAction[] fixActs,
                                                            TopcatModel result)

      Creates an action which can be used to post a plot for a given completed match operation. This is a utility method which acquires a suitable instance and invokes it within an action.

      It's not always possible to do this. In the case that no plot can be made, a non-null action is still returned, but invoking it will pop up an error message.

      Parameters:
        `parent` - parent component
        `engine` - match engine determining match criteria
        `tselectors` - populated GUI components specifying input tables and coordinates, corresponding to match engine requirements
        `fixActs` - options for column name disambiguation, one for each input table
        `result` - output (matched) table
      Returns:
        action to plot the result