Package uk.ac.starlink.topcat.plot2
Class GuiCoordContent
java.lang.Object
uk.ac.starlink.topcat.plot2.GuiCoordContent
Aggregates user-supplied information about a coordinate value used
as input for a plot.
The
dataLabels
and colDatas
arrays both
correspond to (and have the same array size as) the
Inputs
arrays for the coord.- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionGuiCoordContent
(uk.ac.starlink.ttools.plot2.data.Coord coord, String[] dataLabels, uk.ac.starlink.table.ColumnData[] colDatas, uk.ac.starlink.table.DomainMapper[] domainMappers) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionuk.ac.starlink.table.ColumnData[]
Returns the column data objects for user input variables.uk.ac.starlink.ttools.plot2.data.Coord
getCoord()
Returns the coordinate definition.static String
getCoordLabel
(String userCoordName, GuiCoordContent[] contents) Utility method to interrogate a list of GuiCoordContent objects to get a suitable coordinate label (for instance for use as an axis label) for one of the coordinates in a plot.static uk.ac.starlink.ttools.plot2.task.CoordSpec[]
getCoordSpecs
(GuiCoordContent[] contents) Utility method to generate a mapping from user coordinate names to their string specifications, given a set of GuiCoordContents.String[]
Returns the labels describing user input variables.uk.ac.starlink.table.DomainMapper[]
Returns the domain mapper objects corresponding to the user input variables.
-
Constructor Details
-
GuiCoordContent
public GuiCoordContent(uk.ac.starlink.ttools.plot2.data.Coord coord, String[] dataLabels, uk.ac.starlink.table.ColumnData[] colDatas, uk.ac.starlink.table.DomainMapper[] domainMappers) Constructor.- Parameters:
coord
- plot coordinate definitiondataLabels
- array of strings naming quantities for the user variables constituting the coord value; these are typically the values typed in by the usercolDatas
- array of column data arrays supplying values for the user variables constituting the coord valuedomainMappers
- array of DomainMappers used to decode values from the user variables
-
-
Method Details
-
getCoord
public uk.ac.starlink.ttools.plot2.data.Coord getCoord()Returns the coordinate definition.- Returns:
- coord definition
-
getDataLabels
Returns the labels describing user input variables.- Returns:
- nUserInfo-element array of user variable labels
-
getColDatas
public uk.ac.starlink.table.ColumnData[] getColDatas()Returns the column data objects for user input variables.- Returns:
- nUserInfo-element array of column data objects
-
getDomainMappers
public uk.ac.starlink.table.DomainMapper[] getDomainMappers()Returns the domain mapper objects corresponding to the user input variables.- Returns:
- nUserInfo-element array of domain mappers
-
getCoordSpecs
public static uk.ac.starlink.ttools.plot2.task.CoordSpec[] getCoordSpecs(GuiCoordContent[] contents) Utility method to generate a mapping from user coordinate names to their string specifications, given a set of GuiCoordContents.- Parameters:
contents
- objects specifying selected coordinate values- Returns:
- userInfo name->coord specifier map conveying the same information
- See Also:
-
getCoordLabel
Utility method to interrogate a list of GuiCoordContent objects to get a suitable coordinate label (for instance for use as an axis label) for one of the coordinates in a plot. This is not bulletproof because the user coordinate name is not guaranteed unique, but it will probably work as required.- Parameters:
userCoordName
- user input coordinate namecontents
- list of GuiCoordContent values associated with a plot; null is permitted, and will give a null result- Returns:
- string that the user will recognise as applying to
userCoordName
for plots generated by this control, or null if no result is found - See Also:
-