jsky.catalog.gui
Interface TablePlotter

All Known Implementing Classes:
BasicTablePlotter

public interface TablePlotter

This defines the interface for plotting the contents of a catalog table.

Version:
$Revision: 1.1 $
Author:
Allan Brighton

Method Summary
 void addSymbolSelectionListener(SymbolSelectionListener listener)
          Add a listener for selection events on symbols
 void addTableSelectionListener(TableSelectionListener listener)
          Add a listener for selection events on tables
 void deselectSymbol(TableQueryResult table, int tableRow)
          Deselect the symbol corresponding to the given table row
 CanvasGraphics getCanvasGraphics()
          Return the object to use to draw catalog symbols
 NamedCoordinates getCatalogPosition(java.awt.geom.Point2D.Double p)
          If the given screen coordinates point is within a displayed catalog symbol, set it to point to the center of the symbol and return the name and coordinates from the catalog table row.
 javax.swing.JPanel getConfigPanel(TableQueryResult table)
          Return a panel to use to configure the plot symbols for the given table.
 CoordinateConverter getCoordinateConverter()
          Return the object used to convert to screen coordinates for drawing
 TablePlotSymbol[] getPlotSymbolInfo(TableQueryResult table)
          Return the plot symbol info for the given table.
 TableQueryResult[] getTables()
          Return an array containing the tables managed by this object.
 void paintSymbols(java.awt.Graphics2D g, java.awt.geom.Rectangle2D region)
          Paint the catalog symbols using the given graphics object.
 void plot(TableQueryResult table)
          Plot the given table data
 void removeSymbolSelectionListener(SymbolSelectionListener listener)
          Remove a listener for selection events on symbols
 void removeTableSelectionListener(TableSelectionListener listener)
          Remove a listener for selection events on tables
 void replotAll()
          Recalculate the coordinates and replot all symbols after a change in the coordinate system.
 void selectSymbol(TableQueryResult table, int tableRow)
          Select the symbol corresponding to the given table row
 void setCanvasGraphics(CanvasGraphics canvasGraphics)
          Set the object to use to draw catalog symbols
 void setCoordinateConverter(CoordinateConverter c)
          Set the object used to convert to screen coordinates for drawing
 void setPlotSymbolInfo(TableQueryResult table, TablePlotSymbol[] symbols)
          Set the plot symbol info for the given table
 void setVisible(boolean isVisible)
          If the given argument is false, hide all plot symbols managed by this object, otherwise show them again.
 void transformGraphics(java.awt.geom.AffineTransform trans)
          Transform the plot symbols using the given AffineTransform (called when the image is transformed, to keep the plot symbols up to date).
 void unplot(TableQueryResult table)
          Erase the plot of the given table data
 void unplotAll()
          Erase all plot symbols
 

Method Detail

plot

void plot(TableQueryResult table)
Plot the given table data


unplot

void unplot(TableQueryResult table)
Erase the plot of the given table data


unplotAll

void unplotAll()
Erase all plot symbols


replotAll

void replotAll()
Recalculate the coordinates and replot all symbols after a change in the coordinate system.


getTables

TableQueryResult[] getTables()
Return an array containing the tables managed by this object.


selectSymbol

void selectSymbol(TableQueryResult table,
                  int tableRow)
Select the symbol corresponding to the given table row


deselectSymbol

void deselectSymbol(TableQueryResult table,
                    int tableRow)
Deselect the symbol corresponding to the given table row


setPlotSymbolInfo

void setPlotSymbolInfo(TableQueryResult table,
                       TablePlotSymbol[] symbols)
Set the plot symbol info for the given table


getPlotSymbolInfo

TablePlotSymbol[] getPlotSymbolInfo(TableQueryResult table)
Return the plot symbol info for the given table.

Parameters:
table - object representing the catalog table
Returns:
an array of PlotSymbol objects, one for each plot symbol defined.

setVisible

void setVisible(boolean isVisible)
If the given argument is false, hide all plot symbols managed by this object, otherwise show them again.


setCanvasGraphics

void setCanvasGraphics(CanvasGraphics canvasGraphics)
Set the object to use to draw catalog symbols


getCanvasGraphics

CanvasGraphics getCanvasGraphics()
Return the object to use to draw catalog symbols


setCoordinateConverter

void setCoordinateConverter(CoordinateConverter c)
Set the object used to convert to screen coordinates for drawing


getCatalogPosition

NamedCoordinates getCatalogPosition(java.awt.geom.Point2D.Double p)
If the given screen coordinates point is within a displayed catalog symbol, set it to point to the center of the symbol and return the name and coordinates from the catalog table row. Otherwise, return null and do nothing.


getCoordinateConverter

CoordinateConverter getCoordinateConverter()
Return the object used to convert to screen coordinates for drawing


addSymbolSelectionListener

void addSymbolSelectionListener(SymbolSelectionListener listener)
Add a listener for selection events on symbols


removeSymbolSelectionListener

void removeSymbolSelectionListener(SymbolSelectionListener listener)
Remove a listener for selection events on symbols


addTableSelectionListener

void addTableSelectionListener(TableSelectionListener listener)
Add a listener for selection events on tables


removeTableSelectionListener

void removeTableSelectionListener(TableSelectionListener listener)
Remove a listener for selection events on tables


getConfigPanel

javax.swing.JPanel getConfigPanel(TableQueryResult table)
Return a panel to use to configure the plot symbols for the given table.

Parameters:
table - the result of a query

paintSymbols

void paintSymbols(java.awt.Graphics2D g,
                  java.awt.geom.Rectangle2D region)
Paint the catalog symbols using the given graphics object.

Parameters:
g - the graphics context
region - if not null, the region to paint

transformGraphics

void transformGraphics(java.awt.geom.AffineTransform trans)
Transform the plot symbols using the given AffineTransform (called when the image is transformed, to keep the plot symbols up to date).