|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgnu.jel.DVMap
jsky.catalog.TablePlotSymbol
public class TablePlotSymbol
Represents the contents of a catalog table plot symbol definition. Any number of plot symbols may be defined. For each row in a table query result, each symbol may be displayed in an image window at a position given by the row's coordinate columns. Each symbol's size, rotation angle, x/y ratio, and label may be calculated from table column values.
Field Summary | |
---|---|
static int |
ARROW
|
static int |
CIRCLE
|
static java.lang.String[] |
COLOR_NAMES
|
static java.awt.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 java.lang.String[] |
SYMBOLS
valid symbols (keep in the same order as the constants above |
static int |
TRIANGLE
|
Constructor Summary | |
---|---|
TablePlotSymbol()
Initialize an TablePlotSymbol with the default values. |
|
TablePlotSymbol(TableQueryResult table,
java.lang.String[] colNames,
java.lang.String shapeName,
java.lang.String fg,
java.lang.String bg,
java.lang.String ratio,
java.lang.String angle,
java.lang.String label,
java.lang.String cond,
java.lang.String size,
java.lang.String units)
Initialize a TablePlotSymbol from the given values. |
|
TablePlotSymbol(TableQueryResult table,
java.lang.String cols,
java.lang.String symbol,
java.lang.String expr)
Parses the given fields from a plot symbol definition in Tcl list format and makes the values available via methods. |
Method Summary | |
---|---|
java.lang.String |
getAngle()
Return the symbol's rotation angle (may be an expression using column names) |
double |
getAngle(java.util.Vector rowVec)
Return the symbol's rotation angle, evaluating the expression for the given row. |
java.awt.Color |
getBg()
Return the symbol's background color |
java.awt.Shape |
getBoundingShape(java.awt.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 |
java.lang.String[] |
getColNames()
Return the array of column names used in the symbol expressions |
java.lang.String |
getColNamesList()
Return a list of column names used in the symbol expressions in Tcl list format |
java.lang.String |
getColorName(java.awt.Color c)
Return the Color name, given a Color object, if known, otherwise just "yellow", if not known. |
java.lang.String |
getCond()
Return the condition under which the symbol will be plotted (may be an expression using column names) |
boolean |
getCond(java.util.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 |
java.lang.String |
getDescription()
Return the symbol description, or null if not available |
double |
getDoubleProperty(java.lang.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 |
java.awt.Color |
getFg()
Return the symbol's foreground color (if no color is specified, use 2 colors: black and white) |
double |
getFloatProperty(java.lang.String name)
Called by reflection for the DVMap interface to get the value of the named variable of type Float |
java.lang.String |
getLabel()
Return the symbol's label (may be an expression using column names) |
java.lang.String |
getLabel(java.util.Vector rowVec)
Return the symbol's label, evaluating the expression for the given row. |
java.lang.String |
getName()
Return the display name of the symbol |
java.lang.Object |
getObjectProperty(java.lang.String name)
Called by reflection for the DVMap interface to get the value of the named variable of type Object |
static java.lang.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 |
java.lang.String |
getRatio()
Return the X/Y size ratio (stretching) (may be expression using column names) |
double |
getRatio(java.util.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...). |
java.lang.String |
getShapeName()
Return the symbol shape name |
java.lang.String |
getSize()
Return the symbol's size (may be an expression using column names) |
double |
getSize(java.util.Vector rowVec)
Return the symbol's size, evaluating the size expression for the given row. |
java.lang.String |
getStringProperty(java.lang.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 |
java.lang.String |
getTypeName(java.lang.String name)
Implements the DVMap interface |
java.lang.String |
getUnits()
Return the units of the symbol size ("image" for image pixels, "deg equinox" for world coordinate degrees |
static TablePlotSymbol[] |
parsePlotSymbolInfo(java.lang.String symbolInfo)
Parse the plot symbol information in Tcl list format and return an array of objects describing it. |
void |
setAngle(java.lang.String angle)
Return the symbol's rotation angle (may be an expression using column names) |
void |
setBg(java.awt.Color color)
Set the symbol's background color |
void |
setBg(java.lang.String colorName)
Set the symbol's background color |
void |
setColNames(java.lang.String[] colNames)
Set the array of column names used in the symbol expressions |
void |
setCond(java.lang.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(java.lang.String description)
Set the symbol description |
void |
setEquinox(double equinox)
Set the equinox of the RA and DEC columns (default 2000) |
void |
setFg(java.awt.Color color)
Set the symbol's foreground color |
void |
setFg(java.lang.String colorName)
Set the symbol's foreground color |
void |
setLabel(java.lang.String label)
Set the symbol's label (may be an expression using column names) |
void |
setName(java.lang.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(java.lang.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(java.lang.String shapeName)
Set the symbol shape name |
void |
setSize(java.lang.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(java.lang.String units)
Set the units of the symbol size ("image" for image pixels, "deg equinox" for world coordinate degrees |
Methods inherited from class gnu.jel.DVMap |
---|
translate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
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 java.lang.String[] SYMBOLS
public static final java.lang.String[] COLOR_NAMES
public static final java.awt.Color[] COLORS
public static final int DEFAULT_RA_COL
public static final int DEFAULT_DEC_COL
public static final double DEFAULT_EQUINOX
Constructor Detail |
---|
public TablePlotSymbol()
public TablePlotSymbol(TableQueryResult table, java.lang.String cols, java.lang.String symbol, java.lang.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, java.lang.String[] colNames, java.lang.String shapeName, java.lang.String fg, java.lang.String bg, java.lang.String ratio, java.lang.String angle, java.lang.String label, java.lang.String cond, java.lang.String size, java.lang.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 sizeMethod Detail |
---|
public static TablePlotSymbol[] parsePlotSymbolInfo(java.lang.String symbolInfo)
symbolInfo
- plot symbol description
public static java.lang.String getPlotSymbolInfo(TablePlotSymbol[] symbols)
symbols
- an array of objects describing table plot symbols
public RowCoordinates getRowCoordinates()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setDescription(java.lang.String description)
public java.lang.String getDescription()
public java.lang.String getColorName(java.awt.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(java.lang.String[] colNames)
public java.lang.String[] getColNames()
public int[] getColIndexes()
public java.lang.String getColNamesList()
public void setShape(int shape)
public int getShape()
public void setShapeName(java.lang.String shapeName)
public java.lang.String getShapeName()
public java.awt.Shape getBoundingShape(java.awt.Shape shape)
public void setFg(java.lang.String colorName)
public void setFg(java.awt.Color color)
public java.awt.Color getFg()
public void setBg(java.lang.String colorName)
public void setBg(java.awt.Color color)
public java.awt.Color getBg()
public void setRatio(java.lang.String ratio)
public java.lang.String getRatio()
public double getRatio(java.util.Vector rowVec)
public void setAngle(java.lang.String angle)
public java.lang.String getAngle()
public double getAngle(java.util.Vector rowVec)
public void setLabel(java.lang.String label)
public java.lang.String getLabel()
public java.lang.String getLabel(java.util.Vector rowVec)
public void setCond(java.lang.String cond)
public java.lang.String getCond()
public boolean getCond(java.util.Vector rowVec)
public void setSize(java.lang.String size)
public java.lang.String getSize()
public double getSize(java.util.Vector rowVec)
public void setUnits(java.lang.String units)
public java.lang.String getUnits()
public java.lang.String getTypeName(java.lang.String name)
public double getFloatProperty(java.lang.String name)
public double getDoubleProperty(java.lang.String name)
public java.lang.String getStringProperty(java.lang.String name)
public java.lang.Object getObjectProperty(java.lang.String name)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |