public class TablePlotSymbol
extends gnu.jel.DVMap
Modifier and Type | Field and Description |
---|---|
static int |
ARROW |
static int |
CIRCLE |
static String[] |
COLOR_NAMES |
static Color[] |
COLORS |
static int |
COMPASS |
static int |
CROSS |
static int |
DEFAULT_DEC_COL
The default table column index containing the Dec world coordinate value
|
static double |
DEFAULT_EQUINOX
The default equinox for RA and Dec
|
static int |
DEFAULT_RA_COL
The default table column index containing the RA world coordinate value
|
static int |
DIAMOND |
static int |
ELLIPSE |
static int |
LINE |
static int |
PLUS |
static int |
SQUARE |
static String[] |
SYMBOLS
valid symbols (keep in the same order as the constants above
|
static int |
TRIANGLE |
Constructor and Description |
---|
TablePlotSymbol()
Initialize an TablePlotSymbol with the default values.
|
TablePlotSymbol(TableQueryResult table,
String[] colNames,
String shapeName,
String fg,
String bg,
String ratio,
String angle,
String label,
String cond,
String size,
String units)
Initialize a TablePlotSymbol from the given values.
|
TablePlotSymbol(TableQueryResult table,
String cols,
String symbol,
String expr)
Parses the given fields from a plot symbol definition in Tcl list format
and makes the values available via methods.
|
Modifier and Type | Method and Description |
---|---|
String |
getAngle()
Return the symbol's rotation angle (may be an expression using column names)
|
double |
getAngle(Vector rowVec)
Return the symbol's rotation angle, evaluating the expression for the given row.
|
Color |
getBg()
Return the symbol's background color
|
Shape |
getBoundingShape(Shape shape)
If this symbol type has an internal area, return the given shape, otherwise return
the bounding box of the shape.
|
int[] |
getColIndexes()
Return the array of column indexes for column names
|
String[] |
getColNames()
Return the array of column names used in the symbol expressions
|
String |
getColNamesList()
Return a list of column names used in the symbol expressions in Tcl list format
|
String |
getColorName(Color c)
Return the Color name, given a Color object, if known, otherwise just "yellow", if not known.
|
String |
getCond()
Return the condition under which the symbol will be plotted (may be an expression using column names)
|
boolean |
getCond(Vector rowVec)
Return the condition under which the symbol will be plotted, evaluating the expression for the given row.
|
int |
getDecCol()
Return the index of the center position Dec column
|
String |
getDescription()
Return the symbol description, or null if not available
|
double |
getDoubleProperty(String name)
Called by reflection for the DVMap interface to get the value of the named variable of type Double
|
double |
getEquinox()
Return the equinox of the RA and DEC columns
|
Color |
getFg()
Return the symbol's foreground color (if no color is specified, use 2 colors: black and white)
|
String |
getLabel()
Return the symbol's label (may be an expression using column names)
|
String |
getLabel(Vector rowVec)
Return the symbol's label, evaluating the expression for the given row.
|
String |
getName()
Return the display name of the symbol
|
static String |
getPlotSymbolInfo(TablePlotSymbol[] symbols)
Return a String in Tcl list format describing the given array of plot symbol
objects.
|
int |
getRaCol()
Return the index of the center position RA column
|
String |
getRatio()
Return the X/Y size ratio (stretching) (may be expression using column names)
|
double |
getRatio(Vector rowVec)
Return the symbol's ratio, evaluating the expression for the given row.
|
RowCoordinates |
getRowCoordinates()
Return an object storing the column indexes where RA and Dec are found
|
int |
getShape()
Return the symbol's shape as a constant (CIRCLE, ELLIPSE, etc...).
|
String |
getShapeName()
Return the symbol shape name
|
String |
getSize()
Return the symbol's size (may be an expression using column names)
|
double |
getSize(Vector rowVec)
Return the symbol's size, evaluating the size expression for the given row.
|
String |
getStringProperty(String name)
Called by reflection for the DVMap interface to get the value of the named variable of type String
|
TableQueryResult |
getTable()
Return the catalog table containing the data to be plotted
|
String |
getTypeName(String name)
Implements the DVMap interface
|
String |
getUnits()
Return the units of the symbol size ("image" for image pixels, "deg equinox" for world coordinate degrees
|
static TablePlotSymbol[] |
parsePlotSymbolInfo(String symbolInfo)
Parsed the plot symbol information in Tcl list format and return
an array of objects describing it.
|
void |
setAngle(String angle)
Return the symbol's rotation angle (may be an expression using column names)
|
void |
setBg(Color color)
Set the symbol's background color
|
void |
setBg(String colorName)
Set the symbol's background color
|
void |
setColNames(String[] colNames)
Set the array of column names used in the symbol expressions
|
void |
setCond(String cond)
Set the condition under which the symbol will be plotted (may be an expression using column names)
|
void |
setDecCol(int decCol)
Set the index of the center position Dec column (default 2)
|
void |
setDescription(String description)
Set the symbol description
|
void |
setEquinox(double equinox)
Set the equinox of the RA and DEC columns (default 2000)
|
void |
setFg(Color color)
Set the symbol's foreground color
|
void |
setFg(String colorName)
Set the symbol's foreground color
|
void |
setLabel(String label)
Set the symbol's label (may be an expression using column names)
|
void |
setName(String name)
Set the display name of the symbol
|
void |
setRaCol(int raCol)
Set the index of the center position RA column (default 1)
|
void |
setRatio(String ratio)
Return the X/Y size ratio (stretching) (may be expression using column names)
|
void |
setShape(int shape)
Set the symbol's shape as a constant (CIRCLE, ELLIPSE, etc...).
|
void |
setShapeName(String shapeName)
Set the symbol shape name
|
void |
setSize(String size)
Set the symbol's size (may be an expression using column names)
|
void |
setTable(TableQueryResult table)
Set the catalog table containing the data to be plotted
|
void |
setUnits(String units)
Set the units of the symbol size ("image" for image pixels, "deg equinox" for world coordinate degrees
|
public static final int CIRCLE
public static final int SQUARE
public static final int PLUS
public static final int CROSS
public static final int TRIANGLE
public static final int DIAMOND
public static final int ELLIPSE
public static final int COMPASS
public static final int LINE
public static final int ARROW
public static final String[] SYMBOLS
public static final String[] COLOR_NAMES
public static final Color[] COLORS
public static final int DEFAULT_RA_COL
public static final int DEFAULT_DEC_COL
public static final double DEFAULT_EQUINOX
public TablePlotSymbol()
public TablePlotSymbol(TableQueryResult table, String cols, String symbol, String expr)
table
- contains the table data and informationcols
- a Tcl list of column names that may be used in symbol expressionssymbol
- a Tcl list of the form {shape color ratio angle label condition}expr
- a Tcl list of the form {sizeExpr units}public TablePlotSymbol(TableQueryResult table, String[] colNames, String shapeName, String fg, String bg, String ratio, String angle, String label, String cond, String size, String units)
table
- contains the table data and informationcolNames
- an array of column headings used as variablesshapeName
- the name of the plot symbol shapefg
- the name of the foreground color of the plot symbolbg
- the name of the background color of the plot symbolratio
- the x/y ratio expression (stretch)angle
- the angle expressionlabel
- the label expressioncond
- the condition expressionsize
- the symbol size expressionunits
- the units of the symbol sizepublic static TablePlotSymbol[] parsePlotSymbolInfo(String symbolInfo)
table
- object representing the catalog tablepublic static String getPlotSymbolInfo(TablePlotSymbol[] symbols)
symbols
- an array of objects describing table plot symbolspublic RowCoordinates getRowCoordinates()
public void setName(String name)
public String getName()
public void setDescription(String description)
public String getDescription()
public String getColorName(Color c)
public void setTable(TableQueryResult table)
public TableQueryResult getTable()
public int getRaCol()
public void setRaCol(int raCol)
public int getDecCol()
public void setDecCol(int decCol)
public double getEquinox()
public void setEquinox(double equinox)
public void setColNames(String[] colNames)
public String[] getColNames()
public int[] getColIndexes()
public String getColNamesList()
public void setShape(int shape)
public int getShape()
public void setShapeName(String shapeName)
public String getShapeName()
public Shape getBoundingShape(Shape shape)
public void setFg(String colorName)
public void setFg(Color color)
public Color getFg()
public void setBg(String colorName)
public void setBg(Color color)
public Color getBg()
public void setRatio(String ratio)
public String getRatio()
public double getRatio(Vector rowVec)
public void setAngle(String angle)
public String getAngle()
public double getAngle(Vector rowVec)
public void setLabel(String label)
public String getLabel()
public String getLabel(Vector rowVec)
public void setCond(String cond)
public String getCond()
public boolean getCond(Vector rowVec)
public void setSize(String size)
public String getSize()
public double getSize(Vector rowVec)
public void setUnits(String units)
public String getUnits()
public String getTypeName(String name)
getTypeName
in class gnu.jel.DVMap
public double getDoubleProperty(String name)
Copyright © 2023 Central Laboratory of the Research Councils. All Rights Reserved.